137 字
1 分钟
ctfshow 前置基础 pwn24
题目截图:

这题的关键点就是:pwntools 的 shellcraft 模块怎么利用。
先看一下常见的 shellcraft 生成结果:




IDA 没法正常做这题的反汇编分析,因为 call eax 这一行它解析不出来。
不过这题其实不需要在 IDA 里抠太细,思路直接走 ret2shellcode 就够了。核心就是把合适的 shellcode 塞进去,再把执行流劫持到那段 shellcode 上。
exp:


最后结果:

最终答案:
ctfshow{92113ca9-f749-44ea-9433-ed7f7448e91d}
ctfshow 前置基础 pwn24
https://alf-ovo.cn/posts/ctfshow-prerequisite-pwn24/