# CTFZone 2019 Quals チームTSG 非Writeup ※この記事は [CTF Advent Calendar 2019](https://adventar.org/calendars/4241) の6日目くらいの記事です。 博多市です。 先日開催された CTFZone 2019 Quals ですが、チームTSGは[lmt_swallow](https://twitter.com/lmt_swallow)先生の発案により「たまには本気で海外本戦行きを目指そう」というコンセプトのもと全力を出して大会に参加しました。最終的な結果は知られている通り10位ということで、(おそらく) ギリギリで予選通過というドラマチック展開に期せずしてなりました。 さて、TSGではCTF参加中の情報共有に、SlackおよびScrapboxを利用しています。基本、ここに書かれた内容はメモ書き程度のものですが、見返してみると案外面白く、本来の目的とは少し違った形で読むことができます。おそらくこういったメモ書きは他のチームにもあると思うので、ぜひとも読んで他のチームのわいわい感を知りたいなーと思う次第で、まずはTSGのものをdisclosureしてみようと思います。 Writeupとは少し違う趣ですが、楽しんで読んでもらえれば。 # Strange PDF (Forensics) ## Scrapbox - DOS/MBR boot sector ?? - [http://dbpedia.org/class/yago/Planet109394007](http://dbpedia.org/class/yago/Planet109394007) - みてる ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.png) - startxrefの位置がずれてる。なんで? - 正: 20664 - 誤: 20611 - 全部52くらいずらすとうまくいく - 何が? - xrefテーブルの指す座標 - ほえ、なんかtashiがうまくやってくれそうなので、応援してる ``` 00000000: 25 e2b7 b402 b700 %...... 00000010: b601 b201 cd10 b40a b039 b700 b905 00cd .........9...... 00000020: 10b4 02b7 00b6 01b2 03cd 10b4 0ab0 33b7 ..............3. 00000030: 00b9 0100 cd10 0000 0000 0000 0000 0000 ................ 00000040: 0000 000a .... ``` - この部分のコメントが謎 - LibreOffice Writer から出力するとこうなる? やってみよ - やってみたら `25 C3 A4 C3 BC C3 B6 C3 9F 0A` になったので違いそう? - ちなみにこれは `äüöß` - フォント自体は怪しくない、なんやろうなあ - テキストを描画してる部分を抽出すると以下のようになる ``` 0.1 w q 0 0.1 595.2 841.8 re W* n q 0 0 0 rg BT 56.8 774.1 Td /F1 12 Tf[<01>1<02>8<03>-16<04>10<0506>-1<07>1(\b)2<03>-8(\t\n)8<0b0c>]TJ ET Q q 0 0 0 rg BT 56.8 746.5 Td /F2 12 Tf[<01>8<0203>-6<04>39<03>1<05>]TJ ET Q q 0 0 0 rg BT 56.8 732.7 Td /F3 12 Tf[<010203040506>5<050708090a090b08080c0d030e>-3<070a>]TJ ET Q Q q /EGS5 gs /Tr4 Do Q ``` - この`[<01>]`みたいな記法しらんのやが - なんか文字の間に変な情報が挟まってる? - なんか文字のトラッキングを表現するらしい。空振りかな⋯⋯ - ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) is pro ## Slack ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>22:48:48</small> そういえばはっかーたし、PDFのやつどんな感じだったんだろう ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.png) **hakatashi** <small>22:49:10</small> scrapboxに書いてあるのか全てです、、、 ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>22:49:45</small> ぼくはあんまりずらせばいけるってやつわかっていないんですが、ずらすとPDFとしてなにか変わるんですか ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.png) **hakatashi** <small>22:50:53</small> 別にずらしても何も起きなくて、というか普通のPDFビューアはそこらへん壊れてても勝手に直して読んでくれます ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.png) **hakatashi** <small>22:51:26</small> 問題なのはなんでずれてるかってことで ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>22:51:43</small> fileすると、MS DOSって言われるのはなんでなんですか ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.png) **hakatashi** <small>22:51:49</small> ??? ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>22:51:58</small> あれ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>22:52:09</small> MSDOSじゃないや ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>22:52:10</small> 00000000.pdf: DOS/MBR boot sector ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.png) **hakatashi** <small>22:52:32</small> なんじゃこりゃ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>22:52:34</small> でもbinwalkとかしても特になんもわからんかった ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>22:52:51</small> 単なるミスっぽい ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>22:52:56</small> ほむ ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>22:52:58</small> しらんけど ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.png) **hakatashi** <small>22:53:26</small> いやヘッダ近くに怪しいコメントが有ってそれがなにか悪さをしてる可能性はあるかも? しらんけど ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>22:53:42</small> (DOSはともかく)ブートセクタ、ほとんど機械語が入っている場所なので ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>22:53:51</small> ないようがないようみがある ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.png) **hakatashi** <small>22:55:27</small> あれーたしかに0x55AAのシグネチャがあるな ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.png) **hakatashi** <small>22:55:33</small> なんやこれ ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>22:55:49</small> ほえぇ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>22:55:59</small> 0x55AA? ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.png) **hakatashi** <small>22:56:05</small> しかもわざわざその周りをコメントで囲んである ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>22:56:12</small> ほっむ ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.png) **hakatashi** <small>22:56:34</small> これが0x55AA ![](https://res.cloudinary.com/hakatashi/image/upload/v1575542526/image_9.png) ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.png) **hakatashi** <small>22:56:45</small> PDFの行コメントは `% hoge` ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>22:56:57</small> :ho-: ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>22:58:06</small> 一応IDAで開こうとしたんですけど、ところでいまいちわかっていません(それはむり?) ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.png) **hakatashi** <small>22:58:10</small> MBRって0バイト目から機械語が始まるんだっけ? もしかしたらなにがしかのアーキでディスアセンブルできるとか? ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>22:58:14</small> 分かる ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>22:58:28</small> 少なくともぼくのもってるIDAでは、怒られるだけでした ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>22:58:37</small> IDAでも低級だけどひらけないことはないはず ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.png) **hakatashi** <small>22:59:16</small> ``` 00000000: 25 e2b7 b402 b700 %...... 00000010: b601 b201 cd10 b40a b039 b700 b905 00cd .........9...... 00000020: 10b4 02b7 00b6 01b2 03cd 10b4 0ab0 33b7 ..............3. 00000030: 00b9 0100 cd10 0000 0000 0000 0000 0000 ................ 00000040: 0000 000a .... ``` これを見て何アーキかわかるバイナリかるた名人のかたを募集しています ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>23:01:46</small> ``` 00000000 25E2B7 and ax,0xb7e2 00000003 B402 mov ah,0x2 00000005 B700 mov bh,0x0 00000007 B601 mov dh,0x1 00000009 B201 mov dl,0x1 0000000B CD10 int 0x10 0000000D B40A mov ah,0xa 0000000F B039 mov al,0x39 00000011 B700 mov bh,0x0 00000013 B90500 mov cx,0x5 00000016 CD10 int 0x10 00000018 B402 mov ah,0x2 0000001A B700 mov bh,0x0 0000001C B601 mov dh,0x1 0000001E B203 mov dl,0x3 00000020 CD10 int 0x10 00000022 B40A mov ah,0xa 00000024 B033 mov al,0x33 00000026 B700 mov bh,0x0 00000028 B90100 mov cx,0x1 0000002B CD10 int 0x10 ``` ndisasmいやしらんけど ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>23:02:24</small> BIOSサービス0x10... ビデオ機能が使用できます ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>23:03:09</small> AHレジスタにファンクションコードを指定します ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>23:03:16</small> 2がカーソル設定 ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>23:03:26</small> 0xaが文字コード書き込み ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>23:03:49</small> <http://softwaretechnique.jp/OS_Development/Tips/Bios_Services/video_services.html> ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>23:04:20</small> 39って出力してるのかな(適当流し読み) ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.png) **hakatashi** <small>23:04:43</small> ふむ ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.png) **hakatashi** <small>23:04:53</small> x=39でフラグ送信してみるか? ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>23:05:11</small> ちゃんと囲んでね ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>23:05:16</small> フラグフォーマットで ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.png) **hakatashi** <small>23:05:33</small> wrong ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>23:07:10</small> 0x39でしょ ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.png) **hakatashi** <small>23:08:03</small> '9' ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>23:08:20</small> '9'を1,0、'3'を0,0に出力してると適当よみをしました ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>23:09:30</small> うーん ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>23:09:30</small> 1,1に'9'を5回,3,1に'3'を1回 ……? ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>23:09:34</small> 99399 ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>23:09:37</small> ほむ ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>23:09:40</small> ほむ ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.png) **hakatashi** <small>23:09:42</small> ほむ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>23:09:54</small> !?!?!?!?!?www ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>23:09:56</small> 天才!?? ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>23:10:07</small> 通った音ですか ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.png) **hakatashi** <small>23:10:10</small> 草www ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>23:10:14</small> まじ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>23:10:14</small> ![](https://res.cloudinary.com/hakatashi/image/upload/v1575542631/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88_2019-11-30_23.10.04.png) ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>23:10:19</small> めでたい ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.png) **hakatashi** <small>23:10:29</small> kurgm is pro ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>23:10:32</small> 適当よみはよくないね ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.png) **hakatashi** <small>23:11:05</small> やっぱオフセットずれてたのはこの謎シェルコードを適当に挿入してたからなんやな ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>23:12:13</small> TWに勝ってる # Fridge (PPC) ## Scrapbox - 4*4コ0か1が並んでいるパズル。座標を指定すると対応したところ(規則は分からん)が反転するっぽい - 同じところを2回やると元に戻るのでためしてやればよさそう? - 操作は可換だが... - 盤面ごとに反転する箇所は違うっぽい - うーん65536通り全探索ってまじ? - なんか2問目からは10x10になった は?????????←これ3問目だった![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) - 2^100の全探索は不可能なので何かしらの規則か破壊しどころがないとこわれてり - 4x4の盤面を16次元のベクトルb\bm b b,反転パターンを16x16の行列AA AとしてAx=bA \bm x = \bm b Ax=bを解けば良い(mod 2で)![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) - 1問目: 4x4, mod 2 - 2問目: 4x4, mod 2 - 3問目: 10x10, mod 2 - 4問目: 8x8, mod 8 - 5問目: 16x16, mod 16 - `ctfzone{thE_C@$3_of_TH3_S70leN_313Ph4n7}` ## Slack ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>22:45:14</small> えーとりあえずFridgeをします ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>23:16:00</small> Fridge、なに???? ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>23:16:11</small> エスパー問にしかみえなくなって鬱になっています ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>23:31:16</small> Fridge4チーム通してるまじ ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>23:31:19</small> えーなんだろ ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>23:31:57</small> y,xに対して-4≤y≤3 &amp;&amp; -16≤y*4+x≤15じゃないと受け付けてくれなそう これはあまり関係ないのかな ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>23:32:33</small> 4y+x が mod 16 で同じものを入れたら同じ結果を返しているように見えます ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>23:33:20</small> えー規則性をエスパーしないと不可能に見えて ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>23:58:53</small> GF(2)上で100x100の逆行列を求めるのって計算量的につらいですか ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>23:59:35</small> うーん無理ではないです ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>23:59:55</small> あーなるほどになった ![dai](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/6af742cd34c00fbf.png) **dai** <small>23:59:56</small> 掃き出したら100^3? ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>23:59:58</small> やるか ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>0:00:11</small> めんどくせ〜〜 ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>0:00:12</small> sageあたりになげたらひゅっととけそう ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>0:00:22</small> 固定なら僕に投げれば解いてあげます ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>0:00:28</small> not 固定 ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>0:00:29</small> インタラクティブだとほえ ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>0:00:31</small> きびい ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>0:00:41</small> ナンC\++以外書けないからC++で吐き出しちゃうんですが ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>0:00:48</small> いや僕なら適当にやって適当にとけちゃうようにするんですが ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>0:00:51</small> 分かる ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>0:00:55</small> sageの環境整備がめんどい ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>0:00:57</small> sage部分だけなら書いてもいいです ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>0:01:17</small> ナン、環境整備が世界一苦手のため... ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>0:01:47</small> 1 0 1 0 1 0 1 1 1 1 ... ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>0:01:56</small> 盤面がどんどん大きくなっていくとかじゃないといいな ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>0:02:14</small> みたいな感じの形式で投げてくれたら、それを解いて返すみたいな感じのを作れと言われたら作ります ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>0:02:29</small> ぐえちゃんだなあ ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>0:02:31</small> 作ってどこで実行するのさという ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>0:02:41</small> とりあえず上限が10x10だと思ってコードを書きます ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>0:02:56</small> ぼくのPCにはsageが入っていますが ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>0:03:08</small> あ、まだデバッグだったりがあるのか ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>0:03:10</small> C++をもらくんにもっていくんですか ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>0:03:30</small> え、なんか問題が分からなくて泣いています ![tsgbot](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/52332556dc8caa31.png) **tsgbot** <small>0:03:30</small> 本当に泣いていますか? ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>0:03:37</small> 問題はFridgeで ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>0:03:53</small> 最初2問は4x4で、3問目は10x10なんですが ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>0:03:57</small> ほえ ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>0:04:28</small> 01行列が与えられるんですね ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>0:04:49</small> scrapboxを読みました ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>0:04:53</small> :wai: ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>0:05:05</small> まあなんで逆行列が出てくるのか知りませんが。。。。 ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>0:06:13</small> i=10y+xについてflipする場所を1x100にまとめた100x100行列AについてAx=盤面なるxが求まればそこを使えばいいことがわかるので... ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>0:06:19</small> ときたいのはAx=bですね ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>0:06:27</small> F_2上です ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>0:06:50</small> ほむ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>0:13:56</small> いやわからん ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>0:13:59</small> :pensive: ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>1:32:19</small> Fridge回していたらなんかF_2じゃなくなった:ha: ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>1:36:30</small> 1問目: 4x4, F_2, 自明 2問目: 4x4, F_2 3問目: 10x10, F_2 4問目: 8x8, F_2ではない ←NEW! ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>1:44:18</small> Fridge、8チームも解いてるの、地獄 ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>1:44:56</small> Fridgeを3問目まで解くやつです ``` #!/usr/bin/env python2 from __future__ import print_function import socket from sage.all import IntegerModRing, Matrix, vector def recv(sf, n=4096): dat = sf.read(n) print(dat, end="") return dat def readline(sf): line = sf.readline() print(line, end="") return line def send(s, dat): print(dat, end="") s.send(dat) def get_dim(size): dim = int(size ** 0.5) assert dim * dim == size return dim def pos_str(dim, pos): y, x = divmod(pos, dim) return "{},{}\n".format(y, x) def recv_board(sf): l = readline(sf) int(l.split()[0]) # verify it is board dim = len(l.split()) lines = [l] + [readline(sf) for _i in range(dim - 1)] return [ int(cell) for line in lines for cell in line.split() ] def xor_board(b1, b2): assert len(b1) == len(b2) return [c1 ^ c2 for c1, c2 in zip(b1, b2)] def solve_xA_b(a, b): R = IntegerModRing(2) A = Matrix(R, a) B = vector(R, b) X = A.solve_left(B) return list(X) def solve_q(sf, s): board = recv_board(sf) size = len(board) dim = get_dim(size) flips = [] for i in range(size): send(s, pos_str(dim, i)) newboard = recv_board(sf) flips.append(xor_board(board, newboard)) board = newboard ans = solve_xA_b(flips, board) for i, b in enumerate(ans): if b: send(s, pos_str(dim, i)) try: recv_board(sf) except ValueError: pass def solve(sf, s): while True: solve_q(sf, s) HOST = "ppc-fridge.ctfz.one" PORT = 31337 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((HOST, PORT)) sf = s.makefile("r+") try: solve(sf, s) finally: recv(sf) s.close() ``` ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>1:44:58</small> ぷっっっっっろ ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>1:45:07</small> はいぷろ --- ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>14:13:53</small> kurgm is typing...(どきどき ![lmt_swallow](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/767783213269_0c6b6b1f966608841263_48.png) **lmt_swallow** <small>14:13:56</small> わかるな ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>14:14:27</small> mod 16の連立方程式の解のベクトルの要素の和をなるべく小さくするのってどうすればいいすかね ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.jpg) **hakatashi** <small>14:14:47</small> Fwd: @naan998244353 ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:17:05</small> ホア ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:17:46</small> ぐええ ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:17:48</small> うーん ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>14:18:30</small> Ax=bの特殊解1つは求まるんですが送信している途中に時間切れか何かで切られてしまう:hoge: ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:18:35</small> Imの元をえいやっとするしかなくて、どうすればええんやろという気持ち ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:19:03</small> どんな特殊解が出てるかって見られますか ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>14:19:57</small> ちょっちまっちくだしあ ![dai](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/6af742cd34c00fbf.png) **dai** <small>14:22:22</small> Ax = 0の解をいくつか見つけてAx=bの解と線形結合するとか? ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>14:31:38</small> @naan998244353 ``` A = [ 6 12 11 5 6 15 5 11 11 10 3 7 14 12 5 15 2 2 5 13 7 13 6 4 1 10 6 9 0 4 7 0 8 12 12 13 13 10 13 9 11 10 0 13 10 4 2 6 8 2 3 0 1 3 13 14 8 12 7 5 3 14 4 5 15 3 14 2 15 9 7 15 15 14 4 9 13 3 2 14 5 3 9 9 8 14 8 4 13 1 4 13 9 2 4 9 2 3 8 1 15 1 4 1 15 3 7 15 6 4 1 9 2 10 6 3 14 15 1 4 2 10 10 1 2 9 15 15 2 5 5 15 15 0 11 14 14 0 2 3 4 8 12 7 0 5 10 14 1 5 4 15 15 4 8 5 6 2 15 9 8 10 15 14 5 5 0 8 15 11 4 13 4 5 8 2 14 1 10 8 14 2 13 0 8 10 2 15 13 2 4 2 2 3 7 10 2 0 12 8 13 9 10 14 11 4 0 9 1 13 1 0 2 7 2 12 0 9 2 1 7 12 5 11 0 4 4 10 6 4 13 14 0 5 4 0 7 10 12 1 2 5 5 0 9 1 11 2 7 0 15 6 1 7 2 3] [ 5 6 9 12 15 5 8 8 4 7 8 11 4 4 6 8 10 12 15 14 13 13 12 14 9 4 2 2 8 12 7 6 2 3 14 15 9 9 14 15 10 12 8 13 9 3 12 8 11 5 14 13 1 13 13 13 8 7 0 15 0 12 15 13 14 5 8 6 11 6 0 9 2 2 13 2 10 9 10 15 4 0 5 0 15 0 2 13 13 10 13 1 1 9 11 9 11 9 8 12 1 10 12 6 2 5 3 14 9 0 8 11 15 3 10 2 4 15 0 7 0 5 15 1 5 3 10 14 1 4 11 15 4 5 14 11 15 9 8 9 6 4 13 12 15 12 12 6 10 12 0 12 2 1 1 0 1 14 9 5 8 14 12 11 8 0 13 1 4 11 14 10 8 10 11 5 13 1 10 12 15 14 7 4 13 13 0 11 13 6 3 15 9 15 8 10 4 8 13 6 6 5 1 8 7 2 10 14 6 0 7 4 0 5 14 15 0 2 8 1 0 4 12 13 12 11 8 13 13 13 10 3 14 13 13 14 9 9 4 0 9 3 2 10 3 1 3 9 2 8 9 3 2 12 1 9] ``` ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:32:19</small> フムー ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:32:43</small> だいたい2048回くらいのやりとりでタイムアウトされても困っちゃうみたいなところはあるんですが ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:32:46</small> ねこだね ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:32:53</small> うーん ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>14:33:03</small> &gt; Ax = 0の解をいくつか見つけてAx=bの解と線形結合するとか? :wakari: Ax=0の解を見つける方法が思いついていないためア ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:33:10</small> :wakari: ![JP3BGY](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/806787137923_89d6c7db3c3764b598c7_48.png) **JP3BGY** <small>14:37:24</small> Ax=0の解はAの各列が一次独立かどうかを考えるしか無いのでは ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:38:25</small> :riaru:なあ ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:38:27</small> ぐえだね ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>14:39:14</small> (ちなみにmodがもうちょっとおおきかったりすると、ベクトルを小さくするやつはLLLを疑うところではあります) ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>14:39:24</small> 適当です ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:39:35</small> 適当なことを言うんですが、一般の体でもAx=0なるx≠0が存在するのはdetA=0が必要十分? ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>14:39:47</small> そんなきがします ![JP3BGY](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/806787137923_89d6c7db3c3764b598c7_48.png) **JP3BGY** <small>14:39:49</small> あってるはず ![JP3BGY](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/806787137923_89d6c7db3c3764b598c7_48.png) **JP3BGY** <small>14:40:37</small> ところでmod 16だっけか、は体ではないような ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>14:41:20</small> wakari ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>14:43:11</small> 体でないので掃き出しができない? ![JP3BGY](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/806787137923_89d6c7db3c3764b598c7_48.png) **JP3BGY** <small>14:43:25</small> いやまあそんなことはないはず ![JP3BGY](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/806787137923_89d6c7db3c3764b598c7_48.png) **JP3BGY** <small>14:43:38</small> 環でも同じ話ができそうではある ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>14:43:47</small> 鯛でなくても最悪余因子行列からいける ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>14:44:00</small> うお ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>14:44:00</small> 最後にdet Aで割ることができなくてちーんっぽい ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>14:44:39</small> それは鯛ですね ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:46:18</small> うしたぷ ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:46:24</small> 泣いちゃった ![tsgbot](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/52332556dc8caa31.png) **tsgbot** <small>14:46:24</small> 本当に泣いていますか? ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:46:32</small> 数学が一生できひん ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>14:46:36</small> ホトトギス ![JP3BGY](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/806787137923_89d6c7db3c3764b598c7_48.png) **JP3BGY** <small>14:47:12</small> 環上の加群はよく知らないんだよなぁ ![JP3BGY](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/806787137923_89d6c7db3c3764b598c7_48.png) **JP3BGY** <small>14:48:59</small> とりあえず整域じゃないとdet A=0 &lt;=&gt; a_iは一次独立は言えないことはわかった ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:49:23</small> よさそう ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:49:31</small> とはいえxを取ってくるのは楽ではない? ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:49:54</small> 高速にIOと通信ができたらええんちゃう?と思ってしまう ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:49:56</small> できるんですか? ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:50:01</small> うしたぷにきあくんだね ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>14:51:14</small> 1975回操作しないといけないのに336回目で切られている ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>14:51:23</small> ウーン ![JP3BGY](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/806787137923_89d6c7db3c3764b598c7_48.png) **JP3BGY** <small>14:51:48</small> 掃き出し法は使えそう ![JP3BGY](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/806787137923_89d6c7db3c3764b598c7_48.png) **JP3BGY** <small>14:52:48</small> というか掃き出し法は単純にスカラー倍と足し算をやっているだけなので問題ないですね ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:53:02</small> :seyana: ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>14:53:13</small> 割り算しないっけ ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>14:53:16</small> :boukyaku: ![JP3BGY](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/806787137923_89d6c7db3c3764b598c7_48.png) **JP3BGY** <small>14:53:17</small> ちなみにIOが遅い理由はクライアント側の問題ではない可能性がある ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>14:53:23</small> ひえ〜 ![JP3BGY](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/806787137923_89d6c7db3c3764b598c7_48.png) **JP3BGY** <small>14:53:25</small> わり算はしない(掛け算だけ) ![JP3BGY](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/806787137923_89d6c7db3c3764b598c7_48.png) **JP3BGY** <small>14:53:45</small> というかわり算が必要なら掛け算に置き換えればいいだけなので ![JP3BGY](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/806787137923_89d6c7db3c3764b598c7_48.png) **JP3BGY** <small>14:54:15</small> 逆元を取るという意味ではなく、割るべき数を割るではなく割らない数をかけるという意味で ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>14:54:47</small> なるほど? ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>14:59:08</small> ping ppc-fridge.ctfz.one が230msくらいなのでもっとサーバに近いところで回すべきという説 ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>14:59:17</small> あーそれは大事 ![JP3BGY](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/806787137923_89d6c7db3c3764b598c7_48.png) **JP3BGY** <small>14:59:36</small> ロシア鯖? ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>15:00:26</small> `http://240.232.89.34.bc.googleusercontent.com` ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>15:01:31</small> United States California ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>15:01:35</small> アメリカっすね ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>15:02:48</small> アメリカにさばたてましょか ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>15:02:54</small> GCE ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>15:05:39</small> いらないですかそうですか ![JP3BGY](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/806787137923_89d6c7db3c3764b598c7_48.png) **JP3BGY** <small>15:06:33</small> ほしい! ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>15:06:53</small> 無料トライアルのやつを余らしてるのでせっかくなので自分でやります:pray: ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>15:07:03</small> :yosa: :sou: ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>15:14:43</small> pingが105ms:waiwai: ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>15:15:30</small> 105おそない? ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>15:15:33</small> いいけど ![JP3BGY](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/806787137923_89d6c7db3c3764b598c7_48.png) **JP3BGY** <small>15:15:34</small> でもそれでも遅くないか ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>15:17:18</small> us-west2のほうがいいのかな ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>15:54:24</small> us-west2、140ms!w ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>15:58:18</small> 2001回中1318回までは間に合っている ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>15:58:51</small> うーん ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>15:58:55</small> 厳しいな ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>16:15:21</small> VPS is ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>16:15:26</small> ? ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>16:30:35</small> `ctfzone{thE_C@$3_of_TH3_S70leN_313Ph4n7}` ![kurgm](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/35060502946_793e0b19ad62612d7097_48.png) **kurgm** <small>16:30:38</small> :yatta-: # Tic-Tac-Toe(Pwn) ## Scrapbox - まるばつゲームで100勝するお話 - 関係ないかもですが、get_human_move()では入力が2文字以下&'1'~'9'&該当マスが0である必要がありますが、最初の2条件のみを満たす入力を与えた後は2つ目の条件を満たさない入力も与えることができます。よって以下のように自分の番を飛ばすこともできます(負けやすくなるだけやんけ。。。) [![Image](https://gyazo.com/4e45f02461cf448c46947bf46a9c1052/thumb/1000)](https://gyazo.com/4e45f02461cf448c46947bf46a9c1052) - あ、pythonでのインデックスの負数の解釈のされ方を利用してます(この場合python側ではboard[-1]==board[9]が埋まったことになる - いや、これを利用してpythonの側の状態だけ、相手のマスを上書きできたりして・・・ - ぐええ。 (奪えるのはC側の配列アクセスの関係で7(.)番と8(/)番のマスだけでしたぁぁぁ) - 1回目は 5->3->1->'.' の入力で必勝できます - ただしそれによってboard【-2】に2が入ってしまい、しかもそこはゲームの度に初期化されないので以降この方法が禁じ手になってしまいます。ぐえぐえ - nameに自明なBoFあるやんけ - 最初にsessionIDを取得 - python側もboardの状態と勝利数を保持しているうえ勝利判定もpython側が独自に行うため、cmove/hmoveを恣意的に動かして勝つしかなさそう? - よってsend_state()の引数をいじって何回もこれを呼ぶ。1回勝つのに3回呼ぶ必要があり、愚直に考えればflagとるまで300回呼ぶ必要がある - だが許されてるROP長さは0x800であり、単に300回繰り返すとすると1回分あたり7byteほどしか使えない。どうにか同じコードを繰り返し実行させたいが、name buffer自体はサイズが0x11しかないからここにコードを保存しておくのは最低限しか無理そう - --> じゃあ方針が違うっぽいぐえ - 多分sessionIDを繰り返し使えばいいと思うんですけど(どうでしょう) - これ全部無視してシェル開くのならできそうなんだけど趣旨と違うから違うか 開いたとて出力はこっちに来ないわ - 見返すと恥ずかしいこと沢山書いてましたが、フロントのサーバが落ちてもバックグラウンドのサーバは生きてて内部状態を保持しているので、1勝したらぶち消しして次に行けばいい話でした ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) - サーバのIPは"10.0.15.252\0"でした( ♥ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) ♥) - ctfzone{h3r3_w3_g0_4g41n_t1c_t4c_t03_1z_4_n1z3_g4m3} ## Slack ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>0:33:26</small> まるばつゲームやってる方いますか ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>0:35:54</small> できそう感がでてきた ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>0:37:35</small> まじ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>0:37:42</small> ぼくまだ実行すらできてないねんけどw ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>0:39:05</small> あ、実行はできた ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>0:39:42</small> すごいヘボすぎるので多分違うんですが、scrapboxに書いたやり方で相手のマス上書きできたら幸せです ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>0:41:17</small> ほむ --- ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>1:50:20</small> あ! ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>1:50:36</small> マル×ゲーム ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>1:50:54</small> 5-&gt;3-&gt;1-&gt;"." ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>1:50:58</small> で必勝できる ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>1:51:21</small> 勝ったじゃん ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>1:52:19</small> ぐえ、だめだ。2回目以降それが禁じ手になる ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>1:59:53</small> そもそもにそんなんでいいなら100回っていう設定にしないな ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>2:08:27</small> えぇ自明なropがあるけどこれは既知? ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>2:15:38</small> ぐえ ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>2:15:49</small> ROPどこのことですか ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>2:16:01</small> あれ、これ名前でいけへん?(適当 ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>2:16:55</small> 完全にこの関数読み飛ばしてた ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>2:17:02</small> アホほど読んでるやん ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>2:17:22</small> 多分、直接pythonのサーバー触りに行ける状態にできそう ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>2:17:53</small> やるきがうせました@ ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>2:17:58</small> お願いします ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>2:18:15</small> ぼくはもう眠いので、明日がんばります --- ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>4:46:57</small> えー、いいガジェットが見つからない ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>4:56:00</small> 自分で作っちまえばいいんだ --- ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>9:37:41</small> よくしらんけど、これsessionの部分書き換えられたりできないですかscanf(session_buf)みたいな感じで ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>9:38:28</small> わざわざsession管理していることを考えても何回か分けて良いようにしている(or race conditionとかかなと思ったが違いそう)ってことだと思うので、そこをうおうおすればわいわいできそう ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>9:39:33</small> scanfじゃないか、そけっとごしなのめんどいな ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>10:39:16</small> tictactoe、定期的にポート確保(?)か何かに失敗するんだけど原因が全然わからん(殺した後ゾンビが確保しているのかと思ったけどそういうわけでもない?) ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>10:39:30</small> 一定時間するとできるようになるんですが ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>12:49:54</small> sessionID書き換えて必ず1勝するスクリプトはかけた ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:50:05</small> もう終わりやん ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>12:50:12</small> あとはこれを100回回せばいい感じですか? ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:50:26</small> そのつもりでした ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:50:43</small> ちゃんと新しいの発行したりして、みたいなのが必要ですが、まあ、そこらへんは ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>12:50:51</small> よくわかってないんですが、一回ncしてきったときも裏側のpythonは動いて情報保持したままですよね ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:51:02</small> はい ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>12:51:03</small> 新しいのを発行する必要ありますか ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:51:14</small> あーいや ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:51:38</small> 語弊が合って、なんか今1回勝ってるから、100回勝つなら、もう一度やり直さないとねみたいな適当を言いました ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:51:42</small> まあよしなに ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:51:59</small> これデバッグ果てしなくめんどくない?w ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>12:52:05</small> そのときって、1回勝ったらぶっちしてもう一回繋いでいいんですかね? ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>12:52:14</small> デバッグ今のところはそんなに。。。 ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:52:16</small> ぶっちは分からなくて、やめるコマンドなかったっけ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:52:30</small> ぶっちでいいのかな ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>12:52:36</small> まぁやってみます ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:52:39</small> プロ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:52:46</small> えーもうじゃあぼくはちがうのやるか ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:53:43</small> Baby Revみます ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>12:54:28</small> これぶっちすると表側のサーバが落ちるんですが。。。 ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:54:36</small> いや分かる ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:54:43</small> だからめんどくない ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:54:55</small> 表側って、Cの方ですよね ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>12:54:59</small> そうです ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:55:06</small> まあ落ちてもおkでは ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>12:55:19</small> あ、かしたに ![lmt_swallow](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/767783213269_0c6b6b1f966608841263_48.png) **lmt_swallow** <small>12:55:25</small> はかたし… ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>12:55:25</small> たしかに ![slackbot](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/T04G7TL4M-USLACKBOT-sv41d8cd98f0-72.png) **slackbot** <small>12:55:26</small> :hakatashi: ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:55:58</small> ただ、こいつが落ちるせいでデバッグ果てしなくめんどいマンになってしまった ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>12:56:32</small> あ、いける ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:56:37</small> はい天才 ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>12:56:45</small> だけど最後コマンド待って落ちるようにROP組まないと ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>12:56:52</small> いや普通にmainに戻ればいいか ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:57:23</small> なんか一気にやろうとしている?(ようわからん) ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:57:36</small> まあ応援しています うおうお ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>12:58:06</small> いや、1回かったらROPを終わらせないとコアダンプしちゃうので ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>12:58:08</small> いや ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>12:58:16</small> してもええんか。って何回行ったらわかるんだ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:58:19</small> コアダンプしてもいいのでは ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:58:20</small> はい ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>12:58:54</small> ![](https://res.cloudinary.com/hakatashi/image/upload/v1575561564/Screenshot_from_2019-12-01_12-58-31.png) ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>12:58:59</small> 順調にレベル上げられました ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>12:59:00</small> お〜〜 ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>12:59:07</small> 業者が来ました ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>13:00:22</small> 100称した後の処理も考えないとな ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>13:00:40</small> まあ、get_flag呼ぶだけだと思っていたんですが、詳しくは知りません ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>13:01:45</small> デバッグくそめんど侍 ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>13:20:25</small> もらさんやってますか ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>13:20:32</small> 実はやっています ![tsgbot](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/52332556dc8caa31.png) **tsgbot** <small>13:20:33</small> 本当にやっていますか? ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>13:20:36</small> ひそかに ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>13:20:37</small> ぐええ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>13:20:47</small> いやいやだったらやめます ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>13:20:57</small> ちょっとときたいかもです ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>13:21:03</small> はひっ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>13:21:04</small> やめます ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>13:21:08</small> あれ時間遅いことのデメリットないですよね ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>13:21:11</small> ないです ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>13:21:24</small> 当方現状他に解けそうな問題ないので現実逃避してただけですずびばぜん ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>13:21:38</small> じゃあちょっとだけやらせていただいても。。。 ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>13:21:44</small> ごめんなさい......... ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>13:22:50</small> ゆるぼ 解けそうな問題 ![lmt_swallow](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/767783213269_0c6b6b1f966608841263_48.png) **lmt_swallow** <small>13:23:03</small> もらさん、なんでもいけるのでは ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>13:23:14</small> ぜんぶといて ![lmt_swallow](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/767783213269_0c6b6b1f966608841263_48.png) **lmt_swallow** <small>13:23:39</small> 人少ないし全部とく勢いでやってよさそう(?) ![kcz146](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/817152403574_4170848a918f84255915_48.png) **kcz146** <small>13:24:10</small> もら「いや別に人多くても全部解く勢いでやるんですが」 ![lmt_swallow](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/767783213269_0c6b6b1f966608841263_48.png) **lmt_swallow** <small>13:24:29</small> すみません ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>14:17:04</small> rdiが、4だと思います(server_ipではなくsocketのfdなので) ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>14:17:20</small> rsiもおかしいな、rsiはsessionだと思います ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>14:17:33</small> rdxもおかしいな、これはsendしたい文字列の長さだと思います ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>14:18:23</small> send_allではなくsend_get_flagです ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>14:18:29</small> ごめんなさい ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>14:18:49</small> int send_get_flag(char *server_ip,char *session,char *message) ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>14:18:58</small> あれ、rsiってsessionじゃなくていいんでしたっけ ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>14:19:06</small> あ、そうだ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>14:19:12</small> 個人的印象では、send_get_flag(ip, session, session) ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>14:19:33</small> けどconnectで落ちちゃうのは。。。 ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>14:19:39</small> え ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>14:19:40</small> あれ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>14:19:52</small> あれ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>14:19:55</small> わかっておらず ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>14:21:21</small> あとnameを偽のsessionとして利用しているので、ここに偽のsessionIDいれてかつ上書きしてもらおうと思ってます ![tsgbot](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/52332556dc8caa31.png) **tsgbot** <small>14:21:22</small> 本当に思っていますか? ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>14:21:38</small> ほえ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>14:21:48</small> get_send_flagで落ちちゃうのよくわかっていないんですよね ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>14:37:27</small> @moratorium08 ローカル環境なのでレベル100じゃないですが、send_all()に入った直後はこれでよさげでしょうか ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>14:37:40</small> ![](https://res.cloudinary.com/hakatashi/image/upload/v1575560645/Screenshot_from_2019-12-01_14-35-31.png) ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>14:38:50</small> send_allしても画面になんも表示されへん ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>14:46:34</small> いや ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>14:46:39</small> 4 ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>14:46:53</small> rdi ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>14:47:06</small> あ、ポインタ になっとる ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:15:40</small> これはありきたりなことですが、ローカルとリモートで動作違うぐえぐえ ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:16:03</small> なんでやねんねん ![JP3BGY](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/806787137923_89d6c7db3c3764b598c7_48.png) **JP3BGY** <small>15:16:07</small> ありきたりではないんだよなぁ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:16:20</small> マジ? ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:16:59</small> てか、一つ疑問だったのは、リモートのサーバーどうやって動いてんねんという(というのも、毎回接続のたびに起動しないといけないでしょ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:17:03</small> ようわからん ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:18:10</small> ![](https://res.cloudinary.com/hakatashi/image/upload/v1575560778/Screenshot_from_2019-12-01_15-17-43.png) ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:18:44</small> 同じスクリプトを回しても、ローカルではmsg表示されてるのに、リモートではmsgがコピーされてない。。。 ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:19:29</small> サーバというのはCの方ですか ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:20:03</small> む ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:20:09</small> you cheatつってるし ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:20:17</small> 多分普通にmsg送られてない ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:20:24</small> んじゃないんですか ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:20:46</small> 後者がローカルで、レベル100じゃないのでmsgにはこのメッセージがコピーされます。もしレベル100だとmsgにはフラグが張られます ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:20:54</small> はい ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:21:09</small> 前者でもレベル100じゃないとしてもmsgにそのメッセージが張られてる想定なのですが ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:21:17</small> なぜかコピーがされてない ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:21:18</small> うーん ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:21:55</small> わからん!w ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:22:08</small> 100回回すのとりあえず試してみるのって厳しいですか ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:22:23</small> あ! ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:22:33</small> これ100回より多いとだめだ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:22:40</small> へー ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:24:57</small> いやでもメッセージが表示されないのは変だな ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:25:09</small> 100回回すか。。。 ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:26:22</small> やっぱだめだった。。。 ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:26:27</small> まじか、、、 ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:26:32</small> うーーーーん ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:26:40</small> あ、100回回したわけではなく ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:26:48</small> 丁度100勝してもだめでした ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:26:59</small> ぽむ ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:29:05</small> けどローカルで100回回したとて変わるのはpython側で送るmsgがFLAGかerrorかだけなので ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:29:09</small> あんま意味なさそう ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:29:21</small> pythonがカス? ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:29:28</small> うーーーーーーーん ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:29:35</small> ちょっと僕も試してみます ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:29:39</small> なぜmsgにローカルだとstrncpyされないのか ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:29:48</small> この時点でのスクリプト貼ります ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:29:50</small> ローカルだと? ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:29:53</small> あ、助かります ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:29:58</small> リモートだとでした ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:30:14</small> (省略) ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:30:21</small> (省略) ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:31:25</small> まず普通にncしてIDを発行したらコピーをして ./exploit4 -r したあとにペーストすると100勝してくれます ./exploit5 -r したあとにペーストするとsend_get_flagします ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:32:56</small> たしかになあ ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:33:03</small> (コメントは嘘ばっか言ってます) ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:33:47</small> モラトリアムさんの方法だと、少なくともチートメッセージは表示されますか? ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:33:57</small> いや、、、 ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:33:59</small> だめですねえ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:34:08</small> なんでこんなことになるねん ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:34:45</small> sec機構何もないからアドレスも変わらんはずだし。。。 ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:35:52</small> 40人解いてるからそんな変な仕組み無い気がするんだけどなぁ ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:41:35</small> いや、strncpyがされないはずないねんな ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:42:05</small> ということはやっぱrecv_allでtemp_msgに格納ができてないってこと ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:42:28</small> いや、だとしたらstrncpyでtemp_msgのゴミデータが0x100分入るか ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:44:05</small> ってことはどう考えてもsend_get_flagに渡すmsgのアドレスが意図したとおりになってないとしか考えられなそう ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:47:00</small> これ。。。無理 ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:51:29</small> え、意味がわからない ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:51:42</small> ずびばぜん ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:51:51</small> いや、謎ではという、、、、、 ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:52:28</small> 方針がちがうのかなぁ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:52:34</small> うーーーーーーーーーーーん ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:52:49</small> python経由でflag読めなかったらもう何をしてもきつい感ないですか ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:53:29</small> シェル開いてソケットに繋いでくれるシェルスクリプト的なんも意味ないですよね(適当 ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:53:46</small> 実際偉そう ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:54:11</small> 探してもないんですが ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:54:11</small> ただ、多分pythonは別インスタンスにあるとは思うんですが、何が起きているかは理解できるかもしれなさそう(ところで、なんもわからん・・・・・・・ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:54:30</small> 直接pythonのサーバーと会話できますよね ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:55:14</small> まぁシェル開けたらそうなるかもですけど、、、そうだとしたらクソ問感すごくないですか ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:55:22</small> 分かる・・・・・・・ ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>15:55:26</small> 全部ほっぽり投げてシェル開くって。。。 ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>15:55:30</small> :pensive: ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:00:08</small> とりあえずtic tac toeがちゃんと動作しているかtelegramで聞きました ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:00:21</small> 壊れてたぜhahahaって言ってくれ〜 ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:00:46</small> 絶対言わないですよ ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:01:21</small> 日本語喋れないでしょうし ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:01:44</small> 解答があったら配られたpythonファイルと、サーバーにあるファイルに違いがあるかを聞いてみます ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:02:05</small> ありがたいです!! ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:02:46</small> 冷静に考えて、レスポンス早すぎないですか? ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:03:02</small> recvで取りきれてなかったりしないかな ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:03:03</small> たしかに ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:03:12</small> ncでやるとメチャメチャ遅いですよね ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:03:16</small> 分かる ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:03:21</small> なんかそこあやしいきがしてきたな ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:03:28</small> 自分が悪い説出てきたな ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:03:34</small> うーーん ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:04:23</small> でもsend_allしないと表示されないわけで、そこまでいくには必ずmsgのstrncpyも経過してあるはず。。。 ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:04:43</small> 1000命令ぐらいのアウトオブオーダー実行している場合を除いて ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:05:30</small> yes, It's working, but very slow now. check after 5 minutes ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:05:45</small> というか鯖早くなったらうまくいくってことないかな(楽観 ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:05:48</small> たぶん遅いのは盤面の計算をしているから? ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:05:57</small> いや、最初の名前入力も遅いか ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:06:34</small> 速度ではかわらなさそう。。。 ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:07:14</small> 5分たってチェックしてなかったら慰謝料としてフラグをもらいます ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:08:25</small> ソケット周りよくわからないんですよね ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:10:19</small> ちょっと早くなった感笑 ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:14:23</small> 変わらず ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:14:26</small> できない ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:14:26</small> フラグの1文字目が改行とかだったら面白いな ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:14:41</small> 改行だとどうなるんですか ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:15:00</small> 多分recv_allは改行で止まるので ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:15:12</small> あーいや ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:15:15</small> うーん ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:15:20</small> うそっぽい ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:15:27</small> チートメッセージは改行の後も表示されてます ![tsgbot](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/52332556dc8caa31.png) **tsgbot** <small>16:15:28</small> 本当に表示されていますか? ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:15:41</small> そうっすよね ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:15:45</small> もうわからん・・・・ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:16:02</small> いずれにせよ、recv_allが0文字読み込みで帰ってるってことではあると思うんですよねえ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:16:14</small> で、その条件は、コネクションが切れるか、 ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:17:09</small> そうするとstrncpyで元のセッション情報が上書きされるはずなので ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:17:25</small> 画像のようにはならない気がするんですが ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:17:39</small> まった ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:17:39</small> あれ、0文字ならそうですかね ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:18:05</small> NULLだから止まるか ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:18:29</small> じゃあコネクションきれてるんですかね ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:18:54</small> あれ!w ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:18:56</small> あれ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:18:59</small> あれ? ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:19:04</small> ぽむ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:19:05</small> 127.0.0.1でいいんだっけ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:19:11</small> む ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:19:14</small> サーバサイドからしたら ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:19:17</small> いいんじゃないですか ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:19:18</small> そうなのか ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:19:31</small> え、じゃあシェル撮ったら、python見えたりしそうでは ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:19:41</small> はい ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:19:47</small> 認識していなかった ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:19:48</small> 1時間前に戻る ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:19:55</small> ずびばぜん ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:20:02</small> いえいえ冗談です ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:20:08</small> どう言う認識でしたか ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:20:19</small> 別鯖においてあるのかと思っていました ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:20:25</small> なるほど ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:21:11</small> pythonと直接対話してフラグ取ると言う方針ですか ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:21:29</small> そうするとcの部分全然使わないクソもん感が ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:21:41</small> えーちょっとまって、なんか ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:21:44</small> うーーーーーーーん? ![naan998244353](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/b9159e4fa26c6c82665286f22f8f0306-png.png) **naan998244353** <small>16:21:44</small> りだ :wave: ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:22:03</small> いやそうかやっぱ接続のどっかで失敗しているのか ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:22:06</small> なんで失敗するんだろう ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:22:32</small> まずレベルあげできてるか確かめたいですね ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:22:36</small> 分かる ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:22:45</small> これできてない説ない?w ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:22:45</small> そしたらサーバと通信できてるかわかる ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:22:53</small> ぼくとってもipを疑っています ![tsgbot](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/52332556dc8caa31.png) **tsgbot** <small>16:22:53</small> 本当に疑っていますか? ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:23:13</small> まあれべるあがってなかったとしてもmsgは見れるはずなので ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:23:19</small> やっぱ通信できてない ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:23:20</small> いや ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:23:28</small> ipが間違えていたら、接続失敗するので ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:23:39</small> なにも起こらないはず ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:23:45</small> はい ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:23:55</small> なので、IPが間違ってたりしませんかという ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:24:16</small> server_ip ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:24:22</small> server_ipをリークしてみよう〜 ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:30:00</small> うーむ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:31:50</small> server_ipになんでポインタみたいなのが入ってるんや ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:32:16</small> ASLR入って無い説無い?w ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:33:31</small> server_ipの中って何が入ってるはずなんや ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:33:59</small> アドレス ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:34:34</small> “127.0.0.1”へのぽいんたなきが ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:34:47</small> 見つけた!!!!!!!! ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:34:48</small> 10.0.15.252 ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:34:49</small> これです ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:35:16</small> できたっぽい ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:35:22</small> うおうおうおうおうおうおうおうおうおうおうおうおうおうお ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:35:31</small> かーびーさんあとはがんばって ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:35:47</small> はい ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:36:10</small> ``` dummy_session&gt; 0CkaNYw5J0RFH21OOQ7trt266nLDFRRX 48 88 [*] Switching to interactive mode You trying to cheat on me! \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00[*] Got EOF while reading in interactive $ ``` ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:36:13</small> これはきたきた ![lmt_swallow](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/767783213269_0c6b6b1f966608841263_48.png) **lmt_swallow** <small>16:36:15</small> ウオウオ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:36:17</small> もう優勝 ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:39:17</small> ctfzone{h3r3_w3_g0_4g41n_t1c_t4c_t03_1z_4_n1z3_g4m3} ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:39:18</small> プロ!!!!!!!!!!! ![lmt_swallow](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/767783213269_0c6b6b1f966608841263_48.png) **lmt_swallow** <small>16:39:20</small> わーーーーーーーーい ![hakatashi](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/W4JdsdHH_400x400.jpg) **hakatashi** <small>16:39:24</small> ぷーーーーーーーーーーーーーーーーーーーーー!!! ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:39:47</small> 99.9%う西伊豆産のおかげです ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:39:50</small> モラトリアムさん ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:40:04</small> @moratorium08 どうやってIP見つけました ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:40:18</small> server_ipをリークして出てきたアドレスをリークしました ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:40:48</small> 0x7ffff7fcf4d0 ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:40:58</small> ぽむ ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:41:27</small> server_ipをリークすると上のアドレス(これはスタック??)が出てきて、それを更にリークすると ``` Opening connection to pwn-tictactoe.ctfz.one on port 8889: Done 10.0.15.252\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 ``` ![moratorium08](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/936ffcc3d170bf42.png) **moratorium08** <small>16:41:31</small> が出てくる ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:41:51</small> 天才 ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:42:25</small> flag譲ってくれてめちゃめちゃ嬉しかったです(CTF初flagなので) ![smallkirby](https://res.cloudinary.com/hakatashi/image/upload/c_scale,w_24/842301843443_2373956c1f0190e8fe27_48.png) **smallkirby** <small>16:42:29</small> すいません、課題あるので退散します。頑張ってください --- # 長すぎてHackMDの文字数制限に引っかかったので後編に続く