permission 100 3442 solves Ready to begin the gam...
创建于:2026年5月5日
使用 GPT-5.5 Thinking 回答 Chat01
创建于:2026年5月5日
使用 GPT-5.5 Thinking 回答 Chat01
permission
100
3442 solves
Ready to begin the game? A simple conversation can change everything.
题目地址:39.96.193.120:10000
附件下载
一般为ISCC{XXXX},如果为flag{XXXX}会在题目描述中说明
Flag
提交
这个附件是 32 位 pwn,利用链如下:
main() 里 printf(buf) 有格式化字符串漏洞。%n 把全局变量 target_val 从 3 改成 5。vuln() 后,read(0, buf, 0x100) 对 0x90 栈缓冲区溢出。system,执行 /bin/sh,再 cat flag。我这边连题目地址时返回 ConnectionRefused,所以没法直接拿到最终 flag,但 exploit 已经写好:
下载 permission_exploit.py
运行:
bashpython3 permission_exploit.py 39.96.193.120 10000
关键点:
pythonfmt = p32(0x0804c030) + b"%1$c%4$n"
这里第一个 dword 是 printf 的第 4 个参数,地址字节本身打印 4 个字符,再 %1$c 打印 1 个字符,%4$n 就把 5 写入 target_val。
栈溢出偏移是:
text0x90 buffer + 4 saved ebp = 148
所以第二阶段从 b"A" * 148 开始构造 ROP。