본문 바로가기
<개인공부> - IT/[CTF (Write up)]

TAMUctf '19 Write-up (Hello World)

by Aggies '19 2019. 3. 24.
반응형

As we open the uploaded file, we can see a bunch of tabs and spaces. So I googled whitespace decoder on the Internet. And I got this website to decode whitespaces.


hello_world.cpp


>> https://vii5ard.github.io/whitespace/

I simply copied and pasted the whitespaces part on the web and I got a below message.

As we know we have to find a flag, however, it has nothing at all. Actually, I used this tool for the first time so I scrolled down and clicked each function to get used to it. Coincidentally, I found a stream of numbers on right side window so-called Debug window.

I guessed that the stream of number is the integer value for ASCII character. So I worte a simple code to convert integer number to ASCII character.

data = [103, 105, 103, 101, 109, 123, 48, 104, 95, 109, 121, 95, 119, 104, 52, 116, 95, 115, 112, 52, 99, 49,
110, 103, 95, 121, 48, 117, 95, 104, 52, 118, 51, 125]

flag = ""
for i in range(len(data)):
  flag += chr(data[i])

print(flag)


Finally, I got a flag as below.

Flag : gigem{0h_my_wh4t_sp4c1ng_y0u_h4v3}

Reference site : Reference site : https://www.tamuctf.com/challenges#Hello%20World


반응형