Closed acondra2 closed 3 years ago
Please share the generated file, your python version, and your gdb version.
Looks likes bkps is a list of strings instead of breakpoints or numbers that know how to format, so probably has to do with your gdb version.
Python script that gef outputs:
#!/usr/bin/env python3
import sys, os
from pwn import *
context.update(
arch="i386",
endian="little",
os="linux",
log_level="debug",
terminal=["tmux", "split-window", "-h", "-p 65"],
)
REMOTE = False
TARGET=os.path.realpath("/home/user/Downloads/start")
elf = ELF(TARGET)
def attach(r):
if not REMOTE:
bkps = []
cmds = []
gdb.attach(r, '\n'.join(["break *{:#x}".format(x) for x in bkps] + cmds))
return
def exploit(r):
attach(r)
# r.sendlineafter(b"> ", b"HelloPwn" )
r.interactive()
return
if __name__ == "__main__":
if len(sys.argv)==2 and sys.argv[1]=="remote":
REMOTE = True
r = remote("chall.pwnable.tw", 10000)
else:
REMOTE = False
r = process([TARGET,])
exploit(r)
exit(0)
I suspect this is not the file that generated the stack because bkps
is empty.
However, there was a bug and it is fixed.
@acondra2 you're welcome to report bugs in gef (or gef-extras) but in the future provide as much details as possible for us to reproduce. Remember that we're not on your computer 😀 You can use this for a template example.
Cheers.
When running a generated exploit skeleton using skel.py from within gef, the resulting temp file cannot run and gives the following output: