2014-12-08
SECCON CTF 2014 online 予選 のWriteupとかをまとめる予定地
CTF | |
まとめる予定地です。
概要
開催日時 2014/12/06 9:00(JST) 〜 2014/12/07 17:00(JST) (32時間)
詳細:http://2014.seccon.jp/winter2014quals.html
問題一覧
| ID | Title | Genre | Score |
|---|---|---|---|
| S1 | Welcome to SECCON | Start | 100 |
| C1 | Easy Cipher | Crypto | 100 |
| C2 | Decrypt it (Easy) | Crypto | 200 |
| C3 | Decrypt it (Hard) | Crypto | 300 |
| C4 | Ms.Fortune? Misfortune. : 4096-bit RSA | Crypto | 400 |
| B1-1 | Shuffle | Binary | 100 |
| B1-2 | Reverse it | Binary | 100 |
| B2 | Let's disassemble | Binary | 200 |
| E3 | Advanced RISC Machine | Exploit | 300 |
| E4 | Holy shellcode | Exploit | 400 |
| E5-1 | ROP: Impossible | Exploit | 500 |
| E5-2 | Japanese super micro-controller | Exploit | 500 |
| W1 | jspuzzle | Web | 100 |
| W2 | REA-JUU WATCH | Web | 200 |
| W3 | Bleeding "Heartbleed" Test Web | Web | 300 |
| W4 | Binary Karuta | Web | 400 |
| YMZK | XSS Bonsai (aka. Hakoniwa XSS Reloaded) | Web | 500 |
| Q2 | QR (Easy) | QR | 200 |
| Q3 | SECCON Wars: The Flag Awakens | QR | 300 |
| Q4 | BBQR | QR | 400 |
| F1 | Get the key.txt | Forensics | 100 |
| F3 | Read it | Forensics | 300 |
| F4 | UnknownFS | Forensics | 400 |
| F5 | Confused analyte | Forensics | 500 |
| P1 | Choose the number | Programming | 100 |
| P4 | The Golden Gate | Programming | 400 |
| N1 | Get the key | Network | 100 |
| N2 | version2 | Network | 200 |
| N3 | Get from curious "FTP" server | Network | 300 |
- IDはWriteupとの紐付けをするためにpiyokangoが勝手に付与したものです。
Writeup・感想
| Writeup/感想 | S1 | C1 | C2 | C3 | C4 | B1-1 | B1-2 | B2 | E3 | E4 | E5-1 | E5-2 | W1 | W2 | W3 | W4 | YMZK | Q2 | Q3 | Q4 | F1 | F3 | F4 | F5 | P1 | P2 | P4 | N1 | N2 | N3 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 兼雑記 | ★ | ★ | ★ | − | − | ★ | ★ | ★ | ★ | ★ | ★ | ★ | ★ | ★ | − | − | − | − | ★ | − | − | − | − | − | ★ | − | − | ★ | − | − |
| 仙豆のレシピ | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | ★ | − | − | − | − | − | − | − | − | − | − | − | − | − |
| chibiegg日誌 #1 #2 #3 #4 #5 #6 | − | − | − | − | − | − | − | − | − | − | − | − | ★ | − | − | − | − | ★ | ★ | ★ | − | − | − | − | − | − | ★ | ★ | − | ★ |
| BATA_24 #1 #2 | − | − | − | − | − | − | − | − | ★ | ★ | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − |
| 見習いバグハンターのセキュリティブログ | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | ★ | − | − | − | − | − | − | − | − | − | − | − | − | − |
| あたがわの日記 | − | − | − | − | − | − | − | − | − | − | − | − | ★ | − | ★ | − | − | − | − | ★ | − | − | − | − | ★ | − | − | ★ | ★ | ★ |
| kusano_k’s blog | ★ | ★ | ★ | − | − | ★ | ★ | ★ | − | − | − | − | ★ | ★ | ★ | − | ★ | ★ | ★ | ★ | ★ | ★ | − | ★ | ★ | − | ★ | ★ | ★ | − |
| 3846masa | − | ★ | − | − | − | − | − | − | − | − | − | − | − | ★ | − | − | ★ | − | ★ | − | − | − | − | − | − | − | − | − | − | − |
| Moonfire!(ぶろぐ編) | − | ★ | − | − | − | − | − | − | − | − | − | − | − | ★ | − | − | − | − | − | − | − | − | − | − | − | − | − | ★ | − | ★ |
| tyage | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | ★ | − | − | − | − | − | − | − | − | − | − | − | − | − |
| 立ち止まって、ゆったりな談義 by Jebra | − | ★ | − | − | − | ★ | − | − | − | − | − | − | − | − | − | − | − | − | − | − | ★ | − | − | − | ★ | − | − | ★ | − | − |
| 電気通信大学MMA | ★ | ★ | ★ | − | ★ | ★ | ★ | ★ | ★ | − | − | − | ★ | ★ | ★ | − | − | ★ | ★ | ★ | ★ | − | − | − | ★ | − | ★ | ★ | ★ | ★ |
| sirase’s blog | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | ★ | − | − | − | − | − |
| 煙と消えるその前に | − | ★ | − | − | − | − | ★ | − | − | − | − | − | − | ★ | − | − | − | − | − | − | ★ | − | − | − | − | − | − | ★ | ★ | − |
| 雑記 #1 #2 | − | − | − | − | − | − | − | − | − | − | − | − | − | ★ | − | − | ★ | − | − | − | − | − | − | − | − | − | − | − | − | − |
| 志穂の備忘録 | − | ★ | ★ | − | − | − | − | − | − | − | − | − | − | − | − | − | − | ★ | − | − | ★ | − | − | − | ★ | − | ★ | − | − | − |
| osyoyu.hatenablog.com | − | − | − | − | − | − | − | − | − | − | − | − | − | ★ | ★ | − | − | − | ★ | − | − | − | − | − | ★ | − | − | − | − | − |
| KIM_TPDN | − | − | − | − | − | − | − | − | − | − | − | − | − | ★ | − | − | − | ★ | ★ | − | − | − | − | − | − | − | − | − | ★ | − |
| Hello (forgotten) world | ★ | ★ | − | − | − | − | − | − | − | − | − | − | ★ | − | − | − | − | − | − | − | − | − | − | − | ★ | − | − | − | − | ★ |
| hyt web log | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | ★ | ★ | − | − | − | − | − | − | − | − | − | − | − |
| きょうのかんぱぱ | ★ | ★ | − | − | − | ★ | ★ | ★ | − | − | − | − | − | − | − | − | − | − | − | − | ★ | − | − | − | ★ | − | − | ★ | − | − |
| Euphoria Reload3d | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | − | ★ | − | − | ★ | − | − |
| st98 の日記帳 | ★ | ★ | − | − | − | ★ | ★ | − | − | − | − | − | ★ | ★ | ★ | − | − | − | ★ | − | ★ | − | − | − | ★ | − | − | ★ | − | ★ |
問題を再公開しました。writeup書きや再挑戦
にお使いください。各種サーバは今年いっぱい稼働予定です。 #seccon
http://t.co/6CI9dOe2yK
— SECCON CTF (@secconctf) 2014, 12月 7
Question Text
Start
S1 Welcome to SECCON (100)
The answer is "SECCON{20141206}".
答えは、「SECCON{20141206}」です。
Crypto
C1 Easy Cipher (100)
87 101 108 1100011 0157 6d 0145 040 116 0157 100000 0164 104 1100101 32 0123 69 67 0103 1001111 1001110 040 062 060 49 064 100000 0157 110 6c 0151 1101110 101 040 0103 1010100 70 101110 0124 1101000 101 100000 1010011 1000101 67 0103 4f 4e 100000 105 1110011 040 116 1101000 0145 040 1100010 0151 103 103 0145 1110011 0164 100000 1101000 0141 99 6b 1100101 0162 32 0143 111 1101110 1110100 101 0163 0164 040 0151 0156 040 74 0141 1110000 1100001 0156 056 4f 0157 0160 115 44 040 0171 1101111 117 100000 1110111 0141 0156 1110100 32 0164 6f 32 6b 1101110 1101111 1110111 100000 0164 1101000 0145 040 0146 6c 97 1100111 2c 100000 0144 111 110 100111 116 100000 1111001 6f 117 63 0110 1100101 0162 0145 100000 1111001 111 117 100000 97 114 0145 46 1010011 0105 0103 67 79 1001110 123 87 110011 110001 67 110000 1001101 32 55 060 100000 110111 0110 110011 32 53 51 0103 0103 060 0116 040 5a 0117 73 0101 7d 1001000 0141 1110110 1100101 100000 102 0165 0156 33
C2 Decrypt it (Easy) (200)
crypt1.zip
C3 Decrypt it (Hard) (300)
g^k=69219086192344
20<k<20000
c2.zip
C4 Ms.Fortune? Misfortune. : 4096-bit RSA (400)
encrypted.gpg is encrypted by 4096-bit RSA algorithm. But I'm sure you can decrypt it.
problem.tar.xz
Binary
B1-1 Shuffle (100)
find the string before randomizing.
shuffle
B1-2 Reverse it (100)
Reverseit
B2 Let's disassemble (200)
nc disassemble.quals.seccon.jp 23168
Exploit
E3 Advanced RISC Machine (300)
Read flag.txt
Advanced RISC Machine
Running this program on port 10001.
E4 Holy shellcode (400)
Get the keyword.txt from hebrew.pwn.seccon.jp:10016.
Holy shellcode using Hebrew characters in UTF-16LE
http://hebrew.pwn.seccon.jp/nikud/hebrew-utf16le.html
Server files:
stage16
stage16_conf
for example:
BITS 32
db 0x24,0xFB,0x34,0xFB,0x1E,0xFB,0x1F,0xFB
db 0x0a
$ nasm -f bin holy.nasm -o holy
$ cat holy | nc hebrew.pwn.seccon.jp 10016
Bless you!
サーバ hebrew.pwn.seccon.jp:10016 から keyword.txt をゲットしよう。
UTF-16LEのヘブライ文字だけで書かれた聖なるシェルコード
http://hebrew.pwn.seccon.jp/nikud/hebrew-utf16le.html
サーバファイル:
stage16
stage16_conf
例:
BITS 32
db 0x24,0xFB,0x34,0xFB,0x1E,0xFB,0x1F,0xFB
db 0x0a
$ nasm -f bin holy.nasm -o holy
$ cat holy | nc hebrew.pwn.seccon.jp 10016
ご加護を!
E5-1 ROP: Impossible (500)
ropi.pwn.seccon.jp:10000
Read "/flag" and write the content to stdout, such as the following pseudo code.
open("/flag", 0);
read(3, buf, 32);
write(1, buf, 32);
Notice that the "vuln" executable is protected by an Intel Pin tool, the source code of which is "norop.cpp".
vuln
norop.cpp
norop_conf
ropi.pwn.seccon.jp:10000
以下の擬似コードのように、"/flag"を読み込んでその内容をstdoutに出力せよ
open("/flag", 0);
read(3, buf, 32);
write(1, buf, 32);
【注】実行ファイル"vuln"はIntel Pin tool(ソースコードはnorop.cpp)で守られています。
vuln
norop.cpp
norop_conf
E5-2 Japanese super micro-controller (500)
Read flag.txt
Japanese super micro-controller
Running this program on port 10000.
Web
W1 jspuzzle (100)
jspuzzle.zip
You need to fill in all blanks!
W2 REA-JUU WATCH (200)
W3 Bleeding "Heartbleed" Test Web (300)
W4 Binary Karuta (400)
http://binkaruta.pwn.seccon.jp/binkaruta/
Karuta is a Japanese card game where you need to quickly grab a card!
What is Karuta?
In Binary Karuta, the point is to correctly identify the CPU architecture of the binary hex dump displayed. If you wait over 60 seconds, it will time out and you will have to start again. You need to guess the correct CPU architecture 100 times in order to get the flag. There are no tricks to this. This game is to determine how well you are are reading binary hex with your eyes! There are around 35 different architectures being used for this so it will be good practice for you to get familiar with exotic binary.
You will need to know some Japanese:
正解: Correct
不正解: Incorrect
時間切れ:Timeout
Good Luck! 頑張って下さい!
http://binkaruta.pwn.seccon.jp/binkaruta/
約35種類のarchからダンプが表示されます。正解を選択してください。
100回連続で解いてください。
YMZK XSS Bonsai (aka. Hakoniwa XSS Reloaded) (500)
bonsaiXSS.zip
This challenge have 2 answers (2 steps).
If you collect 2 answers, you can get full point (500pts).
[#9 About "XSS Bonsai" Runtime Environment]
There is a problem when running Bonsai XSS, in that you can run the program but it will not correctly proceed past the first stage. However, it should work if you install Visual Studio Express 2013 Web (evaluation) or other versions of Visual Studio. We are sorry for the inconvenience but please install Visual Studio to fix this. You can test it by putting
";alert('XSS');//
in stage 1. If you get a “Congratulation” alert box and pass to stage 2 then your environment is working. Good Luck!
[#10 About "XSS Bonsai" Runtime Environment 2]
If you press send button , not work anything ,please check and change IE Security Settings - InternetZone as below image.
http://files.quals.seccon.jp/bonsai_ie_settings.png
[#9 "XSS Bonsai" 動作環境について]
Bonsai XSS の問題が上手く動作しない場合は Visual Studio Express 2013 Web (evaluation) か別のバージョンの Visual Studioのインストールした環境で試してみてください。
テストはstage1 で以下を入力してみてください。
";alert('XSS');//
“Congratulation” のアラートウィンドウが表示されステージ2に進めば正常に動作しています。お手数をおかけします。
[#10 "XSS Bonsai" 動作環境について2]
「send」 ボタンを押しても何も動作がしない場合には、IEのセキュリティセッティングのインターネットゾーンの設定を以下の画像のように変更をしてみてください。
QR
Q2 QR (Easy) (200)
Funniest joke in the world(?):
"Last night, I had a dream I was eating QR cakes....
but when I woke up, half my QR code was gone!"
世界一面白いジョーク:
昨晩フランネルケーキを食べる夢を見たんだけど、
朝起きたらQRコードが半分なくなってたんだ!
Q3 SECCON Wars: The Flag Awakens (300)
# Not need Japanese text to solve this task.
# If you need it ? see below :)
Q4 BBQR (400)
Let's enjoy BBQR!
Forensics
F1 Get the key.txt (100)
forensic100.zip
F3 Read it (300)
Readit
F4 UnknownFS (400)
This image formatted unknown file system.
I guessed this file system like FAT file system same but different.
https://seccon2014.b.storage.sakura.ad.jp/unknownfs.zip
このイメージは名状しがたいファイルシステムでフォーマットされています。 私が思うに、このファイルシステムはFATファイルシステムと似ていますが、実際のところ分かりません。
解析して、隠されたキーを探しましょう。
F5 Confused analyte (500)
Fill correct string in blackbox in IOC. (Input format is SECCON{string})
hoge.zip (pass:infected)
次のIOC(hoge.jpg)のブラックボックスに当てはまる文字列を入れてください。 (解答形式 SECCON{string})
Programming
P1 Choose the number (100)
nc number.quals.seccon.jp 31337
sorry fixed URL
P4 The Golden Gate (400)
Network
N1 Get the key (100)
nw100.pcap
N2 version2 (200)
are you ready for upcoming version 2?
もうすぐ version 2 が来るけど準備はいいかい?
N3 Get from curious "FTP" server (300)
We've found an encoder board along with cipher text. Please help us to decrypt it.
The cipher text: BQDykmgZ0I6SaQnq4o/iEONudetXdPJdpl1UVSlU69oZOtvqnHfinOpcEfIjXy9okkVpsuw2kpKS==
Main: encoder board photos(GooleDrive)
Mirror: https://seccon2014-online.b.storage.sakura.ad.jp/encoder_board_photos.zip
暗号文と一緒にエンコーダーボードを見つけた。解読を助けて欲しい!
The cipher text: BQDykmgZ0I6SaQnq4o/iEONudetXdPJdpl1UVSlU69oZOtvqnHfinOpcEfIjXy9okkVpsuw2kpKS==
Main: エンコーダーボード写真(GooleDrive)
Mirror: https://seccon2014-online.b.storage.sakura.ad.jp/encoder_board_photos.zip