看板娘加载中
161 字
1 分钟
ctfshow stack overflow pwn81

shot 1 shot 2 shot 3

这道题目的 libc 去 ctfshow 专门给的虚拟机里找,路径放 exp 里了。

这里给了一个 system 函数的地址,然后转进 ctfshow() 函数。

shot 4

ctfshow 函数中有一个明显的栈溢出。0x100 - 0x88 = 0x78

GOT 表没法改,栈不可执行,运行地址随机化。

shot 5

先想办法利用 putsbinsh 上传至 bss 段然后再 system 调用 binsh 是否可行?

shot 6

不可行,因为有程序基址随机化。

在已知 system 函数地址的情况下我们是已知 libc 的,换言之直接用 libcbinshsystem("/bin/sh") 即可。

exp:

shot 7 shot 8

ctfshow{cf17cdbc-6596-4766-8a3c-7518b1a16ac5}

ctfshow stack overflow pwn81
https://alf-ovo.cn/posts/ctfshow-stack-overflow-pwn81/
作者
AlF
发布于
2026-06-01
许可协议
CC BY-NC-SA 4.0