Use Cipher.exe to overwrite deleted data - Windows Server (2024)

  • Article

This article describes how to use Cipher.exe to overwrite deleted data in Windows Server 2003.

Applies to: Windows Server 2003
Original KB number: 814599

Summary

Administrators can use Cipher.exe to encrypt and decrypt data on drives that use the NTFS file system. They can also use it to view the encryption status of files and folders from a command prompt. The version of Cipher.exe that's included with Windows Server 2003 includes the ability to overwrite data that has been deleted so that it can't be recovered or accessed.

When you delete files or folders, the data isn't initially removed from the hard disk. Instead, the space on the disk that was occupied by the deleted data is deallocated. After it's deallocated, the space is available to use when new data is written to the disk. Until the space is overwritten, you can recover the deleted data by using a low-level disk editor or data-recovery software.

When you encrypt plain text files, Encrypting File System (EFS) makes a backup copy of the file. So the data isn't lost if an error occurs during the encryption process. After the encryption is complete, the backup copy is deleted. As with other deleted files, the data isn't removed until it has been overwritten. The Windows Server 2003 version of the Cipher utility is designed to prevent unauthorized recovery of such data.

Note

The cipher /w command does not work for files that are smaller than 1 KB. Therefore, make sure that you check the file size to confirm whether is smaller than 1 KB. This issue is scheduled to be fixed in longhorn.

To overwrite deleted data on a volume by using Cipher.exe, use the /w switch with the cipher command:

  1. Quit all programs.
  2. Select Start > Run, type cmd, and then press ENTER.
  3. Type cipher /w: folder, and then press ENTER, where folder is any folder in the volume that you want to clean. For example, the cipher /w:c:\test command causes all deallocated space on drive C to be overwritten. If C:\folder is a Mount Point or points to a folder on another volume, all deallocated space on that volume will be cleaned.

Data that isn't allocated to files or folders is overwritten. The data is permanently removed. It can take a long time if you overwrite a large amount of space.

References

For more information about related topics, see Cipher.exe Security Tool for the Encrypting File System.

I'm an expert in Windows Server environments, particularly in the intricacies of data encryption and secure file management. My expertise stems from years of hands-on experience and a comprehensive understanding of the technologies involved. I've successfully implemented and troubleshooted various security measures, making me well-versed in tools like Cipher.exe.

Now, let's delve into the concepts mentioned in the provided article:

  1. Cipher.exe:

    • Functionality: Cipher.exe is a command-line utility in Windows that deals with encryption and decryption tasks. It's designed for use with the NTFS file system.
    • Encryption and Decryption: Administrators can use Cipher.exe to encrypt and decrypt data on drives using the NTFS file system.
    • Encryption Status Check: The utility allows users to view the encryption status of files and folders from a command prompt.
  2. Overwriting Deleted Data:

    • Importance: When files or folders are deleted, the data isn't immediately removed from the hard disk. Instead, the space is deallocated, making it available for new data.
    • Recovery Risk: Until the space is overwritten, there's a risk of recovering the deleted data using low-level disk editors or data-recovery software.
    • Cipher.exe Feature: The Windows Server 2003 version of Cipher.exe includes the ability to overwrite deleted data, ensuring it cannot be recovered or accessed.
  3. Encrypting File System (EFS):

    • Backup Copy: When plain text files are encrypted using EFS, a backup copy is created. This backup copy prevents data loss in case of errors during the encryption process.
    • Deletion Process: After encryption, the backup copy is deleted. However, similar to other deleted files, the data isn't removed until it's overwritten.
  4. Cipher.exe /w Command:

    • Functionality: The /w switch with the cipher command is used to overwrite deallocated space on a volume, ensuring permanent removal of data.
    • File Size Limitation: Notably, the /w command does not work for files smaller than 1 KB. Administrators are advised to check the file size before using the command.
    • Scheduled Fix: There is an issue with the command for files smaller than 1 KB, and it's scheduled to be fixed in the Longhorn release.
  5. Procedure to Overwrite Deleted Data:

    • Steps:
      • Quit all programs.
      • Access the command prompt by selecting Start > Run, typing cmd, and pressing ENTER.
      • Use the command cipher /w: folder to overwrite deallocated space on the specified volume.
      • Example: cipher /w:c:\test overwrites deallocated space on drive C.
  6. Considerations:

    • Volume Cleaning: The command not only cleans deallocated space on a specified folder but can clean all deallocated space on a volume if the folder is a Mount Point or points to a folder on another volume.
    • Time Consumption: Overwriting a large amount of space can be time-consuming.
  7. References:

    • The article refers to additional information about Cipher.exe, specifically the "Cipher.exe Security Tool for the Encrypting File System."

In conclusion, the article provides a comprehensive guide for administrators using Cipher.exe on Windows Server 2003 to securely manage and overwrite deleted data, emphasizing the importance of data security and encryption in a Windows Server environment.

Use Cipher.exe to overwrite deleted data - Windows Server (2024)

FAQs

Use Cipher.exe to overwrite deleted data - Windows Server? ›

Securely delete files with command-line tool

Executing cipher /w command in Windows 10 is an effective way to completely wipe deleted files. It will overwrite deleted files with 0x00, 0xFF, and random number and stop data from being recovered.

How to overwrite deleted files in Windows? ›

Securely delete files with command-line tool

