You need to know when anyone modifies `/etc/sudoers`, `/etc/passwd` or SSH config. How?
IntermediateScenarioSecurity, hardening and incident response
Answer
Situation read → File watch rules with auditd, shipped centrally.
What I'd do →
/etc/audit/rules.d/50-identity.rules:
-w /etc/passwd -p wa -k identity
-w /etc/shadow -p wa -k identity
-w /etc/sudoers -p wa -k sudoers
-w /etc/sudoers.d/ -p wa -k sudoers
-w /etc/ssh/sshd_config -p wa -k sshd
Load with sudo augenrules --load, query with ausearch -k sudoers -i.
Why → auditd records who (auid survives sudo), when and with which process.
Interview tip → Mention auid (login UID), which shows the original user even after sudo su -.
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?AdvancedAfter the compromise you need to find how the attacker got in. Where do you look?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?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