Sunday, February 3, 2019

security - How to wipe a specific region of a hard drive partition?



I need to wipe (securely erase) a specific part (the last third) of a partition, wiping the whole partition free space is not an option (as other regions contain deleted data that must stay recoverable).



The only idea I can see now is to truncate the partition, create a new partition on the place to wipe and wipe it.




Isn't there a better way? A wiping tool which can start wiping from a specific offset (given in gigagabytes)?



The file system is NTFS, the OS is Windows 7 but I wouldn't mind using a LiveCD of a sort.


Answer



You could use *nix dd (available on any Linux Live CD) with /dev/urandom as source.
seek parameter will tell dd how many blocks to skip on destination device. You may also run it several times of course to make sure any residual is gone. This thread has lots and lots of examples on dd usage.



Warning: dd is very powerful and very indiscriminate. It will happily chew you hdd dead faster than you say 'Oh my..' if you did something wrong!




Make an image of your drive before you start (which dd can be used for as well)



Note: You could also test all your changes on an image which is generally safer, and said image can be also mounted similar to real hdd (so called loop device)


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...