Compressed: Difference between revisions
Created page with "===Description=== Often the files you need from the internet or other sources come in a compressed format. There are many tools available and most of them have slightly different syntax for unpacking. How to find information on unpacking different formats is a mandatory knowledge. 50pts ===Question=== Unpack all the files in the folder <code>/var/compressed/</code> and retrieve the flag. ===Solution=== First, go to the folder where the files to be extracted are. See wh..." |
No edit summary |
||
| Line 1: | Line 1: | ||
[[File:Compressed.PNG|thumb|Compressed]] | |||
===Description=== | ===Description=== | ||
Often the files you need from the internet or other sources come in a compressed format. There are many tools available and most of them have slightly different syntax for unpacking. How to find information on unpacking different formats is a mandatory knowledge. | Often the files you need from the internet or other sources come in a compressed format. There are many tools available and most of them have slightly different syntax for unpacking. How to find information on unpacking different formats is a mandatory knowledge. | ||
Latest revision as of 12:03, 26 September 2022
Description
Often the files you need from the internet or other sources come in a compressed format. There are many tools available and most of them have slightly different syntax for unpacking. How to find information on unpacking different formats is a mandatory knowledge.
50pts
Question
Unpack all the files in the folder /var/compressed/ and retrieve the flag.
Solution
First, go to the folder where the files to be extracted are.
See what files are in the folder.
You will notice that there are three different files in the folder.
The files are x00.zip, x01.gz and x02.tar.gz.
Now you can start extracting files one by one.
unzip x01.zip; gunzip x01.gz; tar -zxvf x02.tar.gz
When examining the files after decompression, I notice that the contents of the files look vague and not directly a flag. However, I recognise from the text that this could be some kind of encoding. I run the cat command on all files using ? character as a common parameter, since using the * character will also include the compressed files. I pipe the output to the base64 decoder and get a flag.
cat x0? | base64 -d
Tools
- unzip
- gunzip
- tar
- cat
- base64
Flag
ctf-tech{c4c92cc6-6439}