Cipher Command - Overwrite Deleted Data in Windows

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.



Steps:

1. Open an elevated command prompt.

2. Type the command below, and press Enter.

The syntax required is:
Code:
cipher /w:[drive]:\[folder]
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
cip1.png

   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.

Regards,
Golden


 
Last edited by a moderator:
Thanks Golden! I just learned something new. :thumbsup:
 

My Computer

Computer 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(s)
EVGA GeForce GTX 460 superclocked
Sound Card
Integrated
Monitor(s) Displays
ViewSonic 23" LCD
Screen Resolution
1980 x 1080
Hard Drives
120 Gb Samsung 840 Pro SSD
120 Gb Kingston Hyper X SSD
1 Tb WD Caviar Black HDD
PSU
Coolermaster 1000 watt modular
Case
Coolermaster HAF X full tower
Cooling
Coolermaster Hyper 212 plus
Keyboard
Logitech USB
Mouse
Microsoft 3 button
Internet Speed
download 1.5 Mb/sec upload 300Kb/sec
No worries mate - glad you found it useful.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Golden Mk. I.4
OS
Windows 10 Pro x64 ; Xubuntu x64
CPU
Intel i7 860 @ 2.80 GHz O/C'ed to 4.0GHz
Motherboard
Gigabyte P55A-UD3R Rev.1. Award BIOS F13
Memory
16GB Corsair Vengance DDR3 @ 661 MHz Dual Channel (9-9-9-24)
Graphics Card(s)
EVGA NVidia GTX 560 1024MB
Sound Card
Realtek Integrated
Monitor(s) Displays
Dual Samsung SyncMaster 2494HS
Screen Resolution
1920*1080 and 1920*1080
Hard Drives
1*Samsung 840 EVO 120GB SSD;
1*OCZ Vertex 2 60GB SSD;
2*Samsung F3 SpinPoint 1TB in RAID0;
1*Samsung F1 SpinPoint 1TB;
2*Western Digital 1TB External USB 3.0
1*Western Digital 500GB External USB 3.0
1*Seagate 500GB External USB 2.0
PSU
Thermaltake ToughPower QFan 750W
Case
Thermaltake Element S VK60001W2Z
Cooling
Corsair H60 Water Cooling, 2*230mm and 2*80mm case fans
Keyboard
Logitech G110
Mouse
Logitech MX518
Very nice :)
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom assembled by me :}
OS
Win-7-Pro64bit 7-H-Prem-64bit
CPU
i7-5930K 2nd i9-9940x both water blocked VRM's too
Motherboard
ASUS SABERTOOTH X99 2nd ASUS x299 Apex
Memory
Trident-z 3200C14 2nd Trident-z 3600C16
Graphics Card(s)
EVGA 1080ti ftw3 2nd Titan Xp both water blocked
Sound Card
Built-in Realtek
Monitor(s) Displays
1-AOC G2460PG 24"G-Sync 144Hz/ 2nd 1-ASUS VG248QE 24" 144Hz
Screen Resolution
1920 x 1080 144Hz
Hard Drives
2-Samsung M.2 Evo & Evo Plus
2-Samsung 850 EVO 500GB SSD's/ 3-2.5 W.D. Black 1tb-&3-1tb/3-3.5 WD Black 1tb hdd's
PSU
EVGA SuperNOVA 1000-P2 2nd 1200-P2
Case
2-Corsair Obsidian Series 450D Black ATX Mid Tower
Cooling
Custom water loops
Keyboard
Logitech G710+/ 2nd Logitech G910
Mouse
2-RedDragon M901 Perdition 16400 dpi Gaming mouse = wired
Internet Speed
Comcast Ping 19ms 89.31mbps download speed 6.12mbps upload
Antivirus
Malwarebytes Pro/ Superantispyware Pro
Browser
FireFox & Pale moon
Other Info
2nd ASUS X299 Apex/Intel i9-9940x with Custom water loop/7H-Prem-x64/Corsair 450D case/Ram Trident-z 3600C16 4x8gb / Samsung970Evo plus 500gb SSD/Dual ssd EZ swap evo/PSU EVGA SuperNova 1200w-P2 80+Platinum/GPU Titan Xp /8-ML-140 on push-pull on 2-280GTX rads
Great tutorial. Thank you.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Built
OS
Windows 10 Pro
CPU
AMD Ryzen 5 2400G Processor with Radeon RX Vega 11 Graphics
Motherboard
ASRock X470 Master SLI/AC AM4 AMD Promontory X470 SATA 6Gb/s
Memory
G.SKILL Ripjaws V Series 16GB (2 x 8GB) 288-Pin DDR4 SDRAM D
Graphics Card(s)
2047MB NVIDIA GeForce GTX 1060 6GB (EVGA)
Sound Card
Motherboard Built in
Monitor(s) Displays
Acer R240HY bidx 23.8-Inch IPS HDMI DVI VGA (1920 x 1080) Wi
Screen Resolution
1920 x 1080
Hard Drives
1TB Sandisk SSD PLUS (Main drive)
500 GB Seagate 7200 RPM (Games)
500 GB Western Digital 7200 RPM (Virtual Machines)
PSU
CORSAIR TX Series TX650M 650W 80+ Gold Modular Power Supply
Case
CORSAIR CARBIDE SPEC-02 Mid-Tower Gaming Case, Red LED Fan
Cooling
220mm, two 120mm, and four 60mm fans
Keyboard
Wired Dell keyboard
Mouse
Wireless Logitech mouse
Internet Speed
250mb down, 30mb up
Antivirus
Panda Cloud Antivirus
Browser
Chrome-ish x64
Other Info
Your awesome for reading this.
Wiping areas of a disk with no partition

