この大会は2023/3/11 10:00(JST)~2023/3/12 22:00(JST)に開催されました。
今回もチームで参戦。結果は1876点で247チーム中56位でした。
自分で解けた問題をWriteupとして書いておきます。
Welcome Travelers (misc)
Discordに入り、#welcome-and-rulesチャネルのトピックを見ると、フラグが書いてあった。
nicc{glhf_dont_break_things}
Old Habits Die Hard (misc)
zipファイルとwordlist.txtが添付されている。zipファイルはパスワードがかかっているので、このwordlist.txtを辞書としてクラックする。
$ fcrackzip -u -D -p wordlist.txt Encryptedfile.zip PASSWORD FOUND!!!!: pw == password567
パスワードが"password567"であることがわかったので、このパスワードで解凍する。
$ unzip Encryptedfile.zip Archive: Encryptedfile.zip [Encryptedfile.zip] Decrypted_Flag.txt password: extracting: Decrypted_Flag.txt $ cat Decrypted_Flag.txt nicc{P@$$w0rd_l!$t$}
nicc{P@$$w0rd_l!$t$}
The Love Triangle (osint)
heroic_tomのInstagramを見てみる。
https://www.instagram.com/heroic_tom/
プロフィールのところにコードが書いてある。
596d463562433169595849745a6d64756247593d
デコードしていく。
>>> bytes.fromhex('596d463562433169595849745a6d64756247593d') b'YmF5bC1iYXItZmdubGY=' >>> from base64 import * >>> b64decode(b'YmF5bC1iYXItZmdubGY=') b'bayl-bar-fgnlf' >>> from codecs import * >>> decode('bayl-bar-fgnlf', 'rot13') 'only-one-stays'
nicc{only-one-stays}
Ow, my head... (osint)
写真が作られた日と、その場所のバーの名前を答える問題。
$ exiftool totallysafeatm.jpg ExifTool Version Number : 12.40 File Name : totallysafeatm.jpg Directory : . File Size : 2.9 MiB File Modification Date/Time : 2023:03:12 07:19:14+09:00 File Access Date/Time : 2023:03:12 08:45:05+09:00 File Inode Change Date/Time : 2023:03:12 07:19:14+09:00 File Permissions : -rwxrwxrwx File Type : JPEG File Type Extension : jpg MIME Type : image/jpeg Exif Byte Order : Big-endian (Motorola, MM) Compression : JPEG (old-style) Make : Pear Camera Model Name : iGlass Model III Orientation : Rotate 90 CW X Resolution : 72 Y Resolution : 72 Resolution Unit : inches Software : 3.14x Host Computer : iPhone X Y Cb Cr Positioning : Centered Exposure Time : 1/30 F Number : 1.8 Exposure Program : Program AE ISO : 33 Exif Version : 0231 Date/Time Original : 2033:03:16 07:38:31 Create Date : 2033:03:16 07:38:31 Offset Time : -05:00 Offset Time Original : -05:00 Offset Time Digitized : -05:00 Components Configuration : Y, Cb, Cr, - Shutter Speed Value : 1/30 Aperture Value : 1.8 Brightness Value : 3.935794183 Exposure Compensation : 0 Metering Mode : Multi-segment Flash : Auto, Did not fire Focal Length : 4.0 mm Subject Area : 2015 1511 2217 1330 Run Time Flags : Valid Run Time Value : 79449500759625 Run Time Scale : 1000000000 Run Time Epoch : 0 Acceleration Vector : -0.009773791758 -0.9959141606 0.01386730466 Warning : [minor] Bad format (16) for MakerNotes entry 15 Sub Sec Time Original : 431 Sub Sec Time Digitized : 431 Flashpix Version : 0100 Color Space : Uncalibrated Exif Image Width : 4032 Exif Image Height : 3024 Sensing Method : One-chip color area Scene Type : Directly photographed Exposure Mode : Auto White Balance : Auto Focal Length In 35mm Format : 28 mm Scene Capture Type : Standard Lens Info : 4-6mm f/1.8-2.4 Lens Model : iGlass Model III back quad camera GPS Latitude Ref : North GPS Longitude Ref : West GPS Altitude Ref : Above Sea Level GPS Time Stamp : 00:22:22.25 GPS Measure Mode : 3-Dimensional Measurement GPS Speed Ref : km/h GPS Speed : 0.1034737231 GPS Img Direction Ref : True North GPS Img Direction : 338.0708955 GPS Dest Bearing Ref : True North GPS Dest Bearing : 338.0708955 GPS Date Stamp : 2033:03:16 GPS Horizontal Positioning Error: 32.00483311 m Thumbnail Offset : 2514 Thumbnail Length : 10824 XMP Toolkit : Image::ExifTool 12.47 Creator : Simon Urgency : 1 (most urgent) Profile CMM Type : Apple Computer Inc. Profile Version : 4.0.0 Profile Class : Display Device Profile Color Space Data : RGB Profile Connection Space : XYZ Profile Date Time : 2022:01:01 00:00:00 Profile File Signature : acsp Primary Platform : Apple Computer Inc. CMM Flags : Not Embedded, Independent Device Manufacturer : Apple Computer Inc. Device Model : Device Attributes : Reflective, Glossy, Positive, Color Rendering Intent : Perceptual Connection Space Illuminant : 0.9642 1 0.82491 Profile Creator : Apple Computer Inc. Profile ID : ecfda38e388547c36db4bd4f7ada182f Profile Description : Display P3 Profile Copyright : Copyright Apple Inc., 2022 Media White Point : 0.96419 1 0.82489 Red Matrix Column : 0.51512 0.2412 -0.00105 Green Matrix Column : 0.29198 0.69225 0.04189 Blue Matrix Column : 0.1571 0.06657 0.78407 Red Tone Reproduction Curve : (Binary data 32 bytes, use -b option to extract) Chromatic Adaptation : 1.04788 0.02292 -0.0502 0.02959 0.99048 -0.01706 -0.00923 0.01508 0.75168 Blue Tone Reproduction Curve : (Binary data 32 bytes, use -b option to extract) Green Tone Reproduction Curve : (Binary data 32 bytes, use -b option to extract) Image Width : 4032 Image Height : 3024 Encoding Process : Baseline DCT, Huffman coding Bits Per Sample : 8 Color Components : 3 Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2) Run Time Since Power Up : 22:04:10 Aperture : 1.8 Image Size : 4032x3024 Megapixels : 12.2 Scale Factor To 35 mm Equivalent: 7.0 Shutter Speed : 1/30 Create Date : 2033:03:16 07:38:31.431-05:00 Date/Time Original : 2033:03:16 07:38:31.431-05:00 Thumbnail Image : (Binary data 10824 bytes, use -b option to extract) GPS Altitude : 2.3 m Above Sea Level GPS Date/Time : 2033:03:16 00:22:22.25Z GPS Latitude : 40 deg 43' 48.00" N GPS Longitude : 73 deg 58' 48.00" W Circle Of Confusion : 0.004 mm Field Of View : 65.5 deg Focal Length : 4.0 mm (35 mm equivalent: 28.0 mm) GPS Position : 40 deg 43' 48.00" N, 73 deg 58' 48.00" W Hyperfocal Distance : 2.07 m Light Value : 8.2
40°43’48″N 73°58’48″Wを、Google mapで検索する。この付近を検索すると、以下の場所に写真と同じものがあった。
https://www.google.co.jp/maps/@40.7300687,-73.9806366,3a,75y,326.23h,79.68t/data=!3m6!1e1!3m4!1siqlif9Ltcsg3HGGJTh-6QA!2e0!7i16384!8i8192?hl=ja
バーの名前はPlanet Rose。
nicc{20330316planetrose}
NICC 98 (web)
リンクされているjs/nicc98.jsには以下のように書いてある。
console.log("bmljY3tmbGlwX3RoM19zY3JpcHR9"); window.alert("Welcome to the web page of the NJIT Information and Cybersecurity Club!"); console.log("Alert successful.")
base64文字列らしきものをデコードする。
$ echo bmljY3tmbGlwX3RoM19zY3JpcHR9 | base64 -d nicc{flip_th3_script}
nicc{flip_th3_script}
Th3y d0nt sp3@k 1337 (web)
問題「NICC 98」のWebサイトを調べる。https://nicc-nicc-98.chals.io/robots.txtにアクセスする。
User-Agent: * Disallow: / # Hey - make sure to change the user-agent # What you put here doesn't work! Robots aren't speaking 1337, they just want to go to this page (robots.txt)! # Example: # User-Agent: dangr0b0ts # Disallow: /r0b0ts.txt
https://nicc-nicc-98.chals.io/r0b0ts.txtにアクセスすると、フラグが書いてあった。
nicc{@lw@ys_ch3ck_4_r0b0ts}
Apache Ain't So Bad (web)
URL文字列に"flag"が含まれているリクエストは許可されない。一部をURLエンコード文字にして、リクエストする。
$ curl https://nicc-apache-aint-so-bad.chals.io/secret/%66lag.txt nicc{UrL_ENC0DED_STR1NgS_AR3_SC@ry}
nicc{UrL_ENC0DED_STR1NgS_AR3_SC@ry}
HOSTile Takeover (web)
localを偽装する。
$ curl https://nicc-hostile-takeover.chals.io/admin -H "X-Forwarded-For: 127.0.0.1" {"message":"403 Forbidden"} $ curl https://nicc-hostile-takeover.chals.io/admin -H "Host: localhost" <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Evaluation deck</title> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> </head> <body> <h1></h1> nicc{H0ST_H3AdEr_AtTack} </body> </html>
nicc{H0ST_H3AdEr_AtTack}
Say Cheese! (forensics)
写真の撮影に使ったカメラのメーカーとモデルを答える問題。
$ exiftool Selfie.jpg ExifTool Version Number : 12.40 File Name : Selfie.jpg Directory : . File Size : 45 KiB File Modification Date/Time : 2023:03:11 11:36:05+09:00 File Access Date/Time : 2023:03:11 11:41:28+09:00 File Inode Change Date/Time : 2023:03:11 11:36:05+09:00 File Permissions : -rwxrwxrwx File Type : JPEG File Type Extension : jpg MIME Type : image/jpeg JFIF Version : 1.01 Resolution Unit : None X Resolution : 1 Y Resolution : 1 Exif Byte Order : Little-endian (Intel, II) Make : Security Camera Camera Model Name : Kmart Special Image Width : 589 Image Height : 733 Encoding Process : Baseline DCT, Huffman coding Bits Per Sample : 8 Color Components : 3 Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2) Image Size : 589x733 Megapixels : 0.432
nicc{Security_Camera_Kmart_Special}
No Expectation of Privacy (forensics)
"nicc"でパケットバイト列を検索すると、フラグが見つかった。
nicc{th3y_t011_f0r_th33}
Warped Image (forensics)
jpgのヘッダが壊れているので、修復する。
ef d8 -> ff d8
修復した画像にフラグが書いてあった。
nicc{F0rensics_M@gic_Byt3$!}
Backward Time (steg)
png拡張子だが、内容はjpg形式。jpg終端の後ろに以下のテキストがある。
----------------------------------------------- is this what you're looking for? 01101000 01100101 01110010 01100101 00100000 01101100 01101001 01100101 01110011 00100000 01110100 01101000 01100101 00100000 01100110 01101100 01100001 01100111 00100000 01100110 01110010 01101111 01101101 00100000 01101100 01101111 01101110 01100111 00100000 01101100 01101111 01101110 01100111 00100000 01100001 01100111 01101111 00101110 00101110 00101110 00100000 01101110 01101001 01100011 01100011 01111011 01100110 01100001 00110001 00110001 01101001 01101110 01100111 01011111 01100010 01100001 01100011 01101011 01011111 01110011 01110000 01110010 00110001 01101110 01100111 01011111 01100001 01101000 00110011 01100001 01100100 01111101 -----------------------------------------------
2進数表記文字列をデコードする。
#!/usr/bin/env python3 codes = '01101000 01100101 01110010 01100101 00100000 01101100 01101001 01100101 01110011 00100000 01110100 01101000 01100101 00100000 01100110 01101100 01100001 01100111 00100000 01100110 01110010 01101111 01101101 00100000 01101100 01101111 01101110 01100111 00100000 01101100 01101111 01101110 01100111 00100000 01100001 01100111 01101111 00101110 00101110 00101110 00100000 01101110 01101001 01100011 01100011 01111011 01100110 01100001 00110001 00110001 01101001 01101110 01100111 01011111 01100010 01100001 01100011 01101011 01011111 01110011 01110000 01110010 00110001 01101110 01100111 01011111 01100001 01101000 00110011 01100001 01100100 01111101' codes = codes.split(' ') flag = '' for code in codes: flag += chr(int(code, 2)) print(flag)
デコードの結果は以下の通り。
here lies the flag from long long ago... nicc{fa11ing_back_spr1ng_ah3ad}
nicc{fa11ing_back_spr1ng_ah3ad}
Crashed Bad (steg)
$ strings my_car.png | grep nicc{ nicc{it_needs_0il}
nicc{it_needs_0il}
plainsight (steg)
ブラウザのデベロッパーツールで、問題のレスポンスを見ると、"description"に以下のように書いてある。
"\tthis \udb40\udc6e\udb40\udc69\udb40\udc63is \udb40\udc63\udb40\udc7b\udb40\udc30just \udb40\udc72\udb40\udc5f\udb40\udc31a \udb40\udc35\udb40\udc5f\udb40\udc31simple \udb40\udc37\udb40\udc7dtext file\r\n\t"
\uXXXXの形式の文字が含まれている。末尾2桁を16進数のASCIIコードとして、"40"以外をデコードする。
>>> chr(0x6e) 'n' >>> chr(0x69) 'i' >>> chr(0x63) 'c' >>> chr(0x63) 'c' >>> chr(0x7b) '{' >>> chr(0x30) '0' >>> chr(0x72) 'r' >>> chr(0x5f) '_' >>> chr(0x31) '1' >>> chr(0x35) '5' >>> chr(0x5f) '_' >>> chr(0x31) '1' >>> chr(0x37) '7' >>> chr(0x7d) '}'
nicc{0r_15_17}
Great Scott! (steg)
$ stegseek great-scott.jpg dict/rockyou.txt StegSeek 0.6 - https://github.com/RickdeJager/StegSeek [i] Found passphrase: "" [i] Original filename: "steganopayload615282.txt". [i] Extracting to "great-scott.jpg.out". $ cat great-scott.jpg.out nicc{It's_All_About_the_Mets!}
nicc{It's_All_About_the_Mets!}
Everybody's SO Creative (steg)
Audacityで開き、スペクトログラムを見ると以下のように書いてある。
576840745F52406E6331645F54316D335F62306D62
hexデコードする。
>>> bytes.fromhex('576840745F52406E6331645F54316D335F62306D62') b'Wh@t_R@nc1d_T1m3_b0mb'
nicc{Wh@t_R@nc1d_T1m3_b0mb}
B1nary Bens0n (crypto)
2進数のコードで書かれているので、デコードする。
#!/usr/bin/env python3 with open('Message.txt', 'r') as f: codes = f.read().split(' ')[:-1] flag = '' for code in codes: flag += chr(int(code, 2)) print(flag)
nicc{I_can_r3@d_Binary_in its_binary_format}
Hours Behind (crypto)
シーザー暗号。https://www.geocachingtoolbox.com/index.php?lang=en&page=caesarCipherで復号する。
Rotation 8: I seemed to have found myself in the Roman Empire times, I do not remember for I got here, but I need the flag to find out how to get back to present day! Oh look, this could be the flag! nicc{0nly_t1me_w1ll_t3ll}
nicc{0nly_t1me_w1ll_t3ll}
Tell Me a Joke (crypto)
base64デコードする。
$ echo V2h5IGRpZCB0aGUgdG9tYXRvIHR1cm4gcmVkPwoKQmVjYXVzZSBpdCBzYXcgdGhlIHNhbGFkIGRyZXNzaW5nIQ== | base64 -d Why did the tomato turn red? Because it saw the salad dressing!
nicc{Why did the tomato turn red? Because it saw the salad dressing!}
Dear Tom (crypto)
Vigenere暗号。https://www.dcode.fr/vigenere-cipherで復号する。その際、付箋の画像にある"TIME"を鍵とする。
see_you_in_the_future
nicc{see_you_in_the_future}
What's camping without s'morse? (crypto)
wavファイルをAudacityで開くと、モールス信号になっている。
- .... . .-. . .----. ... / .- / .-. . .- ... --- -. / - .... .- - / .-. --- ... . ... / .... .- ...- . / - .... --- .-. -. ... .-.-.-
デコードする。
there's a reason that roses have thorns.
以下のフラグは通らなかった。
nicc{there's_a_reason_that_roses_have_thorns.}×
大文字にしてみると通った。
nicc{THERE'S_A_REASON_THAT_ROSES_HAVE_THORNS.}