The VX-Files
The VX-Files
  • README.txt
  • For updates, questions, suggestions or just chatting: @malcrvz
  • Download your own local copy or check my other libre projects: Github/malcrvz
  • 📕Cybersecurity Theory
    • Index
      • Malware types
        • Viruses, worms and Trojans
        • Backdoors, Rootkits and Spyware
        • Botnets, DDoS and Spammer
        • Ransomware
        • Scareware and Adware/PUP/PUA
        • Downloaders and Launchers
        • Hacktool
        • APT - Advanced Persistent Threat
      • Social engineering techniques
        • Phishing
        • Pretexting
        • Baiting
        • Quid pro quo
        • Tailgating
      • Cryptography
        • Hash functions
        • Symmetric, Asymmetric and Hybrid cryptography
        • Digital signatures & Digital certificates
        • TLS Protocol
      • Pentesting methodology & Techniques
        • CIA Triad - Confidentiality, Integrity & Availability
        • The methodology steps
        • Pre-Engagement
        • Information Gathering
          • HTTP status codes
          • robots.txt
        • Vulnerability Assessment
        • Exploitation
          • Password cracking
        • Post-Exploitation & Persistence
          • Types of Shells
        • Privilege Escalation & Lateral Movement
        • Reporting & Remediation
  • 🐧Linux Essentials
    • Index
      • 1, 0, bits, Bytes: Units of digital information
      • User management
      • Packet management
      • Privileges & sudo
      • Passwd & Shadow files
      • Managing files, links and regex
      • find
      • Terminal/TTY
      • SSH
  • 🪟Windows Essentials
    • Index
      • CLI user management
      • CMD File management
  • 🌍Networking Essentials
    • Index
      • Windows CLI IP management
      • Linux IP management
      • Linux CLI Wi-Fi connection
  • 🕸️Network Pentesting
    • Tools
      • 1. Pre-Engagement
        • OpenVPN
      • 2. Information gathering
        • cURL & wget
        • Nmap
        • arp
        • Netcat
        • whatweb
      • 3. Vulnerability assessment
        • smbclient
      • 4. Exploitation
        • Metasploit
        • Hashcat
        • John the Ripper
      • 5. Post-Exploitation & Persistence
        • SSH
      • 6. Privilege escalation & Lateral movement
        • Possible privilege escalation vectors - Auto-enumeration scripts
      • 7. Reporting & Remediation
    • Techniques
      • Upgrade reverse shell to interactive
      • Transferring files to/from remote victim
      • Possible privilege escalation vectors - Manual checklist
    • Resources
      • Manufacturer default passwords lists
        • IP Cameras
      • Get Shells
  • 💉Web App pentesting
    • Tools
      • CeWL
      • Gobuster
      • whatweb
    • Techniques
      • Command injection
    • Resources
      • Reverse Shells
      • Bind Shells
  • 📡Wireless pentesting
    • Tools
    • Techniques
    • Resources
  • 🔓On-Premises Pentesting
    • Tools
    • Techniques
      • Removing Linux user passwords
      • Removing Windows user passwords
    • Resources
  • 💽Disks & Forensics
    • Index
      • Getting a disk ready
      • Inodes & Sectors
      • Recover deleted files
      • BUILDING - Secure file deletion
  • 🕷️Bash scripts
    • coming soon
  • ⚡PowerShell Scripts
    • coming soon
  • 🟩HTB Walkthroughs
    • coming soon
  • 🏴‍☠️External Resources
    • Schools
    • Books & Wikis
    • Utilities
    • Interactive cheat sheets
    • Wordlists
Powered by GitBook
On this page
  • Where do my files go when deleted?
  • Data recovering tools
  • Limitations
  • Tools
  1. Disks & Forensics
  2. Index

Recover deleted files

Last updated 1 year ago

Where do my files go when deleted?

First of all we need to differentiate between deleting from "sending to trash bin".

Sending a file to a trash bin simply puts the file into a special folder that will auto-delete files inside every N days, determined by a "cron job"/"task scheduler". When a file is deleted the filesystem will update it's data structure, marking the inode as free in the file system, meaning it's available to be over-written, but until it is done so, the files will still remain in the disk.

Data recovering tools

Here enter the data recovery tools, software that analyzes the filesystem structures and searches for traces of deleted files in the free space. They look for information such as file headers, footers or metadata that may still exist in the disk, then they try to reconstruct the remnants to restore the full file. They may use techniques like data carving that involves searching for specific file signatures or patterns in the raw data. For example a JPEG file has a distinct header and footer that will make recognizing and locating the rest of the fragments of the file easier.

Limitations

The effectiveness of file recovery depends on many factors, such as how much of the data has been overwritten, the filesystem format, the circumstances of the file deletion... If a file has been partially overwritten you may be able to recover it but only a part for example.

To prevent a file from being overwritten it's crucial to stop or minimize disk activity the moment you realize you need to recover a file, avoid any type of file creation or modification and if you can turn off the system, boot with a live CD and run a data recovering tool on the partition you want to recover while it is unmounted for maximum effectiveness.


Tools

TestDisk

CLI based, multi-platform, my personal choice, may be intimidating at first but once you try it a few times you will see it's super powerful and easy.

Recuva by CCleaner

GUI based, Windows, it may be proprietary software and CCleaner hasn't the best of reputations, but free version does the work, super easy to use.

💽
TestDiskCGSecurity
by CGSecurity
Logo
Recuva Professionalccleaner
by CCleaner
Logo