Skip to content
CyberSimStart training

Theory · 8 min · Linux monitoring

Linux persistence: cron, systemd, keys

Check the places attackers use to come back on a Linux host.

Cron runs commands on a schedule: per-user crontabs (crontab -l), /etc/crontab and /etc/cron.d. A line that downloads and pipes into a shell every few minutes is a classic.

systemd services and timers can start anything at boot or on a schedule. New unit files under /etc/systemd/system or ~/.config/systemd/user, especially with an odd ExecStart path in /tmp or /dev/shm, deserve a look.

An attacker’s public key added to ~/.ssh/authorized_keys gives them a quiet way back in, even after the password changes.

Shell start-up files (.bashrc, .profile) run on every login and are another easy hiding place.

T1053.003T1543.002T1098.004T1496

Your turn: match observations. Match each finding to its ATT&CK technique.

Do the interactive check Free, in the browser.

Sources

Part of