Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I would like to know if there is a way to securely erase USB flash drives withou

ID: 661294 • Letter: I

Question

I would like to know if there is a way to securely erase USB flash drives without a chance to recover data from it once it has been erased. I know, that programms like DBAN can be used to securely erase HDDs, but as they work different from flash based drives, I am not sure if I can use DBAN to securely erase my USB drives.

If DBAN cannot be used, how do I erase USB flash drives?

I know that SSDs have to be erased using programs that reset the data cells and are often available from the manufacturer, but I do not know if this is also the case for USB flash drives.

Explanation / Answer

Flash storage, particularly SSDs, require a block/cell be wiped before more data can be written. As a result, writing would be slow if additional technology wasn't implemented.

Instead, your drive actually has 10-20% more storage than the listed capacity and an onboard memory controller will dynamically map empty cells and, during low load, wipe unmapped ones. This creates the security issue that you've encountered.

Without a tool that can leverage the memory controller your OS has no way of addressing every single cell at any given time. Many manufacturers are now providing tools that will allow you to manage the drive and securely wipe it but should your drive not have such a tool there are few perfect workarounds.

Aside from reverse-engineering a tool to manage the memory controller the best method I know of is to do many successive writes.

dd if=/dev/urandom of=/dev/devicename

Filling the drive with random data and then doing so again and again will cause the drive to constantly remap the cells and eventually you'll overwrite enough of them to be reasonably secure. The more successive overwrites the higher the chances that you will have written to every cell.

NOTE: Technically, these successive overwrites should also be done with a traditional HDD, but for a totally different reason. High accuracy equipment may be able to read previous magnetic states directly from the platter to recover data. This is why it's important not to overwrite with 0s or 1s, as it'll leave a easy to determine the previous state of the bits.

For an easier fix, throw the drive through a physical shredder. Obviously not a solution if you plan on reselling or reusing the drive but generally one of the most secure methods.