Skip to content


Folders and files

Last commit message
Last commit date

Latest commit


Repository files navigation

Checks Status Deploy Status


A tool for automating starting binary exploit challenges


  • Set challenge binary to be executable
  • Download a linker (*) that can segfaultlessly load the provided libc
  • Download debug symbols and unstrip the libc
  • Patch the binary with patchelf to use the correct RPATH and interpreter for the provided libc
  • Fill in a template pwntools solve script


Short version

Run pwninit

Long version

Run pwninit in a directory with the relevant files and it will detect which ones are the binary, libc, and linker. If the detection is wrong, you can specify the locations with --bin, --libc, and --ld.

Custom template

If you don't like the default template, you can use your own. Just specify --template-path <path>. Check for the template format. The names of the exe, libc, and ld bindings can be customized with --template-bin-name, --template-libc-name, and --template-ld-name.

Persisting custom

You can make pwninit load your custom template automatically by adding an alias to your ~/.bashrc.

alias pwninit='pwninit --template-path ~/.config/ --template-bin-name e'


Arch Linux

Install pwninit or pwninit-bin from the AUR.


You can download statically-linked musl binaries from the releases page.

Using cargo


cargo install pwninit

This places the binary in ~/.cargo/bin.

Note that openssl, liblzma, and pkg-config are required for the build.


$ ls
hunter  readme

$ pwninit
bin: ./hunter
libc: ./

setting ./hunter executable
fetching linker
unstripping libc
setting ./ executable
copying ./hunter to ./hunter_patched
running patchelf on ./hunter_patched
writing stub

$ ls
hunter	hunter_patched  readme

#!/usr/bin/env python3

from pwn import *

exe = ELF("./hunter_patched")
libc = ELF("./")
ld = ELF("./")

context.binary = exe

def conn():
    if args.LOCAL:
        r = process([exe.path])
        if args.DEBUG:
        r = remote("addr", 1337)

    return r

def main():
    r = conn()

    # good luck pwning :)


if __name__ == "__main__":