How would you do that ...

Robert J. Hansen rjh at sixdemonbag.org
Tue May 4 18:47:50 CEST 2021


> Modern harddisks don't allow that anymore. Should I assume that
> "low-level format" in this case means something like
> 
> dd if=/dev/zero of=/dev/sdX

[puts on forensics professional hat]

Good question!  The tl;dr of it is that the technique to wipe a hard 
drive will vary according to the kind of technology used in 
manufacturing the drive, and to a lesser extent the kind of forensics 
nerdery you're afraid of.

This is the origin of the myth of the 30-odd-pass "Gutmann shred".  It 
was always a complete myth that you needed 30-odd passes to wipe a hard 
drive.  The 30+ passes were if you had no knowledge about the underlying 
technology of the drive and needed to account for antique FM-coded 
drives all the way up through modern SSDs.  If you were thinking of 
doing a 30+-pass shred, the best thing to do was smack yourself in the 
face for being so foolish and then go off and read the label on your 
hard drive.  :)

For modern SSDs I generally recommend a single pass with random data:

dd if=/dev/urandom of=/dev/foo bs=1M

(Don't forget the blocksize [bs] parameter; it can improve speed 
significantly.)

This is enough to foil the vast majority of forensic analysis.  Yes, 
yes, SSDs have remapping capabilities which means certain memory cells 
won't get hit even if you do this, and it's theoretically possible for a 
good forensics nerd to do all kinds of wild magic to pull off data you 
didn't even know was there... but that kind of very high-level forensics 
nerdery costs a lot of money, and few people are worth that kind of 
investment.




More information about the Gnupg-users mailing list