type
status
date
slug
summary
tags
category
icon
password
题目链接在此,供各位师傅下载练习
前几天学长给了一道maze的题,动态调试过程可谓非常艰难(对我现在的水平而言),于是学长提供了一种用subprocess的方法
我自己的虚拟环境是kali 2023.3 内存 4G 处理器2x2
📝 程序分析

首先通过字符串定位到主函数那里,我们发现cmp那里其实是一个长度校验,判断路径的长度是不是为140

这里为判断路径方向

中间过程太复杂,我们直接跳到后面,我们发现他判断所处位置是不是为0,还有判断最后到达位置对不对的
经过这个分析我们并不知道迷宫在哪,因此我们才要尝试爆破的方法。
📝 爆破处理
首先第一步,我们要把长度校验给patch掉

重点的patch在后面,我们为了一步一步进行爆破,我们要对每一步进行爆破
但是有一个问题,后面不管走不走对都会输出
我们可以先写一个简单的试验一下

我们发现根本无法判断是不是走对了,这个时候我们再patch一下

把下面那个指向wrong的地址改为指向' what()'的地址
我们这个时候可以再看一下

发现有不一样的回显了,我们根据这个可以写一个脚本,但是这里有一个问题,它在程序里面每走一步不会把走过的给标记,所以我们得自己标记一下,由于没有写这个标记,导致脚本跑了好久也没跑出来。
📝 Exp

差不多二十秒的时间跑出来
如果师傅们有更好的思路欢迎来交流😁😁😁😁
📎 参考资料
有关实现的问题,欢迎您在底部评论区留言,一起交流~
- Author:5m10v3
- URL:https://5m10v3.top/article/0f298810-366d-4fed-a3f4-a83672221f9c
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!
Relate Posts