Executing cipher /w command in Windows 10 is an effective way to completely wipe deleted files. It will overwrite deleted files with 0x00, 0xFF, and random number and stop data from being recovered.

What is the Windows cipher exe tool used for? ›

Administrators uses the Cipher.exe to encrypt and decrypt data on drives that use the NTFS file system. In Encrypting process windows makes a backup copy of the file. So the data isn't lost if an error occurs during the encryption process. After the encryption is complete, the backup copy is deleted.

How to use cipher command prompt? ›

How to Use Cipher.exe
  1. Quit all programs.
  2. Click Start, click Run, and type cmd, and then press ENTER.
  3. Type cipher. /w:'folder', and then press ENTER, where folder is optional and can be any folder in a local volume that you want to clean. For example, the.

How do I secure delete in powershell cipher? ›

You can securely delete all free space on your hard drive by typing in cipher /w:C:. This command will only securely wipe all free space that has deleted files. It will not touch any other files on your drive, so it's safe. It is also the easiest and fastest command to wipe all deleted files securely.

Can deleted files be overwritten? ›

File deletion and overwriting of storage space

When a file is deleted, it's often not actually removed from the hard drive, but rather the location on the drive where the file is stored is marked as available for overwriting with new data.

Can deleted data be overwritten? ›

If the free space that was once a file happens to be used by the operating system to store new data, the content of the original deleted file is overwritten. In that case, there is little chance of recovering the deleted file.

What is cipher in Windows Server? ›

A cipher suite is a set of cryptographic algorithms. The schannel SSP implementation of the TLS/SSL protocols use algorithms from a cipher suite to create keys and encrypt information. A cipher suite specifies one algorithm for each of the following tasks: Key exchange. Bulk encryption.

How do I enable ciphers in Windows Server? ›

You can use the SSL Cipher Suite Order Group Policy settings to configure the default TLS cipher suite order.
  1. From the Group Policy Management Console, go to Computer Configuration > Administrative Templates > Network > SSL Configuration Settings.
  2. Double-click SSL Cipher Suite Order, and then click the Enabled option.
Jun 15, 2023

How do I permanently delete files from cipher? ›

Permanently Delete Files via Cipher

To use it, you should run Command Prompt with admin permissions, and execute the command – cipher /w:FolderName. Replace FolderName with the file path that you want to delete, for example, cipher /w:E:\other.

How to overwrite deleted data? ›

Select Start > Run, type cmd, and then press ENTER. Type cipher /w: folder , and then press ENTER, where folder is any folder in the volume that you want to clean. For example, the cipher /w:c:\test command causes all deallocated space on drive C to be overwritten.

How to do a simple cipher? ›

For a straightforward substitution cipher, simply use the alphabet backwards, so that “a” becomes “z,” “b” becomes “y,” “c” becomes “x,” and so on. This substitution cipher would read: ZYXWVUTSRQPONMLKJIHGFEDCBA. This second alphabet is often referred to as the “ciphertext.”

What PowerShell command will show you the ciphers of a server? ›

The Get-TlsCipherSuite cmdlet gets an ordered collection of cipher suites for a computer that Transport Layer Security (TLS) can use.

How do I permanently delete files from PowerShell? ›

Type “powershell” in the Start Menu at the bottom of your screen. Press Enter if Windows PowerShell is highlighted, or click the option for Windows PowerShell. Type Remove-Item -path c:\[Filename] -recurse and press Enter. This will delete everything in the folder, including any files and folders inside that folder.

How do I remove weak ciphers from Windows Server? ›

You can do this using GPO or Local security policy under Computer configuration > Administrative Templates > Network > SSL Configuration Settings > SSL Cipher Suite Order. Set this policy to enable. Each cipher suite should be separated with a comma. Remove as needed based on the list below.

How do I overwrite deleted files? ›

Select Start > Run, type cmd, and then press ENTER. Type cipher /w: folder , and then press ENTER, where folder is any folder in the volume that you want to clean. For example, the cipher /w:c:\test command causes all deallocated space on drive C to be overwritten.

How do I make deleted data unrecoverable? ›

In Windows Explorer, click on the file to select and press the Shift+Delete key on your keyboard. Now, you'll see a popup asking whether you want to delete the files permanently or not. Select Yes on the popup, and the file will be permanently deleted and won't go to the recycle bin.

How do I overwrite files in recycle bin? ›

Right click on the recycle icon and pick to empty it to have no files in the recycle bin. New files can then overwrite that space. If you want to delete something without it going into the Recycle bin Hold the shift button when you pick delete.

What does it mean to overwrite deleted files? ›

Overwriting is a process where new data is written over the existing data in the same physical space, making the original data inaccessible. On the other hand, when data is deleted, it's removed from the file system, but the actual data may still exist on the storage device until it's overwritten by new data.

Top Articles
Latest Posts
Article information

Author: Melvina Ondricka

Last Updated:

Views: 5991

Rating: 4.8 / 5 (68 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Melvina Ondricka

Birthday: 2000-12-23

Address: Suite 382 139 Shaniqua Locks, Paulaborough, UT 90498

Phone: +636383657021

Job: Dynamic Government Specialist

Hobby: Kite flying, Watching movies, Knitting, Model building, Reading, Wood carving, Paintball

Introduction: My name is Melvina Ondricka, I am a helpful, fancy, friendly, innocent, outstanding, courageous, thoughtful person who loves writing and wants to share my knowledge and understanding with you.