Skip to main content

PwnIt

This repository started as a fork of spwn. It was a good tools for initialize a PWN challenge, but I wanted more customization, and since it had not been maintained for a couple of years, I started to look into the code to give more freedom to the user. In the end, I ended up completely refactoring the code and adding some useful features.

Features

  • Auto detect files from cwd (executable and all the libs)
  • Analyze executable:
    • checksec
    • interesting functions
    • seccomp rules
    • cryptographic constants
  • Patch executable:
    • Download and unstrip all the libraries related to the detected libc (loader included)
    • Set runpath and interpreter of the executable with the libraries from the cwd or from the downloaded ones
  • Set binary and loader to be executable
  • Interactively generate functions to navigate a menu in the binary
  • Generate the solve script from your template
  • Download the libc source code

Usage

usage: pwnit [-h] [-r HOST:PORT] [-o] [-i] [-t TAG] [-p PATH] [--seccomp] [--yara RULES_FILEPATH] [--libc-source]

pwnit is a tool to quickly start a pwn challenge

options:
  -h, --help            show this help message and exit
  -r HOST:PORT, --remote HOST:PORT
                        Specify <host>:<port>
  -o, --only            Do only the actions specified in args
  -i, --interactions    Create the interactions
  -t TAG, --template TAG
                        Create the script from the template
  -p PATH, --patch PATH
                        Patch the executable with the specified path
  --seccomp             Print seccomp rules if present
  --yara RULES_FILEPATH
                        Check for given Yara rules file
  --libc-source         Donwload the libc source

If the files have weird names (such as the libc name not starting with libc), the autodetection will fail; the best fix for this is to rename the files.

To understand how the interactions creation works, I suggest to just try it out. It should be pretty straight forward, but if you want to pwn as fast as possible, you cannot waste any time :)

Installation

This tool requires this packages:

sudo apt update
sudo apt install patchelf elfutils ruby-rubygems
# Or the equivalent for you package manager

sudo gem install seccomp-tools

Metadata

Release files for pwnit 0.7.7

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

Source distribution (sdist)

Source distribution for pwnit 0.7.7
File Size Uploaded Provenance Actions
pwnit-0.7.7.tar.gz 12.7 kB Without provenance Details for pwnit-0.7.7.tar.gz

Built distribution (wheel)

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

Total release size: 31.0 kB

Release files / pwnit-0.7.7.tar.gz

Download URL pwnit-0.7.7.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1cc9e3aaa752cffe85de6ed6c5774d19a037cdf13e7c11bec1aeacd683abb851
BLAKE2b-256 checksum
How to use checksums
26dff2a91f5d61e6c935da88f2b7c869f060e94c3ab798bd8569e033d8570b24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / pwnit-0.7.7-py3-none-any.whl

Download URL pwnit-0.7.7-py3-none-any.whl
Size 18.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ca2c25e3cd16436aded70179d2ec721fa4c6fc3fabfcead3e0e7a340b0962cb9
BLAKE2b-256 checksum
How to use checksums
cbab9be76116ed28367f521297fcfe4035d2cff5796e6a20193fd65218e16ca8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for pwnit 0.7.7

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