How to Overwrite Deleted Data using the "Cipher" Command in Windows
Information
The Windows cipher command line tool is predominantly used to manage the encryption status of NTFS volumes. A lesser known function of this command is the ability to securely overwrite free disk space.
Files deleted on a volume are only marked for deletion and can still be recovered. By using the cipher command, the free space occupied by the deleted files are securely overwritten resulting in a more secure system in which the previously deleted files cannot be recovered.
The advantage of using the cipher command is that it ONLY overwrites free disk space - the remainder of the volume is untouched. The cipher command can be run from a booted system without the need to dismount volumes/partitions/disks, or to resort to more complex tools.
This tutorial will show you how to securely wipe or overwrite free disk space on any partition or disk using the inbuilt cipher command in Windows.
where [drive] = drive letter, [folder] = folder name
In the example below, I wish to wipe all free disk space on my F drive (a logical partition on a physical disk). Thus, I use the following syntax:
Code:
cipher /w:F:\
The output from the cipher command is shown below. The free space is overwritten 3 times:
once with a series of 0's (zero)
once with a series of 255's
once with a series of random numbers
Note
Disks with large amounts of free space will take some time to be overwritten - on my system, wiping 25 GB of free space takes approximately 10 minutes.
System Manufacturer/Model Number Customized build from CyberPower OS Windows 7 Home Premium 64bit SP 1 CPU Intel i5 2500k Motherboard Asus P8P67 Deluxe Memory 8 gigabytes Corsair PC3-12800 DDR3 Graphics Card EVGA GeForce GTX 460 superclocked Sound Card Integrated Monitor(s) Displays ViewSonic 23" LCD Screen Resolution 1980 x 1080
Keyboard Logitech USB Mouse Microsoft 3 button PSU Coolermaster 1000 watt modular Case Coolermaster HAF X full tower Cooling Coolermaster Hyper 212 plus Hard Drives 120 Gb Samsung 840 Pro SSD
120 Gb Kingston Hyper X SSD
1 Tb WD Caviar Black HDD Internet Speed download 1.5 Mb/sec upload 300Kb/sec
Computer type PC/Desktop System Manufacturer/Model Number Golden Mk. I.3 OS Windows 7 Ultimate SP1 (x64) CPU Intel i7 860 @ 2.80 GHz Motherboard Gigabyte P55A-UD3R Rev.1. Award BIOS F13 Memory 16GB Corsair Vengance DDR3 @ 661 MHz Dual Channel (9-9-9-24) Graphics Card EVGA NVidia GTX 560 1024MB Sound Card Realtek Integrated Monitor(s) Displays Dual Samsung SyncMaster 2494HS Screen Resolution 1920*1080 and 1920*1080
Keyboard Logitech G110 Mouse Logitech MX518 PSU Thermaltake ToughPower QFan 750W Case Thermaltake Element S VK60001W2Z Cooling Corsair H60 Water Cooling, 2*230mm and 2*80mm case fans Hard Drives 1*OCZ Vertex 2 60GB SSD;
2*Samsung F3 SpinPoint 1TB in RAID0;
3*Samsung F1 SpinPoint 1TB in RAID5;
1*Western Digital 500GB External USB 3.0
1*Seagate 500GB External USB 2.0 Internet Speed Not fast enough!!! Antivirus MSE and Malwarebytes Pro Browser Chrome Version 25 Other Info Laptop: ASUS X54C, Intel Core i3-2330M @ 2.0Ghz, 4GB RAM, Intel HD on-board graphics, Windows 7 Professional SP1 (x64), LinuxMint 14 (x64), PepperMint 3 (x86)