Signal9Signal9 — home
online
back to labs

SUID Audit: Find and Neutralize the Planted Backdoor

MediumDigital Forensics & Incident Response15-25 min
The brief

An EDR alert fired on this host: a setuid-root executable appeared where the fleet's approved baseline has none. The box otherwise looks normal, and the usual privileged tools — passwd, sudo, su and friends — are all still where they belong.

Every Linux box carries a small, well-known set of setuid/setgid-root binaries that legitimately need elevated privilege (changing your password rewrites a root-owned file, so passwd is setuid-root). An attacker who lands a shell often hides a copy of a shell with the setuid bit set in an out-of-the-way directory: run it and you are instantly root, no password, no sudo log. It hides in plain sight next to the legitimate ones — the only tells are that it lives outside the standard system directories and is not part of the sanctioned baseline.

Your job is audit-and-remediate, not just discovery. Enumerate the setuid/setgid binaries on this host, separate the attacker's planted binary from the legitimate baseline, and NEUTRALIZE only the malicious one — strip its setuid bit or delete the file outright. Do not take the shortcut of wiping the setuid bit off everything: that neutralizes the backdoor but also breaks passwd, sudo, and su, which is its own outage. Leave the legitimate baseline intact. See /root/case/brief.txt. Grading reads the machine state.

What you'll do
  • Enumerate the host's setuid/setgid-root binaries
  • Tell the attacker's planted setuid binary apart from the sanctioned baseline
  • Neutralize only the malicious binary — strip its setuid bit or remove it
  • Remediate surgically: leave legitimate setuid tools like passwd working

Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.