Re: Wipe a file from disk

From: J French (erewhon_at_nowhere.com)
Date: 09/03/04


Date: Fri, 3 Sep 2004 11:27:24 +0000 (UTC)

On Fri, 3 Sep 2004 12:30:21 +0200, "Andy DF" <PrivateType@vb.com>
wrote:

>hi all,
>
>I need to find a way to COMPLETELY delete a file from disk so that not even
>the "Undelete" programs will be able to restore it.
>
>Can it be done?
>Is there a Declare Sub WipeFile ... ?

Funnily enough we had a thread on this recently.

The trick is to open the file in Binary (or Random) mode and overwrite
the data, personally I would write a 'pattern'.

Then close the file,
then open it for Output - this will unlink the 'unused' clusters
then close the file
then delete the file

To get rid of the data you have to overwrite it.
Under the FAT system I am 99.5% certain that when you overwrite an
area of a file, it physically overwrites the existing data

It is possible that this does not happen on file systems that support
rollback - even then I would be surprized

I've often heard that people can recover data even if it it has been
completely overwritten, which is why the UK Ministry of Defence
consigns all scrapped hard drives to an acid bath.

Personally I think this is exaggerated, and that by writing a few
random sequences to the disk, and ensuring that they hit the disk,
there is about as much chance of recovering data as a pig flying.



Relevant Pages

  • Re: Disk over writing software
    ... requirement of cleaning up the data on the hard disk. ... First of all, overwriting an entire filesystem, or larger area of the ... Secure overwrite of filemay be ... be left as it exists - e.g. if a 512 byte sector has been allocated ...
    (comp.os.linux.security)
  • Re: Wipe a file from disk
    ... >>I need to find a way to COMPLETELY delete a file from disk so that not even ... > To get rid of the data you have to overwrite it. ... > Under the FAT system I am 99.5% certain that when you overwrite an ... > I've often heard that people can recover data even if it it has been ...
    (microsoft.public.vb.winapi)
  • Re: Question about secure empty trash/srm
    ... Quoting from the srm man page: ... through normal OS channels to read/write disk blocks. ... drive hardware composes the logical bits/bytes from (a simple overwrite ... With journaling, disk-writes are first committed to the journal file ...
    (comp.sys.mac.system)
  • Re: FileCopy overwrites the existing file
    ... Does the risk level drop if whole disk encryption is used? ... the data stays on the disk before overwrite. ... company's secret (and top data recovery companies cooperate strictly ...
    (microsoft.public.win32.programmer.kernel)
  • Re: secure file deletion
    ... * Overwrite the files/disk to protect yourself ... from someone with software knowledge. ... 'track' on the disk is not exactly the same. ...
    (comp.os.linux.security)