Secure Deletion of Data in Linux
|
|
|
Comments (5)
Some of them rewrite the space over and over to avoid forensic reconstruction of the data... Your example might not be thorough enough for a high security environment.
Indeed, if the file is on an SSD, different pages may be assigned to the written 0s rather than rewriting the old pages due to wear leveling.
In this case, it may well be insufficient to destroy the data.
It's amazing what can be recovered using forensic techniques where disk pages have been rewritten even a number of times. The whole subject blows my mind.
In this case, it may well be insufficient to destroy the data.
It's amazing what can be recovered using forensic techniques where disk pages have been rewritten even a number of times. The whole subject blows my mind.
When spinning platters are the medium, and you just want to clear the old data in the unused space:
1. Get root.
2. Go to a directory on the volume you want to scrub. Any directory will suffice.
3. Issue the following command:
This will fill up the volume with a zero file. (If you aren't root, you'll get only ~95% of the volume.)
4. Then issue this command:
This will wipe the formerly unused space, then release it once again for new files. Voila!
Unless the volume is already over 90% used, the journal isn't going to be a concern. It may slow things down, but it will be forced to commit writes to the dnodes long before write coalescing becomes an issue.
1. Get root.
2. Go to a directory on the volume you want to scrub. Any directory will suffice.
3. Issue the following command:
dd if=/dev/zero of=zeros bs=1048576
4. Then issue this command:
shred -vu zeros
Unless the volume is already over 90% used, the journal isn't going to be a concern. It may slow things down, but it will be forced to commit writes to the dnodes long before write coalescing becomes an issue.
Yeah, secure delete is tricky.
http://arstechnica.com/security/2012/06/personal-data-put-at...
Won't work on a copy-on-write filesystem like btrfs. It probably won't work on any modern filesystem, even if it usually does in-place writes.
For SSD's it *may* be enough if your filesystem supports discard (the famed TRIM command in ATA land) and you just remove the file (and it's not present in any snapshots). But I would not bet on it.
Quoting:why not use "dd if=/dev/zero of=/home/user/myfile.txt"
Won't work on a copy-on-write filesystem like btrfs. It probably won't work on any modern filesystem, even if it usually does in-place writes.
For SSD's it *may* be enough if your filesystem supports discard (the famed TRIM command in ATA land) and you just remove the file (and it's not present in any snapshots). But I would not bet on it.
Post a comment
A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.
Your message:Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help
Sign up and post (it is free) or Log in and post

why not use "dd if=/dev/zero of=/home/user/myfile.txt"