After the compromise you need to find how the attacker got in. Where do you look?
AdvancedScenarioSecurity, hardening and incident response
Answer
Situation read → Timeline reconstruction from logs and the disk snapshot.
What I'd do →
- Auth logs:
grep -E 'Accepted|Failed' /var/log/secure*(orauth.log), especially unusual IPs or keys. - Web logs around the first bad timestamp: strange POSTs, webshell paths,
../traversal,${jndi:. - Recently modified files on the mounted snapshot:
find /mnt/evidence -xdev -newermt "2026-11-08 00:00" ! -newermt "2026-11-09 03:00" -type f -ls
- Package integrity:
rpm -Vaordebsums -cagainst the snapshot root. - Audit logs:
ausearch -ts 11/08/2026 -k exec.
Why → The first malicious event tells you the vulnerability to fix fleet-wide.
Interview tip → Use central logs as the source of truth, since local ones may have been tampered with.
More on Security, hardening and incident response
Monitoring shows a web server making outbound connections to an unknown IP on port 4444 at 2 AM. You suspect it is compromised. What do you do?AdvancedYour CISO asks you to harden a fresh Linux server baseline. What's on your list?IntermediateA developer says "SELinux keeps breaking my app, can we just disable it?" How do you respond and what do you do?IntermediateYou need to know when anyone modifies `/etc/sudoers`, `/etc/passwd` or SSH config. How?IntermediateA critical OpenSSL CVE is announced. How do you find and patch affected servers quickly?IntermediateHow do you make sure only signed, approved packages can be installed on your servers?Intermediate