6月 6

DEFCON 19 CTF Forensics 100(f100) writeup


Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/users/0/fool.jp-pentest/web/n/wordpress/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384

Warning: preg_match_all(): Compilation failed: invalid range in character class at offset 4 in /home/users/0/fool.jp-pentest/web/n/wordpress/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 700

Warning: foreach() argument must be of type array|object, null given in /home/users/0/fool.jp-pentest/web/n/wordpress/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 707

Warning: preg_match_all(): Compilation failed: invalid range in character class at offset 4 in /home/users/0/fool.jp-pentest/web/n/wordpress/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 700

Warning: foreach() argument must be of type array|object, null given in /home/users/0/fool.jp-pentest/web/n/wordpress/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 707

問題文: Find the key
超訳:キーをみつけて。

問題ファイル

問題ファイルが何かを確認。
PNGであると判明したのでファイル名も変更。
pentest@Pubuntu:~/ctf$ file f100_fb8149b6f6eaef95d38
f100_fb8149b6f6eaef95d38: PNG image, 19025 x 1, 8-bit/color RGBA, non-interlaced
pentest@Pubuntu:~/ctf$ mv f100_fb8149b6f6eaef95d38 f100.png
ということで画像を見てみます。

なにやらすっごく細長いので
拡大して色々なところを眺めます。
すると何やら色々な縦線に紛れて
青い線が等間隔(450ごと)に存在することを発見。

これを等間隔に切って縦に繋いでいくpythonスクリプトを作成

#!/usr/bin/python
import Image
ct = 450
buf = 10
oldImg = Image.open("f100.png")
newImg = Image.new("RGB", (ct + buf, oldImg.size[0]/ct + buf), "#FFFFFF")
y = 0
for i in range(oldImg.size[0]):
    newImg.putpixel((i % ct, y), oldImg.getpixel((i, 0)))
    if i % ct == 0:
        y += 1
newImg.save("new_f100.jpg")

これで生成された画像を見てみると
下図のようになります。
(右端に水色の線が一本になっていることから綺麗に縦に繋がったことが分かると思います。)

答えは
「thankYouSirPleasemayIhaveAnother」


Copyright 2021. All rights reserved.

Posted 2011年6月6日 by ntsuji in category "ctf