How would you securely wipe a decommissioned server's disks?
IntermediateScenarioSecurity, hardening and incident response
Answer
Situation read → Depends on media and encryption.
What I'd do →
- If disks were LUKS-encrypted: destroy the key slots:
cryptsetup luksErase /dev/sdb(crypto-erase). - SSD/NVMe: use the drive's secure erase:
nvme format /dev/nvme0n1 --ses=1orblkdiscard --securewhere supported. - HDD:
shred -n 1 -z /dev/sdbordd if=/dev/zero. - Document serial numbers and the method for audit.
Why → Overwriting doesn't reliably reach all SSD cells because of wear levelling; crypto-erase or firmware erase does.
Interview tip → Cloud volumes are crypto-erased by the provider when deleted.
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