File Wiping and disk drive clearing in Windows NTFS and FAT
Posted: Fri Jun 24, 2005 8:49 am
BB
Regular
Joined: Jun 23, 2004
Posts: 340
Two open source programs that are useful for permanently
wiping data storage devices or highly sensitive files are
Darik’s Boot and Nuke (DBAN) and Eraser. They can be
downloaded from SourceForge at the following URLs:
Darik's Boot and Nuke ("DBAN") is a self-contained boot floppy that securely wipes the hard disks of most computers. DBAN is appropriate for bulk or emergency data destruction.
Eraser is a secure data removal tool for Windows. It completely removes sensitive data from your hard drive by overwriting it several times with carefully selected patterns.
Here is a C# code sample that will overwrite a file with junk before deleting it.
Code:
//The following .NET class
//illustrates a simple, quick and effective way to ensure
//that delete really means that a file can’t be recovered
//using software alone. The class wipes a file by writing
//zeros in place of each byte of allocated space prior to
//calling the regular file-deletion API:
using System;
using System.IO;
namespace filewipeclass {
class main {
[STAThread]
static void Main(string[] args) {
FileWipe fw = new FileWipe();
fw.Wipe(args[0]);
}
}
class FileWipe {
// File.Delete method only drops FAT/MFT entry
// FileWipe destroys file data first.
public void Wipe(string sPath) {
FileInfo fi = new FileInfo(sPath);
try {
if(fi.Exists) {
FileStream fs = fi.OpenWrite();
for(int a = 0;a < fi.Length;a++) {
fs.WriteByte(0);
}
fs.Close();
}
fi.Delete();
}
catch(Exception e) {System.Console.WriteLine(e);}
}
}
}
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest (c) 2006 by Group29 Productions.
You can syndicate Group29 Productions news with an RSS Feeder using the file backend.php