Login
SSH: ssh [email protected] -p 2220
Challenge URL: https://overthewire.org/wargames/bandit/bandit13.html
Task
The password for the next level is stored in the file data.txt, which is a hexdump of a file that has been repeatedly compressed.
Solution
Let's see the files present:
bandit12@bandit:~$ ls
data.txtWe have the hexdump in ASCII. Use mktemp -d and do all the changes in the tmp folder, since changes in the /home and /tmp folder aren't allowed.
To reverse the hexdump:
xxd -r filename.txt newfileUse the file command to get the file signature, then use mv to rename to that extension.
| Extension | Format |
|---|---|
.gz | gzip |
.tar | tar |
.bz2 | bzip2 |
To uncompress:
# gzip
gunzip filename
# tar
tar -xf archivename
# bzip2
bzip2 filenameExtra: Try to create a shell script for this.