oin

writeup


[GUET-CTF2019]number_game

<p>[TOC]</p> <h1>🌓分析</h1> <p>首先是对输入的检测 <img src="https://pic.imgdb.cn/item/6389ab1316f2c2beb1c99e8d.png" alt="Img" /> 然后就对输入进行了处理 <img src="https://pic.imgdb.cn/item/6389af2f16f2c2beb1cfc9ff.png" alt="Img" /> 形成的结构为 <img src="https://pic.imgdb.cn/item/6389b0f516f2c2beb1d2d26e.png" alt="Img" /></p> <p>接着对输入进行了排序 <img src="https://pic.imgdb.cn/item/6389baf016f2c2beb1e3a7c9.png" alt="Img" /> 遍历循序为 index7 -&gt; index3 -&gt; index8 -&gt; index1 -&gt; index9 -&gt; index4 -&gt; index0 -&gt; index5 -&gt; index2 -&gt; index6 <img src="https://pic.imgdb.cn/item/6389bbf416f2c2beb1e4e54a.png" alt="Img" /> 然后将排序后的字节赋值到 data 段对应的地方,用 IDApyhon 提取出数据</p> <pre><code class="language-python">start = 0x601060 end = 0x601079 li = [] for i in range(start, end): li.append(chr(get_wide_byte(i))) print(li) # ['1', '4', '#', '2', '3', '3', '0', '#', '1', '#', '0', '#', '2', '3', '#', '#', '3', '#', '#', '0', '4', '2', '#', '#', '1']</code></pre> <p>发现每个填充的字符对应的都是‘#’ 最后一个检测是对比输入是否正确 <img src="https://pic.imgdb.cn/item/6389bd5616f2c2beb1e70ecb.png" alt="Img" /> 这个检测主要是检测每行每列是否有相同的数字,所以这里其实是一个 5*5 的数独,整理可以得到数独为</p> <pre><code>1 4 # 2 3 3 0 # 1 # 0 # 2 3 # # 3 # # 0 4 2 # # 1</code></pre> <p>可以很容易解出答案为 <code>0421421430</code> 这个顺序是对应排序后的,直接反出原本的顺序 <code>1134240024</code> <img src="https://pic.imgdb.cn/item/6389c2ad16f2c2beb1f0fbcb.png" alt="Img" /></p> <h1>🌓参考文章</h1> <p><a href="https://blog.csdn.net/ookami6497/article/details/119344717">https://blog.csdn.net/ookami6497/article/details/119344717</a></p> <h1>🌓附件</h1> <p><a href="https://cowtransfer.com/s/3c3c364551b945">https://cowtransfer.com/s/3c3c364551b945</a></p>

页面列表

ITEM_HTML