読者です 読者をやめる 読者になる 読者になる

Google Capture The Flag 2016 Writeup

CTF writeup

この大会は2016/4/30 2:00(JST)~2016/5/2 1:59(JST)に開催されました。
今回はチームで参戦。結果は1575点で2464チーム中51位でした。
自分で解けた問題をWriteupとして書いておきます。

No Big Deal - Part 2

添付されているgzファイルを解凍すると、大きいサイズのpcapファイルだった。Wiresharkで見てみると、No.16378のDCERPCのパケットが気になる。

[36 Reassembled TCP Segments (50433 bytes): #16325(1408), #16326(1408), #16328(1408), #16329(1408), #16331(1408), #16332(1408), #16334(1408), #16335(1408), #16337(1408), #16338(1408), #16340(1408), #16341(1408), #16343(1408), #16344(1408), ]
    [Frame: 16325, payload: 0-1407 (1408 bytes)]
    [Frame: 16326, payload: 1408-2815 (1408 bytes)]
    [Frame: 16328, payload: 2816-4223 (1408 bytes)]
    [Frame: 16329, payload: 4224-5631 (1408 bytes)]
    [Frame: 16331, payload: 5632-7039 (1408 bytes)]
    [Frame: 16332, payload: 7040-8447 (1408 bytes)]
    [Frame: 16334, payload: 8448-9855 (1408 bytes)]
    [Frame: 16335, payload: 9856-11263 (1408 bytes)]
    [Frame: 16337, payload: 11264-12671 (1408 bytes)]
    [Frame: 16338, payload: 12672-14079 (1408 bytes)]
    [Frame: 16340, payload: 14080-15487 (1408 bytes)]
    [Frame: 16341, payload: 15488-16895 (1408 bytes)]
    [Frame: 16343, payload: 16896-18303 (1408 bytes)]
    [Frame: 16344, payload: 18304-19711 (1408 bytes)]
    [Frame: 16346, payload: 19712-21119 (1408 bytes)]
    [Frame: 16347, payload: 21120-22527 (1408 bytes)]
    [Frame: 16349, payload: 22528-23935 (1408 bytes)]
    [Frame: 16350, payload: 23936-25343 (1408 bytes)]
    [Frame: 16352, payload: 25344-26751 (1408 bytes)]
    [Frame: 16353, payload: 26752-28159 (1408 bytes)]
    [Frame: 16355, payload: 28160-29567 (1408 bytes)]
    [Frame: 16356, payload: 29568-30975 (1408 bytes)]
    [Frame: 16358, payload: 30976-32383 (1408 bytes)]
    [Frame: 16359, payload: 32384-33791 (1408 bytes)]
    [Frame: 16361, payload: 33792-35199 (1408 bytes)]
    [Frame: 16362, payload: 35200-36607 (1408 bytes)]
    [Frame: 16364, payload: 36608-38015 (1408 bytes)]
    [Frame: 16366, payload: 38016-39423 (1408 bytes)]
    [Frame: 16367, payload: 39424-40831 (1408 bytes)]
    [Frame: 16369, payload: 40832-42239 (1408 bytes)]
    [Frame: 16370, payload: 42240-43647 (1408 bytes)]
    [Frame: 16372, payload: 43648-45055 (1408 bytes)]
    [Frame: 16373, payload: 45056-46463 (1408 bytes)]
    [Frame: 16375, payload: 46464-47871 (1408 bytes)]
    [Frame: 16376, payload: 47872-49279 (1408 bytes)]
    [Frame: 16378, payload: 49280-50432 (1153 bytes)]

該当するNo.のパケットのTCP segment dataをエクスポートして、結合してみる。この結合したファイルを7zで解凍してみると、以下の内容のテキストになっていて、フラグが埋め込まれていた。

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX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