sudo apt-get install scalpel
man scalpel
sudo nano /etc/scalpel/scalpel.conf
...
doc y 10000000 \ xd0 \ xcf \ x11 \ xe0 \ xa1 \ xb1 \ x1a \ xe1 \ x00 \ x00 \ xd0 \ xcf \ x11 \ xe0 \ xa1 \ xb1 \ x1a \ xe1 \ x00 \ x00 NEXT
doc y 10000000 \ xd0 \ xcf \ x11 \ xe0 \ xa1 \ xb1
...
pdf y 5000000% PDF% EOF \ x0d REVERSE
pdf y 5000000% PDF% EOF \ x0a REVERSE
...
scalpel / dev / sda1 -o output
username @ host: ~ $ mount
/ dev / sda1 on / type ext3 (rw, relatime, errors = remount-ro)
proc on / proc type proc (rw, noexec, nosuid, nodev)
/ sys on / sys type sysfs (rw, noexec, nosuid, nodev)
varrun on / var / run type tmpfs (rw, noexec, nosuid, nodev, mode = 0755)
udev on / dev type tmpfs (rw, mode = 0755)
devshm on / dev / shm type tmpfs (rw)
devpts on / dev / pts type devpts (rw, gid = 5, mode = 620)
lrm on /lib/modules/2.6.24–21-generic/volatile type tmpfs (rw)
/ dev / sda2 on / home type ext3 (rw, relatime)
username @ host: ~ / output $ ls -l
-rw-rr-- 1 root root 28189 2009–03–24 14:42 audit.txt
drwxr-xr-x 2 root root 4096 2009–03–24 14:42 doc-3–0
drwxr-xr-x 2 root root 4096 2009–03–24 14:42 doc-3–1
drwxr-xr-x 2 root root 4096 2009–03–24 14:42 doc-3–2
drwxr-xr-x 2 root root 4096 2009–03–24 14:42 doc-4–0
...
drwxr-xr-x 2 root root 4096 2009–03–24 14:42 pdf-5–0
drwxr-xr-x 2 root root 4096 2009–03–24 14:42 pdf-6–0
...
username @ host: ~ / output $ cat audit.txt
Scalpel version 1.60 audit file
Started at Tue Mar 24 14:16:04 2009
Command line:
scalpel / dev / sda1 -o output
Output directory: / home / username / output
Configuration file: /etc/scalpel/scalpel.conf
Opening target "/ dev / sda1"
The following files were carved:
File Start Chop Length Extracted From
00053045.doc 183664640 YES 10,000,000 sda1
00053046.doc 183971840 YES 10000000 sda1
...
00050372.doc 203272192 NO 208896 sda1
00050373.doc 203481088 NO 229376 sda1
...
Completed at Tue Mar 24 14:42:41 2009
username @ host: ~ / output / doc-3–0 $ ls -l
total 25564
-rw-rr-- 1 root root 307200 2009–03–24 14:42 00050348.doc
-rw-rr-- 1 root root 40960 2009–03–24 14:42 00050349.doc
-rw-rr-- 1 root root 4354 2009–03–24 14:42 00050350.doc
-rw-rr-- 1 root root 466686 2009–03–24 14:42 00050351.doc
-rw-rr-- 1 root root 176128 2009–03–24 14:42 00050352.doc
...
Source: https://habr.com/ru/post/55465/
All Articles