DefCamp CTF 2020 Online Writeup

この大会は2020/12/5 18:00(JST)~2020/12/7 18:00(JST)に開催されました。
今回もチームで参戦。結果は600点で216チーム中68位でした。
自分で解けた問題をWriteupとして書いておきます。

stug-reference (Steganography)

$ steghide extract -sf stug.jpg -p stug
wrote extracted data to "flag.txt".
$ cat flag.txt
ctf{32849dd9d7e7b313c214a7b1d004b776b4af0cedd9730e6ca05ef725a18e38e1}
ctf{32849dd9d7e7b313c214a7b1d004b776b4af0cedd9730e6ca05ef725a18e38e1}

yopass-go (Reverse Engineering)

$ strings yopass | grep ctf{
found bad pointer in Go heap (incorrect use of unsafe or cgo?)runtime: internal error: misuse of lockOSThread/unlockOSThreadruntime.SetFinalizer: pointer not at beginning of allocated blockstrconv: internal error: extFloat.FixedDecimal called with n == 0runtime:greyobject: checkmarks finds unexpected unmarked object obj=ctf{0962393ce380c3cf696c6c59a085cde0f7edd1382f2e9090220abdf9a6396c88}runtime: found space for saved base pointer, but no framepointer experiment
ctf{0962393ce380c3cf696c6c59a085cde0f7edd1382f2e9090220abdf9a6396c88}

why-xor (Cryptography)

keyは"ctf"あたりから推測して、復号する。

xored = ['\x00', '\x00', '\x00', '\x18', 'C', '_', '\x05', 'E', 'V', 'T', 'F', 'U', 'R', 'B', '_', 'U', 'G', '_', 'V', '\x17', 'V', 'S', '@', '\x03', '[', 'C', '\x02', '\x07', 'C', 'Q', 'S', 'M', '\x02', 'P', 'M', '_', 'S', '\x12', 'V', '\x07', 'B', 'V', 'Q', '\x15', 'S', 'T', '\x11', '_', '\x05', 'A', 'P', '\x02', '\x17', 'R', 'Q', 'L', '\x04', 'P', 'E', 'W', 'P', 'L', '\x04', '\x07', '\x15', 'T', 'V', 'L', '\x1b']

pt_head = 'ctf'

key = []
for i in range(3):
    key.append(ord(xored[i]) ^ ord(pt_head[i]))

flag = ''
for i in range(len(xored)):
    flag += chr(ord(xored[i]) ^ key[i%len(key)])
print flag
ctf{79f107231696395c004e87dd7709d3990f0d602a57e9f56ac428b31138bda258}