Break In CTF 2016 Writeup

この大会は2016/1/24 3:30(JST)~2016/1/24 15:30(JST)に開催されました。
今回も個人で参戦。結果は120点で94位でした。
参加チームは152チームいたようですが、
短時間の割には2問解けて良かったです。
解けた問題をWriteupとして書いておきます。

Find The idiot (Score 100)

"Find the idiotic user"と問題にあることから、
セキュリティ的に問題があるユーザがいるということらしい。

添付のzipファイルを解凍すると、Unix系のディレクトリで構成されている。
/homeを見てみても、めぼしいものは見つからない。
/etcを見て思いついたのが、passwdとshadowである。
パスワードクラックしたら、簡単なパスワードが設定されているのかも
・・ということでJohn the Ripperでクラックする。

# unshadow passwd shadow > passwd_shadow
# john --wordlist=/usr/share/john/password.lst passwd_shadow
Loaded 7 password hashes with 7 different salts (crypt, generic crypt(3) [?/64])
Press 'q' or Ctrl-C to abort, almost any other key for status
dragon1          (gohan)
1g 0:00:01:35 100% 0.01048g/s 37.19p/s 238.2c/s 238.2C/s !@#$%..sss
Use the "--show" option to display all of the cracked passwords reliably
Session completed

gohanのパスワードがフラグだった。

dragon1

Go to ScoreBoard (Score 20)

文面から見るとサービス問題らしい。
ソースを見ると、以下のコメントが書いてあった。

<!-- the flag is #breakin -->
#breakin