从题目中可以看出,本题应该是一个没有提供system函数地址的栈溢出题目,那么我们本题的考点应该是从libc中提取system函数地址。照例检查保护机制root@mypwn:/ctf/work/python# checksec level3 [*] '/ctf/work/python/level3'Arch: i386-32-little RELRO: Partial RELRO Stack: No canary found NX: NX enabled PIE: No PIE (0x8048000)只是开启了NX,那就没错了,可以执行栈溢出。打开ida看下反编译c语言代码:int __cdecl main(int argc, const char **argv, const char **envp) { vulnerable_function(); write(1, "Hello, World!\n", 0xEu); return 0; } ssize_t vulnerable_function() {
Norman1z