iac.htora.dev · security templates

Home/Refreshers/Linux host triage: refresher

Linux host triage

What to capture first on a suspect Linux machine, where persistence hides, and which logs matter.

Remember

  1. Do not reboot. Memory, connections, and programs running from deleted files are lost.
  2. In the cloud, snapshot the disk first, then capture memory with AVML.
  3. Record uname -r before capture. Volatility 3 needs symbols for that exact kernel.
  4. Run your own static tools. The machine's may have been replaced.
PersistenceWhere
Scheduled jobs/etc/crontab, /etc/cron.*, /var/spool/cron/, systemctl list-timers --all
Services/etc/systemd/system/, ~/.config/systemd/user/
SSH keysevery authorized_keys, and AuthorizedKeysFile in sshd -T
Library preloading/etc/ld.so.preload, usually empty or missing
Accounts and sign-in/etc/passwd, /etc/sudoers.d/, /etc/pam.d/
Cloud start-up/var/lib/cloud/instance/user-data.txt, /var/log/cloud-init.log

Live state

Processes, with start timesps -eo pid,ppid,user,lstart,args
Connectionsss -tunap
Programs running from deleted filesls -l /proc/*/exe 2>/dev/null | grep deleted
Deleted files still openlsof -nP +L1
Sign-ins, good and failedlast; lastb

Watch out

  • Reading the instance's credentials from the metadata service leaves no trace on the host. Look for the role used elsewhere in the cloud audit log.
  • Attackers clear local logs first. A copy shipped off the machine is the one to trust.
Check it worked

Every item collected has a hash, a time, and your name, and the disk snapshot was taken before memory capture.

Read the full pageDownload PDF

Registry 0.23.0. Built 2026-11-17.

Made by Habibullah Tora. Source on GitHub. Code under the MIT licence, writing under CC BY 4.0.