Ransomware hit a file server and encrypted shares. As the Linux admin, how do you recover?
AdvancedScenarioSecurity, hardening and incident response
Answer
Situation read → Contain, identify scope, restore from clean backups, close the entry point.
What I'd do →
- Disconnect the share and the infected clients; stop Samba/NFS.
- Identify the start time from file mtimes and logs.
- Verify backups/snapshots are clean and from before that time (immutable or offline copies).
- Rebuild the server if it was compromised itself, restore data, rescan.
- Rotate credentials and fix the access path (often a compromised user's SMB credentials).
Why → Restoring onto an infected host or from infected backups just re-encrypts.
Interview tip → Mention immutable backups (S3 Object Lock, read-only snapshots) as the real defence.
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