Live data from Hacker News

How secure is merely discarding (TRIMing) all of a SSD's blocks?

utcc.utoronto.ca

61–70 of 117 posts

Re: How secure is merely discarding (TRIMing) all of a SSD's blocks?

#61
post #49
post #34

Earlier quoted context omitted.

Delete all the files then "dd" from the random device until the drive is full? Must we always jump straight to the hydraulic press?

Hydraulic press is too obscure, .45 ACP works just as well. But it depends on your risk profile, for most people a wipe-and-reuse is going to be fine, especially if the "reuser" is already a trusted entity.

That's a nice solution in the US I guess, not so much for us in Europe :)

Re: How secure is merely discarding (TRIMing) all of a SSD's blocks?

#63
post #2

> Flash storage, unlike traditional hard drives, can really be completely and irrecoverably erased, with no lingering magnetic ghosts that a sufficiently determined person could in theory reconstruct. I think people vastly overestimate the possibility to recover any data from a wiped HDD. See for example this article by SANS [1]. To recover a single bit you have a better chance of flipping a coin to see if the bit wa…

This can't be true. Any method must be at least as good as a coin toss. If it's worse you can just bit flip the result and end up better than the coin.

The article isn't super clear, but I think what it's saying is that the data recovery method they were testing (when looking at recovering a single bit) was as good as 92%, and as bad as 32%, depending on how the data was overwritten and other factors like the specific drive. Thus you likely can't just flip the result to get better odds because in a real scenario you wouldn't know which category you fall into (whether it's really good, or really bad), and overall if you don't know that information then the odds are close to 50%.

Edit: And of course even a high of 92% is abysmal for a single bit, since the combined odds of multiple bits quickly goes to zero for any sizable amount of data.

Re: How secure is merely discarding (TRIMing) all of a SSD's blocks?

#64
post #2

> Flash storage, unlike traditional hard drives, can really be completely and irrecoverably erased, with no lingering magnetic ghosts that a sufficiently determined person could in theory reconstruct. I think people vastly overestimate the possibility to recover any data from a wiped HDD. See for example this article by SANS [1]. To recover a single bit you have a better chance of flipping a coin to see if the bit wa…

All those articles are very theoretical, in reality 1 pass of dd /dev/zero makes things unrecoverable, for recent SSD since trim is enabled by default you can't recover anything, I deleted a document by mistake on an SSD and it was impossible to get back, the moment I pressed delete on windows the trim command was sent and everything was erased on the ssd.

Pro recovery compagny that are not shady know that SSD recovery with TRIM is impossible.

Re: How secure is merely discarding (TRIMing) all of a SSD's blocks?

#65

Earlier quoted context omitted.

3. Technically someone could uncover a flaw in whatever encryption you used.

Once you have an attacker with that kind of technical skill, you are in a totally different world.

Not necessarily -- if the drive was found and decrypted after the exploit was leaked and made public (perhaps YEARS after it being a 0-day), it wouldn't necessarily be a skilled attack.

Re: How secure is merely discarding (TRIMing) all of a SSD's blocks?

#68

Unrelated to trim, but for some reason when I used secure erase on an SSD with a ZFS pool, the pool was still able to be found by ZFS. That shouldn't be the case, right?

Not sure how secure erase works, but I’ve run into this a few times after “erasing”. I think it has something to do with boot records or partition tables. So there’s a piece of some drives (usually at the front) that contains this data. You can overwrite it properly with the appropriate tools. I always just used `dd` on the raw drive ref in Linux to blow it up.

Re: How secure is merely discarding (TRIMing) all of a SSD's blocks?

#69

Unrelated to trim, but for some reason when I used secure erase on an SSD with a ZFS pool, the pool was still able to be found by ZFS. That shouldn't be the case, right?

I think ZFS identifies drives by their serial number. So you can erase a drive in a pool, and ZFS on that machine will still recognise the drive based on its serial number, and know its pool membership.

ZFS should then throw all kinds of errors once it notices that all the super locks and other FS metadata is missing. But a scrub should cause ZFS to simply fix that via normal resilvering.

Re: How secure is merely discarding (TRIMing) all of a SSD's blocks?

#70

Or you encrypt the entire drive. Then the secure erasure is a matter of throwing away the keys, and you don't have to bother with thinking through your threat model.

Throwing away the keys is surprisingly hard to do.

Say you have one root key and you derive per-file or per-block keys using various metadata (inode numbers, generation numbers, block addresses, whatever). You can't throw away derived keys though!

Or say you generate random keys per-file and you store those somewhere (it's annoying to have to store them). Now to throw those keys away you need to re-write the blocks containing them. If there's any behind-the-scenes copy-on-write going on then re-writing a block doesn't necessarily lose its old contents.

The only thing that's easy to throw away -maybe- is the top-level / root keys. But that means deleting the entire filesystem.

Post reply on HN