File with same number of bytes saved on same location on h..

Name

Distinguished
Jan 12, 2003
160
0
18,680
Archived from groups: comp.sys.ibm.pc.hardware.storage (More info?)

Hello. I want to overwrite a file's old contents on the hard drive
(an NTFS partition), and was wondering if anyone knows for sure
whether this would work: open the file, change every byte to some
random value, and save the file. I'm not sure, will it be saved on
the same location on the hard drive, over the old one on disk? (I
realize there are utilities for doing file wiping, but I need this for
a bit more.)
 
G

Guest

Guest
Archived from groups: comp.sys.ibm.pc.hardware.storage (More info?)

dave_nul@hotmail.com (name) wrote:

> Hello. I want to overwrite a file's old contents on the hard drive
> (an NTFS partition), and was wondering if anyone knows for sure
> whether this would work: open the file, change every byte to some
> random value, and save the file. I'm not sure, will it be saved on
> the same location on the hard drive, over the old one on disk? (I
> realize there are utilities for doing file wiping, but I need this for
> a bit more.)

Actually, what you describe is the way security wipe software works.

Just one comment: Don't overwrite the entire file in a single step, you may
have a memory shortage on large files, use successive block writes instead,
until you hit the EOF (or file size). ;-)

Regards, Zvi
--
NetZ Computing Ltd. ISRAEL www.invircible.com www.ivi.co.il (Hebrew)
InVircible Virus Defense Solutions, ResQ and Data Recovery Utilities
 
G

Guest

Guest
Archived from groups: comp.sys.ibm.pc.hardware.storage (More info?)

"Zvi Netiv" <support@replace_with_domain.com> wrote in message news:7dkuo01ahkqjjhmj7piogr3a0lib69inpk@4ax.com
> dave_nul@hotmail.com (name) wrote:
>
> > Hello. I want to overwrite a file's old contents on the hard drive
> > (an NTFS partition), and was wondering if anyone knows for sure
> > whether this would work: open the file, change every byte to some
> > random value, and save the file. I'm not sure, will it be saved on
> > the same location on the hard drive, over the old one on disk? (I
> > realize there are utilities for doing file wiping, but I need this for
> > a bit more.)
>
> Actually, what you describe is the way security wipe software works.

Probably not. I wouldn't trust it one bit if it did.

>
> Just one comment: Don't overwrite the entire file in a single step, you may
> have a memory shortage on large files, use successive block writes instead,
> until you hit the EOF (or file size). ;-)
>
> Regards, Zvi
 
G

Guest

Guest
Archived from groups: comp.sys.ibm.pc.hardware.storage (More info?)

Previously name <dave_nul@hotmail.com> wrote:
> Hello. I want to overwrite a file's old contents on the hard drive
> (an NTFS partition), and was wondering if anyone knows for sure
> whether this would work: open the file, change every byte to some
> random value, and save the file. I'm not sure, will it be saved on
> the same location on the hard drive, over the old one on disk? (I
> realize there are utilities for doing file wiping, but I need this for
> a bit more.)

This works, unless you have a journalling filesystem or a filesystem
that does fragments (use not filled end-blocks for several files).
I am not aware of any filesystem that does this fragment usage,
although it was planned for ext2 at some time if I remember correctly.

In a journalling filesystem the original blocks will still be
overwritten, but there may be stuff in the journal that will not be
overwritten. NTFS is not journalling.

One thing you need to make sure of is that the blocks are flushed
to disk _before_ you delete the file (if you do). Otherwiese
the OS buffer-cache might see the deletion before it writes
the blocks to disk and just cancel the operation. The HDD
buffer is no problem here, since the HDD is not aware of the
filesystem. The HDD buffer may have an impact if you do
multiple overwrites.

Arno
--
For email address: lastname AT tik DOT ee DOT ethz DOT ch
GnuPG: ID:1E25338F FP:0C30 5782 9D93 F785 E79C 0296 797F 6B50 1E25 338F
"The more corrupt the state, the more numerous the laws" - Tacitus
 
G

Guest

Guest
Archived from groups: comp.sys.ibm.pc.hardware.storage (More info?)

"Folkert Rienstra" <see_reply-to@myweb.nl> wrote:

> "Zvi Netiv" <support@replace_with_domain.com> wrote in message news:7dkuo01ahkqjjhmj7piogr3a0lib69inpk@4ax.com
> > dave_nul@hotmail.com (name) wrote:
> >
> > > Hello. I want to overwrite a file's old contents on the hard drive
> > > (an NTFS partition), and was wondering if anyone knows for sure
> > > whether this would work: open the file, change every byte to some
> > > random value, and save the file. I'm not sure, will it be saved on
> > > the same location on the hard drive, over the old one on disk? (I
> > > realize there are utilities for doing file wiping, but I need this for
> > > a bit more.)
> >
> > Actually, what you describe is the way security wipe software works.
>
> Probably not. I wouldn't trust it one bit if it did.

Does your assertion stem from positive knowledge that it doesn't work that way,
or lack of? How do you think it should work so that you can trust it? ;)

Regards

> > Just one comment: Don't overwrite the entire file in a single step, you may
> > have a memory shortage on large files, use successive block writes instead,
> > until you hit the EOF (or file size). ;-)
--
NetZ Computing Ltd. ISRAEL www.invircible.com www.ivi.co.il (Hebrew)
InVircible Virus Defense Solutions, ResQ and Data Recovery Utilities
 
G

Guest

Guest
Archived from groups: comp.sys.ibm.pc.hardware.storage (More info?)

"Zvi Netiv" <support@replace_with_domain.com> wrote in message news:t7u0p09hs0veb4bbod6ba2c7glvh0gk6f6@4ax.com
> "Folkert Rienstra" <see_reply-to@myweb.nl> wrote:
> > "Zvi Netiv" <support@replace_with_domain.com> wrote in message news:7dkuo01ahkqjjhmj7piogr3a0lib69inpk@4ax.com
> > > dave_nul@hotmail.com (name) wrote:
> > >
> > > > Hello. I want to overwrite a file's old contents on the hard drive
> > > > (an NTFS partition), and was wondering if anyone knows for sure
> > > > whether this would work: open the file, change every byte to some
> > > > random value, and save the file. I'm not sure, will it be saved on
> > > > the same location on the hard drive, over the old one on disk? (I
> > > > realize there are utilities for doing file wiping, but I need this for
> > > > a bit more.)
> > >
> > > Actually, what you describe is the way security wipe software works.
> >
> > Probably not. I wouldn't trust it one bit if it did.
>
> Does your assertion stem from positive knowledge that it doesn't work that way,

Was that a question?

> or lack of?

What does 'Probably not' sound like to you?

> How do you think it should work so that you can trust it? ;)

I expect 'security wipe software' to erase a full drive on the physical level.
A security delete software like Incinerate -and what have you- on the other hand
that add a secure bin or replace the recycle bin may work like explained above.

>
> Regards
>
> > > Just one comment: Don't overwrite the entire file in a single step, you may
> > > have a memory shortage on large files, use successive block writes instead,
> > > until you hit the EOF (or file size). ;-)