Skip to main content

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

Metadata

Release files for gadgetfinder 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gadgetfinder 1.0.0
File Size Uploaded Provenance Actions
gadgetfinder-1.0.0.tar.gz 11.5 kB Without provenance Details for gadgetfinder-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gadgetfinder 1.0.0
File Interpreter ABI Platform Actions
gadgetfinder-1.0.0-py3-none-any.whl Python 3 none any Details for gadgetfinder-1.0.0-py3-none-any.whl

Total release size: 24.5 kB

Release files / gadgetfinder-1.0.0.tar.gz

Download URL gadgetfinder-1.0.0.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
83dd6e12a01aab25a6be88b819e6618b2303c03fba3f65a161eee9ee6e7bd868
BLAKE2b-256 checksum
How to use checksums
c9afe3931225cff0854d93eb5b2fac0c3c34bb9bdf6160194758cde785cc557c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.5

Release files / gadgetfinder-1.0.0-py3-none-any.whl

Download URL gadgetfinder-1.0.0-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce0502d803898e840b06d983d85c8b30b930fdf495a2421bcd8d439c7836ec7f
BLAKE2b-256 checksum
How to use checksums
12c43cd6995a1cd06c396a73172d21b4be2017600a62e3fd3bdee4910f6e76e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.5

Security for gadgetfinder 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page