Introduction
Greetings, As we step into Level 12 of the Bandit wargame, we're faced with a unique challenge involving data manipulation and repeated compression. Get ready to roll up your sleeves and dive into the intricate world of command-line operations.
Steps
Before we embark on our journey, make sure you've successfully acquired the password for the previous level: JVNBBFSmZwKKOP0XbFXOoW8chDz5yVRv
.
-
Creating a Workspace: Begin by creating a temporary directory named
/tmp/hexdump
. Navigate to this new directory using the following commands:
mkdir /tmp/hexdump cd /tmp/hexdump
This step ensures you have a clean workspace to carry out the tasks.
-
Preparing the Data: Now, let's grab the
data.txt
file from the previous level and place it into your temporary directory:
cp /home/bandit12/data.txt .
This sets the stage for our data manipulation journey.
-
Decoding Hexdump: We'll start by converting the hexdump back to its original form. Execute the following commands to perform this transformation:
xxd -r data.txt > hex file hex
The
xxd -r
command reverses the hexdump, reconstructing the original data. Thefile
command is used to inspect the type of data in thehex
file. -
Compressing and Decompressing: In the next steps, we'll play with compression. These commands help us understand the data and its transformations:
mv hex hex.gz gunzip hex.gz file hex
Here, we rename
hex
tohex.gz
, then unzip it usinggunzip
. Thefile
command confirms the type of data. -
Further Compression: Our exploration continues with more compression:
mv hex hex.bz2 bunzip2 hex.bz2 file hex
We rename
hex
tohex.bz2
and usebunzip2
to decompress it. Once again, thefile
command provides insight into the data's nature. -
Final Steps: The puzzle nears its completion. Execute these commands to perform more decompression given the working file’s data type:
mv hex hex.gz gunzip hex.gz file hex tar -xf hex file data5.bin tar -xf data5.bin file data6.bin mv data6.bin data6.bin.bz2 bunzip2 data6.bin.bz2 file data6.bin tar -xf data6.bin file data8.bin mv data8.bin data8.bin.gz cat data8.bin
These commands navigate through decompression, untar, and finally, reveal the contents of
data8.bin
which is the password for the next level:
wbWdlBxEir4CaE8LaPhauuOo6pwRmrDw
Top comments (0)