Giter Site home page Giter Site logo

Comments (3)

Grazfather avatar Grazfather commented on May 20, 2024

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.

from gef-extras.

acondra2 avatar acondra2 commented on May 20, 2024

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)

from gef-extras.

hugsy avatar hugsy commented on May 20, 2024

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.

from gef-extras.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.