1. 程式人生 > >Bandit Wargame Level12 Writeup

Bandit Wargame Level12 Writeup

hex read repeated ngs compress taf word nbsp str

Level Goal

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. For this level it may be useful to create a directory under /tmp in which you can work using mkdir. For example: mkdir /tmp/myname123. Then copy the datafile using cp, and rename it using mv (read the manpages!)

Commands you may need to solve this level

grep, sort, uniq, strings, base64, tr, tar, gzip, bzip2, xxd, mkdir, cp, mv

Helpful Reading Material

  • Hex dump on Wikipedia

用xxd將hexdump轉換為二進制文件後,用file確定二進制文件為gzip,嘗試gzip -dv 卻報錯:gzip: data.txt: unknown suffix -- ignored。原因在於多次壓縮的文件gzip直接解壓後無法還原為非壓縮文件。可以將標準輸出定向到一個新的文件然後解壓或者使用管道繼續解壓。

Bandit Wargame Level12 Writeup