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/hexdumpThis step ensures you have a clean workspace to carry out the tasks.
-
Preparing the Data: Now, let's grab the
data.txtfile 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 hexThe
xxd -rcommand reverses the hexdump, reconstructing the original data. Thefilecommand is used to inspect the type of data in thehexfile. -
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 hexHere, we rename
hextohex.gz, then unzip it usinggunzip. Thefilecommand confirms the type of data. -
Further Compression: Our exploration continues with more compression:
mv hex hex.bz2 bunzip2 hex.bz2 file hexWe rename
hextohex.bz2and usebunzip2to decompress it. Once again, thefilecommand 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.binThese commands navigate through decompression, untar, and finally, reveal the contents of
data8.binwhich is the password for the next level:
wbWdlBxEir4CaE8LaPhauuOo6pwRmrDw
Top comments (0)