ret2shellcode
ret2shellcode
https://uuzdaisuki.com/2020/02/24/%E6%A0%88%E6%BA%A2%E5%87%BA%E4%B9%8Bret2shellcode/
http://www.mi1k7ea.com/2019/03/03/%E6%A0%88%E6%BA%A2%E5%87%BA%E4%B9%8Bret2shellcode/
https://ctf-wiki.org/pwn/linux/user-mode/stackoverflow/x86/basic-rop/#ret2shellcode
https://blog.csdn.net/m0_43405474/article/details/126546838
1 | #include<string.h> |
1 | gcc -g -fno-stack-protector -no-pie -z execstack -o test test.c |
ret2shell这项技术的前提是需要操作系统关闭内存布局随机化(ASLR)以及需要程序调用栈有可执行权限。
上面这个不行,看下面的肖爷代码
1 |
|
1 | gcc -g -fno-stack-protector -no-pie -z execstack -z norelro -o test test.c |
1 | from pwn import * |
刚开始忘了填充rbp了。哦对,还有amd64那里。还有gdb.debug调试那里。都是坑
Comments