Pentest Book
Search…
Files

Common

1
# Check real file type
2
file file.xxx
3
4
# Analyze strings
5
strings file.xxx
6
strings -a -n 15 file.xxx # Check the entire file and outputs strings longer than 15 chars
7
8
# Check embedded files
9
binwalk file.xxx # Check
10
binwalk -e file.xxx # Extract
11
12
# Check as binary file in hex
13
ghex file.xxx
14
15
# Check metadata
16
exiftool file.xxx
17
18
# Stego tool for multiple formats
19
wget https://embeddedsw.net/zip/OpenPuff_release.zip
20
unzip OpenPuff_release.zip -d ./OpenPuff
21
wine OpenPuff/OpenPuff_release/OpenPuff.exe
22
23
# Compressed files
24
fcrackzip file.zip
25
# https://github.com/priyankvadaliya/Zip-Cracker-
26
python zipcracker.py -f testfile.zip -d passwords.txt
27
python zipcracker.py -f testfile.zip -d passwords.txt -o extractdir
28
29
# Office documents
30
https://github.com/assafmo/xioc
31
32
# Zip files in website
33
pip install remotezip
34
# list contents of a remote zip file
35
remotezip -l "http://site/bigfile.zip"
36
# extract file.txt from a remote zip file
37
remotezip "http://site/bigfile.zip" "file.txt"
38
39
# Grep inside any files
40
# https://github.com/phiresky/ripgrep-all
41
rga "whatever" folder/
Copied!

Disk files

1
# guestmount can mount any kind of disk file
2
sudo apt-get install libguestfs-tools
3
guestmount --add yourVirtualDisk.vhdx --inspector --ro /mnt/anydirectory
Copied!

Audio

1
# Check spectrogram
2
wget https://code.soundsoftware.ac.uk/attachments/download/2561/sonic-visualiser_4.0_amd64.deb
3
dpkg -i sonic-visualiser_4.0_amd64.deb
4
5
# Check for Stego
6
hideme stego.mp3 -f && cat output.txt #AudioStego
Copied!

Images

1
# Stego
2
wget http://www.caesum.com/handbook/Stegsolve.jar -O stegsolve.jar
3
chmod +x stegsolve.jar
4
java -jar stegsolve.jar
5
6
# Stegpy
7
stegpy -p file.png
8
9
# Check png corrupted
10
pngcheck -v image.jpeg
11
12
# Check what kind of image is
13
identify -verbose image.jpeg
14
15
# Stegseek
16
# https://github.com/RickdeJager/stegseek
17
stegseek --seed file.jpg
18
stegseek file.jpg rockyou.txt
Copied!
Last modified 11mo ago
Export as PDF
Copy link