A user reports their account was used to log in from another country. How do you investigate?
IntermediateScenarioSecurity, hardening and incident response
Answer
Situation read → Possible credential or key theft.
What I'd do →
- Lock the account and kill sessions:
usermod -L user; pkill -u user. - Check logins:
last -F -i user,journalctl _COMM=sshd | grep userfor IP and key fingerprint. - Review
.bash_history,authorized_keys(new keys?), crontab and files they touched. - Rotate their keys/passwords and check other systems they access.
- Add MFA or geo/IP restrictions.
Why → The fingerprint tells you which key was used, which narrows down where it leaked.
Interview tip → LogLevel VERBOSE in sshd is what makes fingerprints appear in logs.
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?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?Intermediate