LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pwntools

Python library for binary exploitation

TLDR

Start Python with pwntools
$ python -c "from pwn import *"
copy
Create pwntools script
$ pwn template [binary] --host [host] --port [port]
copy
Check binary security
$ checksec [binary]
copy
Disassemble shellcode
$ disasm [hexstring]
copy

SYNOPSIS

pwntools Python library for exploit development

DESCRIPTION

pwntools is a CTF framework and exploit development library for Python. It provides utilities for binary exploitation, shellcode generation, and remote connections.

EXAMPLES

$ from pwn import *

# Connect to remote
r = remote('host', 1337)

# Start local binary
p = process('./binary')

# Read/write
r.recvline()
r.sendline(b'payload')

# Pack integers
payload = p32(0xdeadbeef)  # 32-bit
payload = p64(0x41414141)  # 64-bit

# Create shellcode
shellcode = asm(shellcraft.sh())

# ROP chain
rop = ROP('./binary')
rop.call('system', ['/bin/sh'])
copy

CLI TOOLS

$ # Check binary protections
checksec ./binary

# Create exploit template
pwn template ./binary > exploit.py

# Assemble shellcode
pwn asm 'mov eax, 1; int 0x80'

# Disassemble
pwn disasm '6a68682f2f2f73'

# Cyclic pattern
pwn cyclic 100
pwn cyclic -l 0x61616164
copy

INSTALL

brew install pwntools
copy
nix profile install nixpkgs#pwntools
copy

CAVEATS

Python library (pip install pwntools). Requires understanding of exploitation. For CTF and authorized testing only.

HISTORY

pwntools was created by Gallopsled CTF team, becoming the standard Python library for CTF exploit development.

SEE ALSO

pwn(1), checksec(1), gdb(1), radare2(1), ropper(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid