On overwriting disks (on OpenBSD 7.0-current)
amissing.link
amissing.link
People have been doing some really extreme things to clear out drives including 5+ passes and using true random sources but the fact is it is well beyond commercial means to recover data on a drive that is simply set to all zero just once. Maybe a state actor somewhere could read the edges of the data or the theoretic differences of zeroing and its state before that 0 was written but so far no one in the past 2 decades has shown it happen. If you are destroying a drive that is highly secret that another nation might want then sure be paranoid, but otherwise there is no reason for anyone to do anything but zero out a drive and that includes almost every single company.
Most drives these days come with a secure wipe and that is the fastest way to clear them. Use that or just zeros, anything else is not making the (ex) data more secure its just taking longer.
[1]https://tinyapps.org/docs/recovering_data_from_zero_filled_h... is a similar more recent experiment but not the one referenced since that one disappeared years ago.
>...but otherwise there is no reason for anyone to do anything but zero out a drive and that includes almost every single company.
Overwriting doesn't work with SSDs. They leave copies of data laying around on the disk if you do that. That is even if you zero the whole disk as they have extra space in the form of overprovisioning.
>Most drives these days come with a secure wipe and that is the fastest way to clear them.
Tests have shown that a significant proportion of SSDs do this badly.
Working in finance, healthcare, and other secure industries you must demonstrate control of the environment, which includes processes to clear up data.
Once a standard is common it’s easier to follow it and demonstrate that adherence to a regulator than it is to invent your own process and convince them it’s safe.
Even in current world with SSDs that don’t follow the same mechanics as spinning disks, regulators expect a 9-pass DoD wipe because that’s what they’re used to.
It’s easiest to just pass drives to a certified data destruction company who will provide a cert of evidence they did a DoD, NIST, etc certified wipe.
Reality is seldom part of the process.
Similar is the process for password resets. Regulars ask for 90 day resets and crazy complexity schemes when NIST actually just recommends relatively sane complexity, slightly longer passwords and no rotation.
On spinning disks, it might be good to cover your deletions as you go with random data, but you can’t use dd to do that. You’d need a filesystem-aware tool. On SSDs, the TRIM function may help you approach that.
$ dd if=/dev/zero of=/dev/null
load: 0.27 cmd: dd 2358 [running] 0.37u 0.65s 1% 99k
528102+0 records in
528101+0 records out
270387712 bytes transferred in 1.051 secs (257262549 bytes/sec)
load: 0.27 cmd: dd 2358 [running] 1.00u 1.93s 10% 109k
1467936+0 records in
1467935+0 records out
751582720 bytes transferred in 2.930 secs (256426100 bytes/sec)
load: 0.32 cmd: dd 2358 [running] 1.68u 3.12s 19% 109k
2424899+0 records in
2424899+0 records out
1241548288 bytes transferred in 4.834 secs (256784572 bytes/sec)I recently did
pv </dev/zero >/dev/sdb
to zero a drive and I'm pretty sure it gave me an ETA...
As far as I know, this does not work for the output device, and the size must be specified.
So:
pv /path/file >/dev/device
Will give you an ETA.
> For larger disks, an ETA proves invaluable. I like pv for this task.