Interview Prep/Linux/Security, hardening and incident response

Your team must find all SUID/SGID binaries on servers and remove unnecessary ones. How?

IntermediateScenarioSecurity, hardening and incident response
Answer

Situation read → SUID binaries are privilege escalation targets.

What I'd do →

sudo find / -xdev \( -perm -4000 -o -perm -2000 \) -type f -exec ls -l {} \; 2>/dev/null

Compare against a known-good baseline per distro. Remove SUID where not needed: chmod u-s /usr/bin/<tool>. Make sure nothing suid lives in /home, /tmp or /opt from unknown sources, and mount those with nosuid.

Why → A new SUID root binary in an odd place is a classic backdoor.

Interview tip → Mention GTFOBins as the reference for abusable binaries.

All Linux questions Roadmap: Linux

More on Security, hardening and incident response