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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file gadgetfinder-1.0.0.tar.gz.

File metadata

  • Download URL: gadgetfinder-1.0.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.5

File hashes

Hashes for gadgetfinder-1.0.0.tar.gz
Algorithm Hash digest
SHA256 83dd6e12a01aab25a6be88b819e6618b2303c03fba3f65a161eee9ee6e7bd868
MD5 5505fb2eb051b6a07b6bb14c24ce5d38
BLAKE2b-256 c9afe3931225cff0854d93eb5b2fac0c3c34bb9bdf6160194758cde785cc557c

See more details on using hashes here.

File details

Details for the file gadgetfinder-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: gadgetfinder-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.5

File hashes

Hashes for gadgetfinder-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce0502d803898e840b06d983d85c8b30b930fdf495a2421bcd8d439c7836ec7f
MD5 559a8700afffc586fb3bdddb0c301d59
BLAKE2b-256 12c43cd6995a1cd06c396a73172d21b4be2017600a62e3fd3bdee4910f6e76e4

See more details on using hashes here.

Supported by

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