Goal
data.txt is a hexdump of a file that has been repeatedly compressed.
You need to reconstruct the binary, then repeatedly identify and decompress until you reach the plaintext password.
Hints
- Work in
/tmp(usemktemp -dso you don’t collide with other players). - Convert hexdump → binary with
xxd -r. - Use
fileafter each step to learn what format you’re holding. - Expect a chain like: gzip → bzip2 → tar → gzip → … (varies).
Solution (click to reveal)
- SSH in and create a scratch dir:
ssh bandit13@bandit.labs.overthewire.org -p 2220
workdir=$(mktemp -d)
cd "$workdir"
- Copy the hexdump file into your scratch space:
cp ~/data.txt .
- Convert hexdump to a binary file:
xxd -r data.txt > blob
- Now iterate:
file blob
Depending on what file says, do one of these and rename the output back to blob:
-
If it’s gzip:
mv blob blob.gz && gunzip blob.gz && mv blob blob -
If it’s bzip2:
mv blob blob.bz2 && bunzip2 blob.bz2 && mv blob blob -
If it’s a tar archive:
mv blob blob.tar && tar -xf blob.tar # then identify the extracted file and continue ls -la
Repeat until file blob reports plain text. Then:
cat blob
That output is the password for Level 14.
Notes
- This level is about feedback loops:
filetells you what to do next. - Keep filenames explicit; compression tools can overwrite if you’re sloppy.