r/YouShouldKnow • u/perfectfire • Dec 08 '24
Technology YSK That "secure delete" doesn't work on solid state drives. In order to ensure deleted files are unrecoverable you should encrypt your disk drive.
Why YSK: "Secure delete" doesn't work on solid state drives and you should know what to do to guarantee deleted files aren't recoverable by other people.
##Background
You may already know that when you "delete" a file, the file isn't actually erased. Instead the file still exists on your drive, instead the reference to the file in the file system's directory structure (e.g., the Master File Table in NTFS or inode table in Linux) is removed. The file still exists and it can potentially be found by examining areas of the disk that (according to the file system's directory) do not contain any current file data. In the past you could "secure delete" a file by overwriting the entire contents of the file with garbage data (random data, all zeros or all ones) sometimes several times to make sure it is no longer recoverable. However, this does not work on solid state disks. Solid state disks have a limit to how many times they can be written to, so the drive itself decides where to write data. It does this so that it can make sure that no one area of the drive is written to a lot more than others which would cause areas of the disk to become unusable while others areas are still "fresh" and can still be used. So if you tell it to overwrite a particular area of the disk there is no guarantee that data will actually be written to the physical location you specify.
##What to do
The only way I know to guarantee that deleted files are unreadable then is to encrypt your disk. When it is encrypted no one can read any part of the disk unless they know the encryption key, so both existing files and deleted files will be unreadable without the key.
##How to do it
To enable disk encryption in Windows [check out this guide here](https://support.microsoft.com/en-us/windows/device-encryption-in-windows-cf7e2b6f-3e70-4882-9532-18633605b7df). To enable disk encryption in MacOS [check out this guide here](https://support.apple.com/guide/disk-utility/encrypt-protect-a-storage-device-password-dskutl35612/mac). There are multiple ways to encrypt a disk for Linux and you'll have to find a guide for your distro and file system.
19
u/iamapizza Dec 08 '24
Linux instructions https://code.mendhak.com/securely-wipe-ssd/
45
u/Apprehensive_Hat8986 Dec 08 '24
OP is correct, although depending on your level of security need, I'd be skittish of proprietary encryption systems.
13
u/kenjikun1390 Dec 08 '24
pc repair guy here. there are 2 important things to keep in mind when encrypting your drive. VERY IMPORTANT IN FACT
2
u/justbecause999 Dec 08 '24
The only true sure way to make sure no one can get any data from a drive is to destroy it. My company uses a service that comes onsite with a truck with a crushing machine mounted on it. We scan the drives and they scan when processing and we validate the lists after. It's the only way to make the auditing arm of the firm ask fewer questions too.
4
u/Deathoftheages Dec 08 '24
Doesn't running trim on an SSD zero out empty sectors?
2
u/gristoi Dec 08 '24
Just zero full the disk
1
u/[deleted] Dec 09 '24
So if I wanted to sell a computer with an SSD in it, could I delete everything on it, encrypt the files, but still make it usable for the person I sell it to? I've also heard that using the SSD manufacturer's tool to remove data from it can work as well?
HDD/SSD recoverability is one thing that holds me back from buying a new desktop PC. I don't want to just throw the thing in the trash - I want someone else to get use out of it. But if I can't make the data truly unrecoverable, then is my only option to just physically destroy the drives and sell the rest?
(this might be a dumb question/concern)
1
u/Salty_Wishbone1222 Dec 11 '24
the cipher command in windows has an option for this where it writes ones zeroes and random bytes into unallocated space.
do cipher /w
Not sure it is recommended on solid state drives
1
u/Apuleius_Ardens7722 Dec 17 '24
Encrypt your SSD in the first place (the moment you bought it).
0
u/CryptoMonok Dec 09 '24
You can zero out any SSD, tbh. Many many softwares do that. And it's as secure as doing it in an HDD. The amount of times you can zero out a single SSD is usually on the hundreds. Unless you really have to hide deleted stuff in your SSD so often, you can easily zero it out.
49
u/I-LOVE-MAC-AND-CHEEZ Dec 08 '24
Best thing is to take out the hard drive, give it a bath in some water, smash it to bits with a hammer, and then burry it in the backyard. That will make sure the data on the drive is GONE.
0
u/[deleted] Dec 08 '24
[deleted] — view deleted comment
41
u/[deleted] Dec 08 '24
[removed] — view removed comment