Secure Data Deletion

thismanera
4 min readDec 6, 2023

--

Secure Data Deletion

In today’s world, the Recycle Bin is the most used method when deleting a file. Different to what most people think, when a file is deleted by the usage of the Recycle Bin, the file is not immediately and permanently removed from the hard drive. Instead, what happens is that the file is unallocated from the hard drive impeding the user to access to the file, but the data is still stored inside the drive. In other words, when a file is deleted from your computer, the only data erased from the hard drive is a small bit of information that points to the location of the file. The actual file remains on the hard drive, until it is overwritten by new data.

This allows it retrieving with common software tools, allowing non-authorized actors to read the data if they are able to gain access into the hard drive.

To safely delete a file and ensure that none of its data remains in the filesystem, you need to use secure deletion methods that overwrite the file’s data before removing it.

Methods

Secure deletion methods are techniques or tools designed to permanently and irreversibly remove data from storage media, making it difficult or impossible to recover. The use of these methods allow:

  • Protecting Sensitive Information: Secure deletion is crucial when dealing with sensitive or confidential information. This could include personal data, financial records, proprietary business information, or any other data that should not be accessible to unauthorized individuals.
  • Preventing Data Recovery: Traditional file deletion methods may not completely remove the data from the storage media. Without secure deletion, it’s possible for someone with the right tools and skills to recover deleted files, posing a security risk.
  • Compliance with Regulations: Many industries and organizations are subject to data protection regulations that mandate the secure disposal of sensitive information. Using secure deletion methods helps ensure compliance with regulations such as GDPR, HIPAA, or other regional privacy laws.
  • Preventing Data Leakage: In scenarios where you are disposing of or selling a computer, external hard drive, or other storage devices, secure deletion prevents the risk of data leakage. It ensures that the new owner or recipient cannot recover your personal or sensitive files.

Some popular tools include:

  • Eraser (Windows): A tool that allows you to schedule secure file deletions and overwrite free space on your hard drive.
  • Secure Erase (Linux): Linux systems often have utilities like `shred` or `wipe` that can securely delete files.
  • File Shredder (Mac): Mac users can use tools like “Permanent Eraser” for secure file deletion.

The effectiveness of these methods may depend on the type of storage media, the file system, and the specific tools available for your operating system. Always consider the sensitivity of the data and the security requirements when choosing a method for secure file deletion.

Other Methods

The usage of encryption also allows the user be safe when deleting its data:

  • Encrypt Before Deletion: Encrypting the file before deletion, and then securely deleting the encrypted version. This adds an extra layer of protection, especially if the encryption uses strong algorithms. Some tools like VeraCrypt or BitLocker for full-disk or file-based encryption help in this scenario.
  • Physical Destruction: In extreme cases, physical destruction of the storage media (e.g., shredding the hard drive) is the most secure method. This is often done in situations where the complete destruction of data is critical. However, if chosing this method implies that the drive won’t be used again due to its destruction.
  • Shredding Files: File shredding tools overwrite files with specific patterns or random data before deletion. These tools often provide options for the number of passes and the type of patterns used.

Algorithms

Secure deletion methods employ algorithms to overwrite data on storage media, making it unrecoverable by standard recovery tools. This list contains a brief description of the main deletion known secure deletion of data algorithms:

  • Gutmann Method: The Gutmann method is a secure deletion algorithm that overwrites data 35 times with various patterns. While the original motivation was to cover various magnetic encoding methods, it is considered excessive for modern storage media.
  • DoD 5220.22-M Standard: The U.S. Department of Defense (DoD) 5220.22-M standard specifies a secure deletion method that involves overwriting data three times with specific bit patterns: 0s, 1s, and random. This method is commonly used for secure deletion.
  • Random Data Overwrite: Overwriting data with random patterns is a common and effective secure deletion method. This method involves replacing the original data with randomly generated bits, making it challenging for recovery tools to reconstruct the original content.
  • Zero-Fill (Zeroing): Zero-filling involves overwriting the data with zeros. This is a simple but effective method. Multiple passes may be performed for added security, although the need for multiple passes is debated, especially on modern storage media.

--

--

thismanera

Cybersecurity Analyst with two years of hands-on experience in the field. My content focus lies in the realm of Blue Team Operations.