この大会は2018/2/17 9:00(JST)~2018/2/26 9:00(JST)に開催されました。
今回もチームで参戦。結果は6284点で1272チーム中11位でした。
自分で解けた問題をWriteupとして書いておきます。
XORbytes (Crypto 100)
バイナリの途中にある「QB1g3l4B5uzPjjD4」がXORキーと推定。復号してみる。
with open('hexxy', 'rb') as f: data = f.read() key = 'QB1g3l4B5uzPjjD4' dec = '' for i in range(len(data)): code = ord(data[i]) ^ ord(key[i%len(key)]) dec += chr(code) with open('out', 'wb') as f: f.write(dec)
復号するとELFファイルになる。
$ ./out Congrats! You found the flag! GigEm{NibblerEatsNibbles}
GigEm{NibblerEatsNibbles}
00_intrusion (Scenario - NotSoAwesomeInc 25)
このカテゴリはいろんなシナリオに沿って、ログなどから解析し、答えていく。
1.systeminfo.txtのOS Nameからわかる。
windows
2.1.と同様
2008
3.systeminfo.txtのOS Versionからわかる。
sp1
4.ipconfig.txtのHost Nameからわかる。
www
5.ipconfig.txtのPrimary Dns Suffixからわかる。
yes
6.5.と同様
awesomeinc.local
7.ipconfig.txtのリストからわかる。
10.0.0.11,192.168.1.11
8.nmap.txtの情報からわかる。
3389,80
9.netsh_allprofiles.txtのFirewall Policyからわかる。
yes
10.9.と同様
no
01_logs (Scenario - NotSoAwesomeInc 50)
Excelでスペース区切りでフィルタしながら解く。
1.IPアドレスの種類は10.0.0.xでxは以下で全部。
136,138,36,37,39,42,43,45,85,87,89
2.IPアドレスでフィルタし、UserAgentの種類が2個以上のもの。
10.0.0.136
3.favicon.icoとrobots.txt以外へのアクセスで、HTTPステータスコードが200以外のもの。
10.0.0.136
4.アクセス先をソートするとわかりやすい。最上位のディレクトリまたはファイルは以下の通り。
.git,.src,.svn,favicon.ico,git,logo.png,robots.txt,src,svn
02_analysis (Scenario - NotSoAwesomeInc 75)
gitの解析。
1.wwwroot/.git/logs/HEADを見る。
7
2.wwwroot/.git/logs/HEADを見ても、Bob Robertsがcommitしているから、yesのような気がするが、noで通った。理由がわからない。
no
3.wwwroot/.git/logs/HEADを見ると、以下のログがある。
94071fee6ea1707480f5e202442e60 Bob Roberts1511560992 -0900 commit: Removing creds to make security "people" happy...
yes
4.3.で見たログからcredentialsがあったことがわかる。
yes
5.3.で見たログからはssh keysは見つからない。
null
6.wwwroot/.git/logs/HEADの内容から確認する。
[wwwroot/.git/logs/HEADの先頭] 0000000000000000000000000000000000000000 f34f90c6da1d9d3e6292c987e728b0a6b05021b5 Bob Roberts1511560279 -0900 commit (initial): Added under construction page and creds for the box...no one is going to look at this private repo... [wwwroot/.git/objects/f3/4f90c6da1d9d3e6292c987e728b0a6b05021b5 の解析] $ python -c 'import zlib; print zlib.decompress(open("4f90c6da1d9d3e6292c987e728b0a6b05021b5").read())' commit 278tree 926f5c6f981775aa52351b7d65d2e05ee5da4f55 author Mike Moss 1511560279 -0900 committer Mike Moss 1511560279 -0900 Added under construction page and creds for the box...no one is going to look at this private repo... [wwwroot/.git/objects/92/6f5c6f981775aa52351b7d65d2e05ee5da4f55 の解析] $ python -c 'import zlib; print zlib.decompress(open("6f5c6f981775aa52351b7d65d2e05ee5da4f55").read())' | xxd -g 1 0000000: 74 72 65 65 20 37 31 00 31 30 30 36 34 34 20 63 tree 71.100644 c 0000010: 72 65 64 73 00 a4 cb 02 11 70 68 4c 4b 8b 99 30 reds.....phLK..0 0000020: 05 99 ea e0 4d ce 76 5a ef 31 30 30 36 34 34 20 ....M.vZ.100644 0000030: 69 6e 64 65 78 2e 68 74 6d 6c 00 82 4a 38 37 3c index.html..J87< 0000040: b7 c2 8c 2f 32 59 8a 2f 1b b3 2d c5 29 7d e4 0a .../2Y./..-.)}.. [wwwroot/.git/objects/a4/cb021170684c4b8b99300599eae04dce765aef の解析] $ python -c 'import zlib; print zlib.decompress(open("cb021170684c4b8b99300599eae04dce765aef").read())' blob 71username: webdev password: 5aA789842c89b6650$6b6a5602Cb^8717bf6c7e47D!
webdev:5aA789842c89b6650$6b6a5602Cb^8717bf6c7e47D!
03_forensics (Scenario - NotSoAwesomeInc 100)
イベントログの解析。
1.securityのイベントログを見ても、11/26/2017-01:30:00以降のエラーレベルの情報にログインに関するものはない。
yes
2.フィルターでイベントID:4624(ログオン)として、時刻でソートする。以下の時刻でログインしている。
11/26/2017-01:31:11
3.2.で見つかったログにIPアドレスが記載されている。
10.0.0.136
05_backdoor(Scenario - NotSoAwesomeInc 150)
netstatの情報が与えられている。
1.以下のデータがある。
TCP 10.0.0.11:49196 10.0.0.136:4444 ESTABLISHED 1008 [rs[1].exe] TCP 10.0.0.11:49197 10.0.0.136:4444 ESTABLISHED 2940 [YwmkM.exe] TCP 10.0.0.11:49198 10.0.0.136:4444 ESTABLISHED 1900 [notepad.exe] TCP 10.0.0.11:49199 10.0.0.136:4444 ESTABLISHED 2088 [scvhost.exe]
このことから以下が答え。
outbound
2.1で確認した内容から以下が答え。
10.0.0.136
3.1で確認した内容から以下が答え。
4444
4.1で確認した内容から以下が答え。
YwmkM.exe,notepad.exe,rs[1].exe,scvhost.exe
5.1で確認した内容から以下が答え。
1008,1900,2088,2940