Skip to content
/ pwn-- Public

pwn++ is a Windows & Linux library oriented for exploit dev but mostly used to play with modern C++ features

License

Notifications You must be signed in to change notification settings

hugsy/pwn--

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e1bfa50 · Mar 29, 2025
Mar 29, 2025
Nov 24, 2023
Mar 29, 2025
Mar 29, 2025
Apr 7, 2024
Oct 25, 2024
Apr 20, 2023
Apr 20, 2023
Nov 8, 2023
Mar 29, 2025
Feb 8, 2020
Feb 8, 2025

Repository files navigation

logo

#include <pwn>

Docs Discord Read Code Open in VSCode CI

Quick start

Template

Use Git to clone the template in hugsy/template-pwn

git clone https://github.com/hugsy/pwn--template MyProject

CMake

include(FetchContent)
FetchContent_Declare(
    pwn++
    GIT_REPOSITORY https://github.com/hugsy/pwn--.git
    GIT_TAG main # or whatever other tag or use releases (URL)
)
FetchContent_MakeAvailable(pwn++)

What is it?

A poor rewrite of my PwnLib DLL in modern C++, battery-included pwn kit for Windows (and a bit for Linux).

Why?

Because:

  • I wanted a quick way to bootstrap my low-level experiments
  • it's unacceptable to struggle to disassemble code, to cross-compile your exploit or simply to have hexdump-like function
  • only C/C++ provides the real right way to write assembly code
  • modern C++ allows to do crazy useful offsec stuff, completely underused
  • I like writing code

The idea is to provide in C on Windows the same kind of functionalities than pwntools does in Python on Linux. It's also a toy library meant for exploring Windows in a more friendly way. So if you're looking for years of poorly written C++ tangled with performant inefficient ways to experiment low-level, go no further friend this library is for you.

Note: the original PwnLib was written around Windows 7 for feature testing. This is 100% Windows 10/11 focused, so expect things to go wrong if you use any other Windows version. Some stuff may also go wrong in x86. Better use 64. It's not a bug but a design choice 😋

Third-party libraries