Code: Select all
If OpenFile(0, filename$)
For i = 1 To 7
FileSeek(0,0)
For j= 1 To Lof(0)
WriteByte(0,0)
Next
Next
CloseFile(0)
DeleteFile(filename$)
EndIf
Code: Select all
If OpenFile(0, filename$)
For i = 1 To 7
FileSeek(0,0)
For j= 1 To Lof(0)
WriteByte(0,0)
Next
Next
CloseFile(0)
DeleteFile(filename$)
EndIf
From my understanding they will. But to really be secure it should be filled with random bytes a couple of times I've heard.Can I be sure the written bytes are going exactly where the existing bytes are?
9. Conclusion
Data overwritten once or twice may be recovered by subtracting what is expected to be read from a storage location from what is actually read. Data which is overwritten an arbitrarily large number of times can still be recovered provided that the new data isn't written to the same location as the original data (for magnetic media), or that the recovery attempt is carried out fairly soon after the new data was written (for RAM). For this reason it is effectively impossible to sanitise storage locations by simple overwriting them, no matter how many overwrite passes are made or what data patterns are written. However by using the relatively simple methods presented in this paper the task of an attacker can be made significantly more difficult, if not prohibitively expensive.
If anyone wants to recover data from HDD then this will be main problem for them.Data overwritten once or twice may be recovered by subtracting what is expected to be read from a storage location from what is actually read
This is how windows explorer deletes files, it just removes it from allocation table but actual contents of file are still on HDD. netmaestro's code writes new data at same location so recovery is impossible.Data which is overwritten an arbitrarily large number of times can still be recovered provided that the new data isn't written to the same location as the original data
No, that is not the meaning of that text.cas wrote: This is how windows explorer deletes files, it just removes it from allocation table but actual contents of file are still on HDD. netmaestro's code writes new data at same location so recovery is impossible.
New data is written to the same location....can still be recovered provided that the new data isn't written to the same location
How could be be sure aboud that?cas wrote: My point is that let's say i have a file that i want to securely erase. Use code from first post and all data will be erased (overwritten):
New data is written to the same location....can still be recovered provided that the new data isn't written to the same location![]()
only file metadata will stay and 100% file recovery will be impossible, even 0,1% of file recovery will be impossible.
That is indeed a problem. If you really are concerned with safety you need to encrypt the disk. TrueCrypt or similar could secure you disk, without problems with SSD's internal relocation, indexation and meta data. But there is a small price in speed and the annoyance of extra passwords.Thorium wrote:On magnetic HDD's the position of the write head is not allways 100% the same. So with some luck you can read out the erased file by analysing the surface of the disk. Thats what Trond was meaning. You need special equipment for that.
It's simple. If i want to change one byte on file with another then this will be done directly at same position. Only if i am adding new data to file then i don't know where on disk will this new data be written (but that's not the case here).Thorium wrote:How could be be sure aboud that?
First to say that you can't say "SSD HD" - that means "solid state drive hard disk", SSD is not hard disk.Thorium wrote:For example SSD HD's switching the chips to garantee a minimum of writes to every single chip. The chip will not be erased on switch.
This is just one example.
That would mean if i want to download purebasic installation file then probably i will loose some other file on hdd because position of write track is not always the same and it goes over other sectors when writing new data?Thorium wrote:On magnetic HDD's the position of the write head is not allways 100% the same.
:roll:Thorium wrote:So with some luck you can read out the erased file by analysing the surface of the disk.
Hey, don't need to be so rude, i respect everyone on this forum. I want to understand you and your english isn't bad.Thorium wrote:Sorry but you have misunderstood what i have written. Maybe it's my poor english, or maybe you don't want to understand.
Sorry but i can say the same thing for you.Thorium wrote:It doesn't madders, what you are writting is wrong.
HD is a term of mechanic drive that can be removable. You have USB cases in which you put them and they are then removable (portable).Thorium wrote:First HD is a term for a disk that is not removable.
Yes, i know that there is no perfect thing on this world. What are you saying was probably true when first HDD's were on market, then were probably best chances to recover data after overwriting. Today, this additional track width added for tolerance is so small that you have less than 1% of chance to recover one byte, imagine what chances are to recover 1MB or more of real, reusable data, which was there before secure erasing...Thorium wrote:On magnetic HD's the write head will not go over another sector. But there are a tollerance, like every machanic constuction have. A tollerance of 0 is impossible. So the position of the write within one sector can differ.