You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/generic-methodologies-and-resources/basic-forensic-methodology/partitions-file-systems-carving/file-data-carving-recovery-tools.md
+74-14Lines changed: 74 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,27 +10,38 @@ More tools in [https://github.com/Claudio-C/awesome-datarecovery](https://github
10
10
11
11
The most common tool used in forensics to extract files from images is [**Autopsy**](https://www.autopsy.com/download/). Download it, install it and make it ingest the file to find "hidden" files. Note that Autopsy is built to support disk images and other kinds of images, but not simple files.
12
12
13
+
> **2024-2025 update** – Version **4.21** (released February 2025) added a rebuilt **carving module based on SleuthKit v4.13** that is noticeably quicker when dealing with multi-terabyte images and supports parallel extraction on multi-core systems.¹ A small CLI wrapper (`autopsycli ingest <case> <image>`) was also introduced, making it possible to script carving inside CI/CD or large-scale lab environments.
14
+
15
+
```bash
16
+
# Create a case and ingest an evidence image from the CLI (Autopsy ≥4.21)
17
+
autopsycli case --create MyCase --base /cases
18
+
# ingest with the default ingest profile (includes data-carve module)
**Binwalk** is a tool for analyzing binary files to find embedded content. It's installable via `apt` and its source is on [GitHub](https://github.com/ReFirmLabs/binwalk).
16
25
17
26
**Useful commands**:
18
27
19
28
```bash
20
-
sudo apt install binwalk #Insllation
21
-
binwalk file #Displays the embedded data in the given file
22
-
binwalk -e file #Displays and extracts some files from the given file
23
-
binwalk --dd ".*" file #Displays and extracts all files from the given file
⚠️ **Security note** – Versions **≤2.3.3** are affected by a **Path Traversal** vulnerability (CVE-2022-4510). Upgrade (or isolate with a container/non-privileged UID) before carving untrusted samples.
36
+
26
37
### Foremost
27
38
28
39
Another common tool to find hidden files is **foremost**. You can find the configuration file of foremost in `/etc/foremost.conf`. If you just want to search for some specific files uncomment them. If you don't uncomment anything foremost will search for its default configured file types.
29
40
30
41
```bash
31
42
sudo apt-get install foremost
32
43
foremost -v -i file.img -o output
33
-
#Discovered files will appear inside the folder "output"
44
+
#Discovered files will appear inside the folder "output"
34
45
```
35
46
36
47
### **Scalpel**
@@ -42,26 +53,62 @@ sudo apt-get install scalpel
42
53
scalpel file.img -o output
43
54
```
44
55
45
-
### Bulk Extractor
56
+
### Bulk Extractor 2.x
46
57
47
-
This tool comes inside kali but you can find it here: [https://github.com/simsong/bulk_extractor](https://github.com/simsong/bulk_extractor)
58
+
This tool comes inside kali but you can find it here: <https://github.com/simsong/bulk_extractor>
48
59
49
-
This tool can scan an image and will**extract pcaps** inside it, **network information (URLs, domains, IPs, MACs, mails)** and more **files**. You only have to do:
60
+
Bulk Extractor can scan an evidence image and carve**pcap fragments**, **network artefacts (URLs, domains, IPs, MACs, e-mails)** and many other objects **in parallel using multiple scanners**.
Navigate through **all the information** that the tool has gathered (passwords?), **analyse** the **packets** (read[**Pcaps analysis**](../pcap-inspection/index.html)), search for **weird domains** (domains related to **malware** or **non-existent**).
71
+
Useful post-processing scripts (`bulk_diff`, `bulk_extractor_reader.py`) can de-duplicate artefacts between two images or convert results to JSON for SIEM ingestion.
56
72
57
73
### PhotoRec
58
74
59
-
You can find it in [https://www.cgsecurity.org/wiki/TestDisk_Download](https://www.cgsecurity.org/wiki/TestDisk_Download)
75
+
You can find it in<https://www.cgsecurity.org/wiki/TestDisk_Download>
60
76
61
77
It comes with GUI and CLI versions. You can selectthe**file-types** you want PhotoRec to search for.
When a physical drive is unstable, it is best practice to **image it first** and only run carving tools against the image. `ddrescue` (GNU project) focuses on reliably copying bad disks while keeping a log of unreadable sectors.
84
+
85
+
```bash
86
+
sudo apt install gddrescue ddrescueview # On Debian-based systems
87
+
# First pass – try to get as much data as possible without retries
Version **1.28** (December 2024) introduced **`--cluster-size`** which can speed up imaging of high-capacity SSDs where traditional sector sizes no longer align with flash blocks.
97
+
98
+
### Extundelete / Ext4magic (EXT 3/4 undelete)
99
+
100
+
If the source file system is Linux EXT-based you may be able to recover recently deleted files **without full carving**. Both tools work directly on a read-only image:
101
+
102
+
```bash
103
+
# Attempt journal-based undelete (metadata must still be present)
104
+
extundelete disk.img --restore-all
105
+
106
+
# Fallback to full directory scan; supports extents and inline data
107
+
ext4magic disk.img -M -f '*.jpg' -d ./recovered
108
+
```
109
+
110
+
> 🛈 If the file system was mounted after deletion, the data blocks may have already been reused – in that case proper carving (Foremost/Scalpel) is still required.
111
+
65
112
### binvis
66
113
67
114
Check the [code](https://code.google.com/archive/p/binvis/) and the [web page tool](https://binvis.io/#/).
@@ -87,12 +134,25 @@ Searches for AES keys by searching for their key schedules. Able to find 128. 19
[YARA-X](https://github.com/VirusTotal/yara-x) is a Rust rewrite of YARA released in 2024. It is **10-30× faster** than classic YARA and can be used to classify thousands of carved objects very quickly:
140
+
141
+
```bash
142
+
# Scan every carved object produced by bulk_extractor
0 commit comments