pwnit


Namepwnit JSON
Version 0.7.1 PyPI version JSON
download
home_pageNone
SummaryAutomatic tool to quickly start a pwn CTF challenge
upload_time2025-09-10 21:28:59
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT License Copyright (c) 2025 Matteo Chiesa Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords ctf pwn
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PwnIt

This repository started as a fork of [spwn](https://github.com/MarcoMeinardi/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 REMOTE] [-i] [-t TEMPLATE] [-o] [--libc-source] [--patch] [--seccomp] [--yara]

pwnit is a tool to quickly start a pwn challenge

options:
  -h, --help            show this help message and exit
  -r REMOTE, --remote REMOTE
                        Specify <host>:<port>
  -i, --interactions    Create the interactions
  -t TEMPLATE, --template TEMPLATE
                        Create the script from the template
  -o, --only            Do only the actions specified in args
  --libc-source         Donwload the libc source
  --patch               Patch the executable with the specified path
  --seccomp             Check seccomp
  --yara                Check for given Yara rules
```

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:
```bash
sudo apt update
sudo apt install patchelf elfutils ruby-rubygems
# Or the equivalent for you package manager

sudo gem install seccomp-tools
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pwnit",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "Matteo Chiesa <matteo.chiesa.mc@gmail.com>",
    "keywords": "ctf, pwn",
    "author": null,
    "author_email": "Matteo Chiesa <matteo.chiesa.mc@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/42/15/87c9f6aec764154f55639836fdf0bdd9a85b324d6f0a29ac53b7f2b527ca/pwnit-0.7.1.tar.gz",
    "platform": null,
    "description": "# PwnIt\n\nThis repository started as a fork of [spwn](https://github.com/MarcoMeinardi/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.\n\n## Features\n- Auto detect files from cwd (executable and all the libs)\n- Analyze executable:\n  - `checksec`\n  - interesting functions\n  - seccomp rules\n  - cryptographic constants\n- Patch executable:\n  - Download and unstrip all the libraries related to the detected libc (loader included)\n  - Set runpath and interpreter of the executable with the libraries from the cwd or from the downloaded ones\n- Set binary and loader to be executable\n- Interactively generate functions to navigate a menu in the binary\n- Generate the solve script from your template\n- Download the libc source code\n\n## Usage\n```\nusage: pwnit [-h] [-r REMOTE] [-i] [-t TEMPLATE] [-o] [--libc-source] [--patch] [--seccomp] [--yara]\n\npwnit is a tool to quickly start a pwn challenge\n\noptions:\n  -h, --help            show this help message and exit\n  -r REMOTE, --remote REMOTE\n                        Specify <host>:<port>\n  -i, --interactions    Create the interactions\n  -t TEMPLATE, --template TEMPLATE\n                        Create the script from the template\n  -o, --only            Do only the actions specified in args\n  --libc-source         Donwload the libc source\n  --patch               Patch the executable with the specified path\n  --seccomp             Check seccomp\n  --yara                Check for given Yara rules\n```\n\nIf 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.\n\nTo 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 :)\n\n## Installation\nThis tool requires this packages:\n```bash\nsudo apt update\nsudo apt install patchelf elfutils ruby-rubygems\n# Or the equivalent for you package manager\n\nsudo gem install seccomp-tools\n```\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2025 Matteo Chiesa  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Automatic tool to quickly start a pwn CTF challenge",
    "version": "0.7.1",
    "project_urls": {
        "Homepage": "https://github.com/Church-17/pwnit"
    },
    "split_keywords": [
        "ctf",
        " pwn"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3253640e580abbba88b8976667e79744c57b021ec0066d27d6e6e306715eed8d",
                "md5": "a3ab9c0fe194c8b1d8e72a53bcd4f1d4",
                "sha256": "cb434d3cdab0ab3dd8507a6926ca2159eed742bea91bcd68972585b8d37a5992"
            },
            "downloads": -1,
            "filename": "pwnit-0.7.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a3ab9c0fe194c8b1d8e72a53bcd4f1d4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 17140,
            "upload_time": "2025-09-10T21:28:58",
            "upload_time_iso_8601": "2025-09-10T21:28:58.257861Z",
            "url": "https://files.pythonhosted.org/packages/32/53/640e580abbba88b8976667e79744c57b021ec0066d27d6e6e306715eed8d/pwnit-0.7.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "421587c9f6aec764154f55639836fdf0bdd9a85b324d6f0a29ac53b7f2b527ca",
                "md5": "ad4eb35e6f08bfa327d6372f4fe5f578",
                "sha256": "0f7b5911d4ede51dcdb7fc25e0ed336481d6af6d848be503c753f6ad334946e2"
            },
            "downloads": -1,
            "filename": "pwnit-0.7.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ad4eb35e6f08bfa327d6372f4fe5f578",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 12515,
            "upload_time": "2025-09-10T21:28:59",
            "upload_time_iso_8601": "2025-09-10T21:28:59.282158Z",
            "url": "https://files.pythonhosted.org/packages/42/15/87c9f6aec764154f55639836fdf0bdd9a85b324d6f0a29ac53b7f2b527ca/pwnit-0.7.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-10 21:28:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Church-17",
    "github_project": "pwnit",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pwnit"
}
        
Elapsed time: 0.58845s