旅する情報系大学院生

旅と留学とプログラミング

EKOPARTY CTF 2016 参加記

今回は、wasamusumeというチームで出ました。メンバーはゆったん、三村さん、新穂さん、cookiesなど。
最終得点は1650点で47位、日本では3位かな?
私の解いた問題の得点の合計はたぶん400なので、貢献度1/4という感じでまぁまずまずの結果です。
cookiesの得点が725でほぼ半分で、凄すぎるんだよなぁ…。

[MISC 250] Old but gold

とても頑張りました。気合問でした。
f:id:yamaguchi_1024:20161030031629p:plain

こんな感じの画像が14枚与えられます。

問題文にThese QR codes look weirdと書いてあったので、QRcode???と思ってみてみるも違いそうで。
google画像検索してみたら、パンチカードというキーワードがゲットできたので、punchcard decryptなどとぐぐると
KLOTH.NET - Card punch emulator
punchcard emulatorなるサイトに行き当たり、問題の画像はこのemulatorを使っていることがわかりました。

あとは、なんて書いてあるか読むだけです!!
上記のリンクを用いて、パンチカードの穴の開け方とどの文字が対応しているのかを調べて、あとは本当に頑張って問題のパンチカードを読み取ります。
f:id:yamaguchi_1024:20161030032041p:plain

たぶん合計で5時間くらいは掛かりました。最初は、一文字一文字対応表と見比べて読んでいましたが、半分くらい終わると慣れて、対応表を見なくてもパンチカードが読めるようになりましたが、このスキルはいったい何の役に立つんだろう…。とか考えてとても楽しかったです。
英語なので、文脈と語の最初の文字から単語が推測できる程度の英語力は非常に役に立ちました。

一枚目のパンチカードから、14枚目のパンチカードまで、書いてあることを順に並べると下記のようになります。

of time punching those nards, can you imagine what could
the bug, but those wer3 the old days. can you find the flag
using this old technology? good luck, you will need it )
it was the sixties, he was trykng to figure out how to
manuals try1ng to learn how to program and spend a lot
happen if you fake a small mistake in on of those punched
use those ponched cards, he likes to program in fortran
error due to a small and almost insignificant mist4ke but
and cobol, b(t even after all those years he doesnt know
cards? after those hours waiting ror a result, then it says
in those days your only option w4s read large book and
how to properly mrite secure code in those languages
that will take more time to mebug and figure out where was
once upon a teme, there was a young hacker called mj

英文として、まったく意味が通じないので、意味がある英文に並べ替えました。

once upon a teme, there was a young hacker called mj
it was the sixties, he was trykng to figure out how to
use those ponched cards, he likes to program in fortran
and cobol, b(t even after all those years he doesnt know
how to properly mrite secure code in those languages
in those days your only option w4s read large book and 
manuals try1ng to learn how to program and spend a lot 
of time punching those nards, can you imagine what could
happen if you fake a small mistake in on of those punched
cards? after those hours waiting ror a result, then it says
error due to a small and almost insignificant mist4ke but 
that will take more time to mebug and figure out where was 
the bug, but those wer3 the old days. can you find the flag
using this old technology? good luck, you will need it)

昔は大変だったんですねー…。という英文です。英文を並べ替える段階で、受験英語が初めて役に立った感じがして最高でした。

それぞれの行から、スペルミスしているアルファベットを抜き出すと、
EKO(M41NFR4M3)
小かっこを中かっこに直したら、フラグが通りました。


[forensic 75]Damaged

やるだけ問でした…。
ビットマップイメージが与えられるので、ビットマップイメージをjpegに変換するツールhttps://convertio.co/ja/bmp-jpg/に通すだけでした。

f:id:yamaguchi_1024:20161030033148j:plain


[misc 50]Hidden inside EKO


開発者ツールでbackground.pngとかいうのを見てみると、左上にそのままflagがありました。
f:id:yamaguchi_1024:20161030033318p:plain

[rev 25]JVM

デコンパイルするだけだった。


感想

毎回、miscばっかり解いている気がする。
雑魚問はプロがなぎ倒してくれるので、私は忍耐力しか必要でない高得点misc問に集中した方がいいのかなぁと思ったが、去年のsecconでそれをやって爆死したので怖さがある。
楽しかった。