Skip to main content

A tool with interactive shell for finding gadgets in executable files

Project description

GadgetFinder

A tool with interactive shell for finding gadgets in executable files. Support ELF and PE file format, multiple architectures and modes: x86, ARM, 32bit, 64 bit. Can also assemble and disassemble instructions.

Requirements

  • capstone
  • keystone
  • pyelftools
  • pefile

Getting started

create a virtualenv:

virtualenv env            
source env/bin/activate   # activate the Python virtualenv 

Install development dependencies:

pip install -r requirements.txt

Run the interactive shell:

cd src/gadgetfinder
python3 shell.py

Examples

In the interactive shell, run:

asm inc eax; add eax,ecx  --arch x86  --mode 64
disas ['0xff', '0xc0', '0x1', '0xc8'] --mode 64
asm pop ebp; ret
disas ['0x5d', '0xc3']
load ../../data/prog.file 
info
dump
search pop ebp

Build your own package

You can edit configuration in setup.config.
To build:

python3 -m pip install --upgrade pip
python3 -m pip install --upgrade build
python3 -m build

Package usage

Installation

$ pip install gadgetfinder==0.0.1

Usage

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gadgetfinder-1.0.0.tar.gz (11.5 kB view hashes)

Uploaded Source

Built Distribution

gadgetfinder-1.0.0-py3-none-any.whl (13.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page