Evlz CTF Writeup

この大会は2019/2/3 0:30(JST)~2019/2/4 0:30(JST)に開催されました。
今回もチームで参戦。結果は 1424点で176チーム中20位でした。
自分で解けた問題をWriteupとして書いておきます。

Sanity Check 1 (Sanity 1)

Slackの#ctfチャネルのところにフラグが書いてある。

evlz{I_pledge_to_play_fair_and_I_promise_to_not_attack_the_infrastructure}ctf

Sanity Check 2 (Sanity 50)

QRコードを読み取ると、以下のURLが出てきた。

https://www31.zippyshare.com/v/09nlhIKo/file.html

そこのリンクにあるflag.zipをダウンロードしたが、パスワードがかかっている。

$ fcrackzip -u -D -p dict/rockyou.txt flag.zip 


PASSWORD FOUND!!!!: pw == !!!0mc3t
$ unzip flag.zip
Archive:  flag.zip
[flag.zip] flag.txt password: 
  inflating: flag.txt
$ cat flag.txt
652076206c207a207b207320302075206e2064205f20302066205f206d2075203520692063207d206320742066
$ cat flag.txt | xxd -r -p
e v l z { s 0 u n d _ 0 f _ m u 5 i c } c t f
evlz{s0und_0f_mu5ic}ctf

Imago (Forensics 150)

TweakPNGで見ると、IHDRのCRCがおかしい。
高さを変えてみると、フラグ部分が表示された。
f:id:satou-y:20190206223323p:plain

evlz{who_cares_about_metadata_I_just_do_binwalk}ctf

Don't Blink (Misc 100)

giamでGIFアニメの各フレームを分割する。
分割した各画像を合成する。

from PIL import Image

DIR = 'frames/'

input_img = Image.open(DIR + 'persistant_01.gif').convert('RGB')
pixels = list(input_img.getdata())

for i in range(2, 58):
    file = DIR + 'persistant_%02d.gif' % i
    tmp_img = Image.open(file).convert('RGB')
    tmp_pixels = tmp_img.getdata()
    for j in range(len(tmp_pixels)):
        if tmp_pixels[j] != (255, 255, 255):
            pixels[j] = tmp_pixels[j]

output_img = Image.new('RGB', (500, 500), (255, 255, 255))

idx = 0
for y in range(500):
    for x in range(500):
        output_img.putpixel((x, y), pixels[idx])
        idx += 1

output_img.save('flag.gif')

f:id:satou-y:20190206223548g:plain

evlz{catch_me}ctf