pwndbg | Exploit Development and Reverse Engineering | Hacking library

 by   pwndbg Python Version: 2023.03.19 License: MIT

kandi X-RAY | pwndbg Summary

kandi X-RAY | pwndbg Summary

pwndbg is a Python library typically used in Security, Hacking applications. pwndbg has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can download it from GitHub.

pwndbg (/poʊndbæg/) is a GDB plug-in that makes debugging with GDB suck less, with a focus on features needed by low-level software developers, hardware hackers, reverse-engineers and exploit developers. It has a boatload of features, see FEATURES.md.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              pwndbg has a medium active ecosystem.
              It has 5615 star(s) with 758 fork(s). There are 138 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 157 open issues and 535 have been closed. On average issues are closed in 887 days. There are 16 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of pwndbg is 2023.03.19

            kandi-Quality Quality

              pwndbg has 0 bugs and 0 code smells.

            kandi-Security Security

              pwndbg has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              pwndbg code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              pwndbg is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              pwndbg releases are available to install and integrate.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              It has 24620 lines of code, 943 functions and 158 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed pwndbg and discovered the below as its top functions. This is intended to give you an instant insight into pwndbg implemented functionality, and help decide if they suit your requirements.
            • Tries to free memory
            • Returns a list of pointers to the nearestPC address
            • Enhances the given value .
            • Generate a list of heap chunks .
            • Allocate a chunk .
            • Get a description of the bug report .
            • This is useful for debugging .
            • Find the nearest instruction to the given instruction .
            • Main entry point .
            • Get a tuple to use .
            Get all kandi verified functions for this library.

            pwndbg Key Features

            No Key Features are available at this moment for pwndbg.

            pwndbg Examples and Code Snippets

            Setup
            Pythondot img1Lines of Code : 29dot img1License : Permissive (MIT)
            copy iconCopy
            docker pull etenal/syzscope:ready2go
            docker run -it -d --name syzscope -p 2222:22 --privileged etenal/syzscope:ready2go
            docker attach syzscope
            
            cd /root/SyzScope
            git pull
            
            docker pull etenal/syzscope:mini
            docker run -it -d --name syzscope --privilege  
            splitmind,TMUX
            Pythondot img2Lines of Code : 12dot img2License : Permissive (MIT)
            copy iconCopy
            python
            import splitmind
            (splitmind.Mind()
              .below(display="backtrace")
              .right(display="stack", cmd="grep rax", use_stdin=True)
              .right(display="regs")
              .below(cmd='sleep 1; htop')
              .below(of="stack", cmd='sleep 1; watch ls')
              .right(of="main",  
            splitmind,Install
            Pythondot img3Lines of Code : 12dot img3License : Permissive (MIT)
            copy iconCopy
            git clone https://github.com/jerdna-regeiz/splitmind
            echo "source $PWD/splitmind/gdbinit.py" >> ~/.gdbinit
            
            python
            import splitmind
            (splitmind.Mind()
              .below(display="backtrace")
              .right(display="stack")
              .right(display="regs")
              .right(of="  

            Community Discussions

            QUESTION

            Is there a way to completely disable gdb output?
            Asked 2019-Nov-02 at 15:18

            I have a C++ program a which has a win function, which is never being called.
            I can call it with gdb, by simply executing jump *win.
            The problem is, I'm trying to automate this process, with a one liner:
            gdb -q a -ex "break *main" -ex "run" -ex "jump *(_Z3winv)"
            Is there a way to see only the output from the program itself, without this:

            ...

            ANSWER

            Answered 2019-Nov-02 at 15:18

            Try adding the option -batch-silent to your gdb command

            see documentation 'gdb documentation'

            Source https://stackoverflow.com/questions/58671859

            QUESTION

            Debugging llvm with gdb but can't find source code
            Asked 2019-Oct-08 at 03:51

            llvm has been compiled in debug mode.

            ...

            ANSWER

            Answered 2019-Oct-08 at 03:51
            Remap source file pathnames for the debug session.

            If your source files are no longer located in the same location as when the program was built --- maybe the program was built on a different computer --- you need to tell the debugger how to find the sources at their local file path instead of the build system's file path.

            Source https://stackoverflow.com/questions/58262379

            QUESTION

            Why does a program created by a Brainfuck into assembly compiler crash?
            Asked 2019-Feb-10 at 18:09

            I'm writing a Brainfuck to NASM compiler in Haskell. It can compile small programs, but fails to do so correctly with big ones.

            Consider the following Brainfuck code:

            ...

            ANSWER

            Answered 2019-Feb-10 at 13:23

            Nothing's going on - the instructions are identical. In particular, jne and jnz are just aliases for the same instruction. (And byte ptr is just extra verbosity for what could in this case be inferred just from the size of the register operand)

            NASM assembled it correctly, pwndbg disassembled it correctly, ...and your compiler has some bug lurking somewhere. :)

            Source https://stackoverflow.com/questions/54616492

            QUESTION

            Linux Kernel Debugging: "Python Exception There is no member named module_core." when trying to use helper scripts in gdb
            Asked 2018-Sep-16 at 00:47

            I've been following this guide to set up a Linux kernel debugging environment with gdb and VMWare. Everything went on smoothly until that part:

            Connect GDB to the debuggee
            We won’t be able to see symbols from loaded kernel modules yet. We’ll load the helper script and then run lx-symbols, which will probe the loaded modules and configure GDB appropriately:
            (gdb) source home/alambert/kernel/source/linux-4.13.0/debian/build/build-generic/vmlinux-gdb.py
            (gdb) lx-symbols

            When running this on my system I get the following python error:
            pwndbg> source /home/user/kernel/source/linux-4.4.0/debian/build/build-generic/vmlinux-gdb.py pwndbg> lx-symbols loading vmlinux Python Exception There is no member named module_core.: Error occurred in Python command: There is no member named module_core.

            My setup

            Both the debugger and debugee machines are VMs, the debugee is a Ubuntu 16.04 and the debugger is a Ubuntu 18.04.

            Debugee:
            $ cat /proc/version Linux version 4.4.0-134-generic (buildd@lgw01-amd64-033) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) ) #160-Ubuntu SMP Wed Aug 15 14:58:00 UTC 2018

            Debugger:
            $ cat /proc/version Linux version 4.15.0-34-generic (buildd@lgw01-amd64-047) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #37-Ubuntu SMP Mon Aug 27 15:21:48 UTC 2018 $ gdb --version GNU gdb (GDB) 8.2 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. $ python -V Python 2.7.15rc1

            I first thought it was a python3/2 compatibility issue so I recompiled gdb with python 2.7, but got the exact same error.

            I have also verified it is not a pwndbg problem - I tried this with vanilla gdb to the exact same effect.

            I have verified that the python helper scripts had been created in the process of compiling the debugee kernel. I actually let the whole build process complete rather than stopping it once the scripts were created like the guide suggests - just to make sure all of them are in place.

            I have tried looking for the error online but there does not seem to be any mention of it.

            Did anybody ever encounter that problem?

            ...

            ANSWER

            Answered 2018-Sep-16 at 00:47

            After some digging in the sources of the scripts and the linux kernel, I have managed to fix the issue.

            The problem lies in this commit which replaced the module_core pointer with a module_layout struct in the include/linux/module.h header. The change had been apparently pulled into kernel 4.4.0 but was not accounted for in the helper scripts until a later version.

            This had been dealt with a while later (specifically - in this commit), so all kernel versions between 4.4.0 and 4.6-rc1 will have this bug.

            The solution is to download the scripts from the aforementioned commit and place them in the relevant directories.

            This is certainly a rare edge-case but I hope this answer will be helpful to somebody someday.

            Source https://stackoverflow.com/questions/52346447

            QUESTION

            what function set "program_invocation_name" ? and when?
            Asked 2018-Sep-12 at 00:35

            Here is a bit of information I got about program_invocation_name:

            • This value contains the name that was used to invoke the calling program.
            • This value is automatically initialized.
            • This value is global variable.
              (So at the first sight, I thought it was in <.bss> or <.data>.
              But it was in stack memory region. That's weird...
              )


            Here is debugger view of program_invocation_name:

            ...

            ANSWER

            Answered 2018-Sep-12 at 00:35

            Who(what function) set this value? (loader sets this value..?)

            You can answer this by setting a watchpoint on it:

            Source https://stackoverflow.com/questions/52275427

            QUESTION

            difference between strcmp and __strcmp_sse2_unaligned
            Asked 2018-Mar-28 at 09:17

            I got a binary and found the strcmp got not linked to libc strcmp but __strcmp_sse2_unaligned, and I want to know the difference between them.

            ...

            ANSWER

            Answered 2018-Mar-28 at 09:17

            As I understand, strcmp is one of so called indirect functions (this is a GNU extension), see GCC documentation on function attributes, the section on ifunc. When libc.so is being loaded, linker sees the strcmp symbol marked as indirect function:

            Source https://stackoverflow.com/questions/49503747

            QUESTION

            How Would I Show pwndbg or GEF Menus After Stepping at Breakpoint, But Without Stepping Again?
            Asked 2017-Mar-13 at 22:19

            How would I show the default menus for pwndbg (https://github.com/pwndbg/pwndbg) (e.g. disassemble, code, stack trace, ..etc) that are shown by default when a step is made, and the program is paused at a certain breakpoint, but without having to make another step to show those menus? I would like to ask the same question as well for GEF (https://github.com/hugsy/gef)?

            ...

            ANSWER

            Answered 2017-Mar-13 at 22:19

            I have found the answer I was looking for. It is the command "context" that produces the menus once again!!

            Source https://stackoverflow.com/questions/42772016

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install pwndbg

            You can download it from GitHub.
            You can use pwndbg like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            If you have any questions not worthy of a bug report, feel free to ping anybody on Discord and ask away.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Hacking Libraries

            wifiphisher

            by wifiphisher

            routersploit

            by threat9

            XSStrike

            by s0md3v

            pwntools

            by Gallopsled

            Atmosphere

            by Atmosphere-NX

            Try Top Libraries by pwndbg

            gdb-prebuilt

            by pwndbgC