Hack Zone Tunisia 2019

Hack Zone Tunisia 2019 writeup Microscope

Microscope

16 ×

I'm usually looking down, into a microscope.

http://149.56.110.180:1234/

Author: PsycoR


URLにアクセスしてソースを確認すると次のようなHTMLソースになっています。
<!DOCTYPE html>
<html>
    <head>
        <title>Microscope</title>
    </head>
    <body>
        <table>
            <tr>
                <td bgcolor="#474946"></td>
                <td bgcolor="#383961"></td>
bgcolorをバイナリデータとして読み替えるとGIF89aになります。bgcolorをバイナリデータとしてファイルに保存するPythonプログラムを書きます。
from bs4 import BeautifulSoup
import struct

f = open('Microscope.html')
html = f.read()
f.close()
soup = BeautifulSoup(html, 'html.parser')
tds = soup.find_all('td')
data = ''
for td in tds:
data += td.get('bgcolor')[1:]
f = open('aaa.gif', 'wb')
for i in range(0, len(data), 2):
f.write(struct.pack('B', int(data[i:i+2], 16)))
f.close()
実行すると次のアニメーションGIFファイルができます。

aaa

アニメーションGIFのフレームを順番に取得してQRコードを読ませるPythonプログラムを書きます。
from PIL import Image, ImageSequence
from pyzbar.pyzbar import decode

im = Image.open('aaa.gif')
frames = (frame.copy() for frame in ImageSequence.Iterator(im))
flag = ''
for frame in frames:
data = decode(frame)
flag += data[0][0].decode('utf-8', 'ignore')
print(flag)
実行するとフラグが出力されます。
フラグは、
HZVII{7h3_0r161n4l_qr_c0d3_w45_d3v3l0p3d_1n_1994.}

Hack Zone Tunisia 2019 writeup Funny PDF

Funny PDF

10 ×

This PDF was generated using PostScript language.

Find the hidden flag.

https://drive.google.com/file/d/1s2lBti9oO8sqLCMBuJyiiKB9y8PJkS7w/view

Author: PsycoR


PDFファイルをAdobe Readerで開いて、すべてを選択してコピーすると次の文字列になります。
4D8ig5iat5a6l
f4o9r4e9n7sibcs
i6s83164
a6n4 3e3x6aect science
5nfo3t16e
t5hfe7 0p3ro0cedures
3b5ut3735
t6h3e7 r2e3s1ults.
-7E0d3e7w7dede Oriwoh
これからPDFファイルに表示されている次の文字列を取り除きます。
Digital
forensics
is
an exact science
not
the procedures
but
the results.
-Edewede Oriwoh
すると次のようにASCIIコードだけが抽出されます。
485a56
49497b
683164
64336e
5f316e
5f7030
353735
637231
70377d
これを文字列に変換するPythonプログラムを書きます。
flag = ''
s = '485a5649497b68316464336e5f316e5f703035373563723170377d'
for i in range(0, len(s), 2):
flag += chr(int(s[i:i+2], 16))
print(flag)
フラグは、
HZVII{h1dd3n_1n_p0575cr1p7}

Hack Zone Tunisia 2019 writeup Welcome

Welcome

5

This is our Welcome Task :)

http://149.56.110.180:1337/

Author: PsycoR


URLにアクセスします。ソースを表示するとフラグが記載されています。

1

フラグは、
HZVII{d0nT_Tru5t_Cl1pb04rd}
です。



記事検索
ギャラリー
  • TetCTF 2023 NewYearBot
  • UUT CTF writeup Find The Password
  • UUT CTF writeup The Puzzle
  • Hack Zone Tunisia 2019 writeup Microscope
  • Hack Zone Tunisia 2019 writeup Welcome
  • SwampCTF 2019 writeup Brokerboard
  • SwampCTF 2019 writeup Leap of Faith
  • SwampCTF 2019 writeup Last Transmission
  • CBM CTF 2019 writeup Long road
カテゴリー