exits

勉強記録

EKOPARTY 2016 Writeup

EKOPARTY2016にCtf wo Suruチームで参加しました.
850ptでした.

メンバーは結構いたけど,みんな忙しかったりしたみたいで実働3,4人?でした.
相変わらず僕はMiscとForensicsをよく見てましたがそんなに解けずでした.

メンバーのWriteUp

WriteUp

Forensics 75

bmpファイルの先頭が消えているだけだったので,適当なbmpファイルを作ってその先頭をコピーしてあげるとフラグの書かれた画像になった.

f:id:yue82:20161029201301p:plain

f:id:yue82:20161029200918j:plain

EKO{b1tm4p_r3c}

FBI 50

https://silkroadzpvwzxxv.onion/にTorでアクセスするとログイン画面が出る.
そのページの証明書発行対象の部門欄に,50-EKO{is_this_just_real_life_is_this_just_fantasy}とあった.

EKO{is_this_just_real_life_is_this_just_fantasy}

途中までで解けなかったもの

Forensics 50

Excelのマクロ部分にパスワードがかけられているが,UbuntuでLibreOfficeで開くと見えてしまった.
変数名を適当に直したのがこんな感じ.

Rem Attribute VBA_ModuleType=VBAModule
Option VBASupport 1
Sub CALCULATE()
Dim x1, NOT_ANSWER
NOT_ANSWER = "NOTNOTNOTNOTNOTNOTNOTNOTNOTNOTNOTNOT"

For x1 = 1 To 16777216
answer = f1(answer)
Next x1
Hoja1.NOT_ANSWER.Text = "EKO{" + Replace(answer, "=", "") + "}"
End Sub

Public Function f1(ByVal sTextToHash As String)
Dim o1 As Object, o2 As Object
Dim TextToHash() As Byte
Set o1 = CreateObject("System.Text.UTF8Encoding")
Set o2 = CreateObject("System.Security.Cryptography.SHA1CryptoServiceProvider")
TextToHash = o1.Getbytes_4(sTextToHash)
Dim bytes() As Byte
bytes = o2.ComputeHash_2((TextToHash))
f1 = f2(bytes)
Set o1 = Nothing
Set o2 = Nothing
End Function

Private Function f2(ByRef arrData() As Byte) As String
Dim y1
Dim y2
Set y1 = CreateObject("MSXML2.DOMDocument")
Set y2 = y1.createElement("b64")
y2.DataType = "bin.base64"
y2.nodeTypedValue = arrData
f2 = y2.Text
Set y2 = Nothing
Set y1 = Nothing
End Function

ここでちょっとめんどくさくなって,気力がなくなってしまった.

[追記]
うさぎさんによると,↑のはダミーで本当は隠されたExcelシートに書かれてたらしい.かなちぃ.

所感

元気がほしい.