One of my disks is a backup disk with one partition of 100gb, 400gb remains un-partitioned i was wondering if theirs a way to cipher this disk as it has previously had data on it. Or if theirs a way to select a whole disk to cipher.

Thanks
Toby
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
custom build
OS
windows 7 pro 64 bit
CPU
pentuim g4400
Motherboard
asrock pro4 z170
Memory
2*8gb ripjaws V @2113mhz
Monitor(s) Displays
HP L1908w
Screen Resolution
1440*900 - 60Hz
Hard Drives
WD blue 500gb*2
PSU
Consier CX600M
Case
Cit Neptune
Cooling
Intel stock fan+ Case fan
Keyboard
Logitech
Mouse
Nikkai
Internet Speed
gb-ethernet
Antivirus
Microsoft security essentuals
Browser
Chrome
No, since no partition exists, there is nothing to overwrite.

You need to create an empty partition, run cipher on it, then remove the partition again if you feel you need to overwrite any historical data that was there.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Golden Mk. I.4
OS
Windows 10 Pro x64 ; Xubuntu x64
CPU
Intel i7 860 @ 2.80 GHz O/C'ed to 4.0GHz
Motherboard
Gigabyte P55A-UD3R Rev.1. Award BIOS F13
Memory
16GB Corsair Vengance DDR3 @ 661 MHz Dual Channel (9-9-9-24)
Graphics Card(s)
EVGA NVidia GTX 560 1024MB
Sound Card
Realtek Integrated
Monitor(s) Displays
Dual Samsung SyncMaster 2494HS
Screen Resolution
1920*1080 and 1920*1080
Hard Drives
1*Samsung 840 EVO 120GB SSD;
1*OCZ Vertex 2 60GB SSD;
2*Samsung F3 SpinPoint 1TB in RAID0;
1*Samsung F1 SpinPoint 1TB;
2*Western Digital 1TB External USB 3.0
1*Western Digital 500GB External USB 3.0
1*Seagate 500GB External USB 2.0
PSU
Thermaltake ToughPower QFan 750W
Case
Thermaltake Element S VK60001W2Z
Cooling
Corsair H60 Water Cooling, 2*230mm and 2*80mm case fans
Keyboard
Logitech G110
Mouse
Logitech MX518
Thanks
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
custom build
OS
windows 7 pro 64 bit
CPU
pentuim g4400
Motherboard
asrock pro4 z170
Memory
2*8gb ripjaws V @2113mhz
Monitor(s) Displays
HP L1908w
Screen Resolution
1440*900 - 60Hz
Hard Drives
WD blue 500gb*2
PSU
Consier CX600M
Case
Cit Neptune
Cooling
Intel stock fan+ Case fan
Keyboard
Logitech
Mouse
Nikkai
Internet Speed
gb-ethernet
Antivirus
Microsoft security essentuals
Browser
Chrome
usage of Cipher creates EFSTMPWP folder, so does anyone knows whats EFSTMPWP meaning ?
nobody knows what stand for hhh Microsoft nevrr told...
 

My Computers

System One System Two

  • Computer type
    PC/Desktop
    OS
    Windows 7 Ultimate 32bit
    Antivirus
    What is that? 👀
    Browser
    IE 9
  • Computer type
    PC/Desktop
    System Manufacturer/Model Number
    𝐖𝐈𝐍𝐃𝐎𝐖𝐒 𝟕 x86
    OS
    AlienOS
    Motherboard
    ALIENZ
    Internet Speed
    2FAST4U
    Antivirus
    What is that? 👀
Back
Top