What recovery techniques (if any) exist that can recover data from a mechanical HDD if the user has filled the disk with a single run of dd if=/dev/urandom of=/dev/[disk]?

Or in other words: is this method of "wiping" the disk secure? If not then why not?

It would be interesting to know if any purely software based approaches can rather trivially recover the data in this case, or if special recovery hardware is required (if it is at all possible).

How would this change if the user used dd if=/dev/null of=/dev/[disk] instead of urandom? In this case I believe special hardware can attempt to read the previous magnetic state of the platter to recover the data? What is this technique called?

How does this change with SSDs?

  • If you actually overwrote each physical bit on you harddisk once, then it's secure even against special hardware. But there are complications (weak leveling, auto discarding defect sectors etc.) that can lead to some parts not being overwritten. – CodesInChaos Mar 15 '13 at 9:04
  • The general nature of your question is answered in the duplicate link, but you do have a lot of small questions asked at once. If there's something specific you still need the answer to, you should open a question focused on that. – Jeff Ferland Mar 15 '13 at 9:13
  • Note that dd by default will write in 512 byte blocks. This is very slow and inefficient on modern buffered block devices. Appending something like bs=256k will increase the block size and improve performance. – guest Nov 19 '17 at 3:56