Write-up Pico CTF 2017 Level 1 — Reverse Engineering
Hex2Raw
This program requires some unprintable characters as input… But how do you print unprintable characters? CLI yourself to /problems/f8c6dddd9de81e356e316ec9789288cd and turn that Hex2Raw!
HINTS
Google for easy techniques of getting raw output to command line. In this case, you should be looking for an easy solution.
Write-up:
Ketika soal dijalankan, maka akan tampil tulisan berikut.
Give me this in raw form (0x41 -> 'A'):
28fe16318f851d2f9de2b2ee90b55470You gave me:
Untuk mengerjakan soal ini, kita dapat membuat script sederhana dengan python, misalkan kita namakan hex2raw.py, lalu isi scriptnya sebagai berikut.
import base64
print('28fe16318f851d2f9de2b2ee90b55470'.decode('hex'))Script ini akan mendecode string di soal dari format hexa ke bentuk rawnya. Kemudian, kita jalankan dengan cara berikut.
python hex2raw.py | /problems/f8c6dddd9de81e356e316ec9789288cd/hex2rawKemudian akan kita dapatkan flagnya.
Yay! That's what I wanted! Here be the flag:88980fa0253a3b711d54d64a94b1646c
Raw2Hex (unfinished)
This program just prints a flag in raw form. All we need to do is convert the output to hex and we have it! CLI yourself to /problems/608e5f8b55c005ae6bc4ff13393c9c23 and turn that Raw2Hex!
HINTS
Google is always very helpful in these circumstances. In this case, you should be looking for an easy solution.
/problems/45f3b0abcf176b7cf7c1536b28d05d72/raw2hex | cut -d ':' -f 2 | python -c "a = raw_input();print a; import base64;print(a.encode('hex'))"andy_ipul@shell-web:/problems/608e5f8b55c005ae6bc4ff13393c9c23
$ ./raw2hex | cut -d ':' -f 2 | xxd -p
