Write-up Pico CTF 2017 Level 1 — Reverse Engineering

Syaiful Andy
Sep 4, 2018 · 1 min read

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'):
28fe16318f851d2f9de2b2ee90b55470
You 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/hex2raw

Kemudian 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

Syaiful Andy

Written by

Belajar menulis -0x616e6479-

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade