Blog | G5 Cyber Security

HDD Data Recovery: Can Deleted Files be Traced?

TL;DR

Yes, data from cleaning and volume operations on a HDD can often be traced back, though the difficulty varies. Standard deletion doesn’t erase data; it just marks space as available. Forensic tools and techniques can recover this ‘deleted’ information. Secure wiping methods are needed to truly prevent recovery.

Understanding How Data is Stored

Before we look at tracing, let’s understand how HDDs work:

Tracing Deleted Files and Volume Changes

Here’s how deleted files and volume changes can be traced:

1. Standard Deletion Recovery

  1. Data recovery software: Tools like Recuva, TestDisk, or PhotoRec scan the HDD for file signatures and reconstruct deleted files. These are effective if the data hasn’t been overwritten.
  2. File carving: This technique identifies file types based on their headers and footers, even without a file system structure.

Example using Recuva (simplified):

recuva /path/to/drive

2. Recovering Data After Formatting

  1. File System Analysis: Tools can analyse the remaining file system structures to identify previously existing files and directories.
  2. Raw Recovery: If the file system is severely damaged, raw recovery scans the entire disk for known file types. This takes longer but can find more data.

TestDisk can be used for partition table analysis:

testdisk /path/to/drive

3. Tracing Volume Operations (Partition Changes)

  1. Partition Table Analysis: The Master Boot Record (MBR) or GUID Partition Table (GPT) stores information about partitions. Forensic tools can examine these tables to see past partition layouts.
  2. Journaling File Systems: File systems like NTFS and ext4 keep logs of changes, including partition creation/deletion. These journals can be analysed for historical data.
  3. Disk Imaging: Creating a full disk image allows you to analyse the drive without modifying it. This is crucial for forensic investigations. Use tools like dd or FTK Imager.

Example using dd (Linux/macOS) to create a disk image:

dd if=/dev/sda of=disk_image.img bs=4096 conv=sync,noerror status=progress

4. Forensic Tools

Preventing Data Recovery

If you need to securely wipe a drive, standard deletion or formatting isn’t enough:

1. Secure Erase

  1. Overwrite the entire disk: Use tools that overwrite every sector of the HDD multiple times with random data.
  2. DBAN (Darik’s Boot and Nuke): A free tool specifically designed for secure wiping.
  3. Operating System Tools: Some operating systems have built-in secure erase functions.

Example using DBAN:

2. Physical Destruction

  1. Degaussing: Uses a strong magnetic field to erase data.
  2. Shredding/Physical Disassembly: The most secure method, but renders the drive unusable.

Important Considerations

Exit mobile version