Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 03-18-2007, 10:34 AM   #1
LQ Newbie
Registered: Dec 2006
Location: NY
Distribution: Ubuntu
Posts: 21

Rep: Reputation: Disabled
Kernel level secure file deletion?

I was reading in the news lately about copiers, scanners, and other devices (ATM's, anyone???), that have have been stolen and possibly personal information compromised from recovered deleted files. I find this scarey with all the personal stuff I've copied over the years, ATM's I've used, and airline tickets that have been scanned.

Is there any code available that can be inserted during a kernel build, so that 'rm' calls become some sort of secure over-writing during deletion? Maybe even only 1 pass is necessary. I know tools are available for this manually after the fact (and they are of dubious value in journaling file systems). I think a kernel based system is the only possible way to go.

(I thought about encrypted files systems; however, if they have stolen the entire device, they probably have the key too!)

I am just thinking of all of the embedded devices and shared use terminals that use Linux, writing temporary files all over the place.

Any ideas if such kernel code options exists?

Old 03-18-2007, 12:28 PM   #2
LQ Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
I haven't heard of any, but would that not be slow? To overwrite each file during deletion, for example, would slow down the system considerably. For example if you use shred to do the job manually you'll notice that one or two or a few rounds won't make a difference on small files, but then again, it's not that secure. To get something done for sure you would need to do the loop quite a many times (at least some dozens I imagine), and even if that works for small files, try to do that for big files. I would rip my hair off doing that. And surely not everything on your harddisk is so valuable that you'd need to shred it (for example temporary files created during surfing, so it's no use to overwrite all deleted files. In my opinion a better way is to encrypt those files you consider really valuable, and if they're really that valuable, maybe use a portable disk for them and lock it up in a bank or something for the time you aren't looking after it. And when it comes to getting rid of the disk, then spend a night or two shredding the files or doing something else similar, maybe even open the thing up, spit on it and play around with magnets.

You are correct, it's scary, but then again your personal data is more probably "stolen" when you talk on the phone (somebody's listening to it or recording it), send emails (unless you encrypt each one of them, and I bet you don't) or talk to a friend (did you check the painting for microphones?). Getting your [device name here] stolen and read, after breaking up the encryption and recovering deleted files doesn't sound that probable. And if you do encrypt the files, why on earth would you write the key on the device (you said "if they have stolen the entire device, they probably have the key too", but that doesn't sound probable if you only have the key in your mind and not physically anywhere)? First step of security is to not have keys hanging around for anybody to read.

What you are afraid of is in my opinion just as probable as somebody sniffing your machine without you knowing it. The bad side is, it's probably easier to sniff than steal the whole machine, and probably more difficult to prevent sniffing than prevent stealing&reading your personal data physically.

Interesting if you find some way to get the kernel do some "low level deleting", but I call it a waste of time and resources. There are better ways to achieve the same level of security, and no way to get 100% bullet-proof security.
Old 03-18-2007, 12:49 PM   #3
Registered: Dec 2002
Posts: 304

Rep: Reputation: 86
I've read, and knowing a little about forensics I wouldn't be surprised if it was true, that you only need to overwrite a file once to securely delete it. The only reason why the government requires more passes is just incase sometime in the future someone figures out how to recover overwritten files. Plus they require more passes because there threat model is much bigger than the average Joe. Any sensitive material I want to delete I just use one pass.

Last edited by OlRoy; 03-18-2007 at 12:51 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ReiserFS secure deletion question... youngstructural Linux - Security 9 11-26-2006 08:01 PM
LXer: University of Michigan Selects SSH Tectia for Secure System Administration and Secure File Transfers LXer Syndicated Linux News 0 04-25-2006 12:54 AM
secure file deletion shawn59 Linux - Security 2 06-12-2005 09:00 PM
Secure Deletion with RAID5 array neilschelly Linux - Security 2 12-05-2004 06:25 PM
kernel level file locking programmatically cbalaji Programming 2 02-17-2004 10:44 PM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:30 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration