piyolog

piyokangoの備忘録です。セキュリティの出来事を中心にまとめています。このサイトはGoogle Analyticsを利用しています。

SECCON CTF 2014 online 予選 のWriteupとかをまとめる予定地

まとめる予定地です。

概要

開催日時 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 794 TonkatsuNabe
2014/12/6 9:00:09
C1 Easy Cipher Crypto 100 470 MMA
2014/12/6 9:16:50
C2 Decrypt it (Easy) Crypto 200 66 HITCON
2014/12/7 0:57:23
C3 Decrypt it (Hard) Crypto 300 10 PPPwning
2014/12/7 10:16:04
C4 Ms.Fortune? Misfortune. : 4096-bit RSA Crypto 400 17 w0pr
2014/12/6 18:49:44
B1-1 Shuffle Binary 100 363 Shellphish
2014/12/6 10:45:03
B1-2 Reverse it Binary 100 185 sobachka
2014/12/6 10:52:33
B2 Let's disassemble Binary 200 43 nonbei
2014/12/7 8:40:02
E3 Advanced RISC Machine Exploit 300 33 PPPwning
2014/12/6 16:00:04
E4 Holy shellcode Exploit 400 22 penthackon
2014/12/6 14:44:49
E5-1 ROP: Impossible Exploit 500 14 TOEFL Beginner
2014/12/6 22:50:29
E5-2 Japanese super micro-controller Exploit 500 19 PPPwning
2014/12/6 16:24:47
W1 jspuzzle Web 100 153 0x0
2014/12/6 9:22:02
W2 REA-JUU WATCH Web 200 282 Dragon Sector
2014/12/6 13:34:43
W3 Bleeding "Heartbleed" Test Web Web 300 61 RDot.Org
2014/12/6 18:31:38
W4 Binary Karuta Web 400 10 0x0
2014/12/7 7:32:27
YMZK XSS Bonsai (aka. Hakoniwa XSS Reloaded) Web 500 34 mk
2014/12/6 11:06:03
Q2 QR (Easy) QR 200 40 MMA
2014/12/6 12:01:04
Q3 SECCON Wars: The Flag Awakens QR 300 204 negainoidoM
2014/12/6 9:41:22
Q4 BBQR QR 400 13 MMA
2014/12/6 23:34:28
F1 Get the key.txt Forensics 100 377 dodododo
2014/12/6 12:31:03
F3 Read it Forensics 300 53 chuck14
2014/12/6 16:13:50
F4 UnknownFS Forensics 400 0
F5 Confused analyte Forensics 500 4 YOKARO-MON
2014/12/7 11:51:36
P1 Choose the number Programming 100 373 HITCON
2014/12/6 11:32:47
P4 The Golden Gate Programming 400 8 PPPwning
2014/12/6 19:43:55
N1 Get the key Network 100 570 IPFactory
2014/12/6 9:05:42
N2 version2 Network 200 56 IPFactory
2014/12/7 8:10:59
N3 Get from curious "FTP" server Network 300 116 post-internet
2014/12/6 12:39:41
  • IDはWriteupとの紐付けをするためにpiyokangoが勝手に付与したものです。
  • 突破チーム数等ここの情報を元に作成
カテゴリ別
Genre 突破チーム数
Start 794
Crypto 563
Binary 591
Exploit 88
Web 540
Forensics 434
Programming 381
QR 257
Network 742

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
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
KIM_TPDN
Hello (forgotten) world
hyt web log
きょうのかんぱぱ
Euphoria Reload3d
st98 の日記帳
Tahoo!!
ピーシーとコーシーとその他雑記
security etc...
A602
mrtc0's blog
S42X
#1 #2 #3
CYBERGURU
sonickun.log
_wata1221
In the Spica
犬アイコンのみっきー
迷走記録
CTF-BR!
#1 #2 #3 #4 #5
Intellectual sadism
#1 #2 #3 #4
thmsmlr
一生あとで読んでろ
ricky
愚行録 the Next Generation
Sarup in Wonderland

問題作成者による解説等

C4 Ms.Fortune? Misfortune. : 4096-bit RSA (400)

C1 Easy Cipher (100) / P1 Choose the number (100) / B1-1 Shuffle (100)

YMZK XSS Bonsai (aka. Hakoniwa XSS Reloaded) (500)

P4 The Golden Gate (400)

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

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
encrypted.gpgは実際に4096-bit RSAで暗号化されている。 でも、君ならきっと復号できるはずだ。

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
http://micro.pwn.seccon.jp/arm/

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:

$ vi holy.nasm
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
例:

$ vi holy.nasm
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
http://micro.pwn.seccon.jp/sh/

Japanese super micro-controller
Running this program on port 10000.

Web

W1 jspuzzle (100)

jspuzzle.zip
You need to fill in all blanks!

W3 Bleeding "Heartbleed" Test Web (300)

http://bleeding.pwn.seccon.jp/

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回連続で解いてください。
60秒でタイムアウトされます。また間違うと60秒のペナルティがあります。

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のセキュリティセッティングのインターネットゾーンの設定を以下の画像のように変更をしてみてください。
http://files.quals.seccon.jp/bonsai_ie_settings.png

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)

http://youtu.be/1pC56S17-_A

# Not need Japanese text to solve this task.
# If you need it ? see below :)
http://pastebin.com/uXByBZv5

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)
次のIOChoge.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?
srv h2o.pwn.seccon.jp.

もうすぐ version 2 が来るけど準備はいいかい?
srv h2o.pwn.seccon.jp.

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