休みがうまく重なってくれたので,初めてちゃんと時間かけて挑戦しました.
解けた問題に対して頭の中を整理するために,簡単に記事にしておきます.
Misc [warmup]Welcome
これは言うまでもなかったです.
IRCチャンネルに接続したら上の方にflagが置いてありました.
ctf4b{welcome_to_seccon_beginners_ctf}
Reversing [warmup]Seccompare
とりあえず圧縮されたファイルを解凍すると,実行ファイルがいたのでltraceコマンドを叩いてみました.
$ ltrace ./seccompare
printf("usage: %s flag\n", "./seccompare"usage: ./seccompare flag
) = 25
+++ exited (status 1) +++
引数足りなかったみたいです.
ちゃんと十分な引数を与えてもう一度やってみました.
$ ltrace ./seccompare flag
strcmp("ctf4b{%tr1ngs_1s_n0t_en0ugh}", "flag") = -3
puts("wrong"wrong
) = 6
+++ exited (status 0) +++
やりました.
比較対象になっていたflagがでてきました.
Misc containers
warmup以外で唯一解けた問題です.
binwalkコマンドを叩いてみました(入ってなかったんでapt-getから始まった).
$ binwalk containers
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
16 0x10 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
107 0x6B Zlib compressed data, compressed
738 0x2E2 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
829 0x33D Zlib compressed data, compressed
1334 0x536 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
1425 0x591 Zlib compressed data, compressed
1914 0x77A PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
2005 0x7D5 Zlib compressed data, compressed
2856 0xB28 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
2947 0xB83 Zlib compressed data, compressed
3666 0xE52 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
3757 0xEAD Zlib compressed data, compressed
4354 0x1102 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
4445 0x115D Zlib compressed data, compressed
5156 0x1424 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
5247 0x147F Zlib compressed data, compressed
5846 0x16D6 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
5937 0x1731 Zlib compressed data, compressed
6722 0x1A42 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
6813 0x1A9D Zlib compressed data, compressed
7757 0x1E4D PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
7848 0x1EA8 Zlib compressed data, compressed
8338 0x2092 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
8429 0x20ED Zlib compressed data, compressed
9243 0x241B PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
9334 0x2476 Zlib compressed data, compressed
10319 0x284F PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
10410 0x28AA Zlib compressed data, compressed
11042 0x2B22 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
11133 0x2B7D Zlib compressed data, compressed
12118 0x2F56 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
12209 0x2FB1 Zlib compressed data, compressed
12809 0x3209 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
12900 0x3264 Zlib compressed data, compressed
13845 0x3615 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
13936 0x3670 Zlib compressed data, compressed
14592 0x3900 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
14683 0x395B Zlib compressed data, compressed
15535 0x3CAF PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
15626 0x3D0A Zlib compressed data, compressed
16440 0x4038 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
16531 0x4093 Zlib compressed data, compressed
17313 0x43A1 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
17404 0x43FC Zlib compressed data, compressed
18218 0x472A PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
18309 0x4785 Zlib compressed data, compressed
19123 0x4AB3 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
19214 0x4B0E Zlib compressed data, compressed
19926 0x4DD6 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
20017 0x4E31 Zlib compressed data, compressed
20869 0x5185 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
20960 0x51E0 Zlib compressed data, compressed
21742 0x54EE PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
21833 0x5549 Zlib compressed data, compressed
22465 0x57C1 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
22556 0x581C Zlib compressed data, compressed
23408 0x5B70 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
23499 0x5BCB Zlib compressed data, compressed
23989 0x5DB5 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
24080 0x5E10 Zlib compressed data, compressed
24810 0x60EA PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
24901 0x6145 Zlib compressed data, compressed
25753 0x6499 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
25844 0x64F4 Zlib compressed data, compressed
26788 0x68A4 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
26879 0x68FF Zlib compressed data, compressed
27599 0x6BCF PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
27690 0x6C2A Zlib compressed data, compressed
28504 0x6F58 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
28595 0x6FB3 Zlib compressed data, compressed
29085 0x719D PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
29176 0x71F8 Zlib compressed data, compressed
29808 0x7470 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
29899 0x74CB Zlib compressed data, compressed
30844 0x787C PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
30935 0x78D7 Zlib compressed data, compressed
31524 0x7B24 PNG image, 128 x 128, 8-bit/color RGBA, non-interlaced
31615 0x7B7F Zlib compressed data, compressed
pngとかが大量にぶら下がってました.
なので**-e**オプション付けてもう一度実行して,これらのファイルを抜き取りました.
フォルダの中身を確認してみると下のようになっていました.
この状態でしばらく詰まっていました.
間違いなくそれっぽいけど,これをどの順番にしたらいいんだろうということがわかりませんでした.
しばらく後にそういえばbinwalk叩いたときにDECIMALの順番で並んでたよな...?と思い返してサイズ順でソートをしました.
いい感じになりました.
そういうことで,この通りに並べて
ctf4b{e52df60c058746a66e4ac4f34db6fc81}
となってflag獲得です.
私が解けたのはここまでです.
感想
最初にぼんやりと目標としていた2,3問は達成できたので,そこに関してはよかったです.
それでもおそらくあるだろうと思っていたSQLインジェクションや,XXS,パケットキャプチャといったあたりに対応できなかったのは悔しかったです.
次に挑戦する機会があれば,さらっと3桁得点の問題を解いてみたいものです.