Skip to content

Instantly share code, notes, and snippets.

View Kazurin-775's full-sized avatar
💭
Making useless things all the time

Kazurin Nanako Kazurin-775

💭
Making useless things all the time
View GitHub Profile
@Kazurin-775
Kazurin-775 / malloc-trace.py
Created October 11, 2023 11:25
GDB-Python script to trace calls to `malloc()` and `free()`
# This script can print out the arguments and return values of `malloc()` and
# `free()`, thanks to the power of GDB-Python.
#
# Usage: load the target program in gdb, wait until libc is loaded (e.g. by
# executing `start`), then execute `source malloc-trace.py`, and enjoy!
#
# Note: this only works for Linux x86_64. Porting should not be difficult if
# you are familiar with the C calling convention on the target platform.
#
# Also, feel free to extend this script with the functionalities you want (e.g.
@Kazurin-775
Kazurin-775 / kctf-submitter.py
Created September 10, 2023 05:48
Kernel pwn exploit submitter, useful in CTF competitions, optimized for larger binaries and better terminal interactions
'''
A kernel pwn exploit submitter, optimized for larger binaries and better terminal interactions.
Best suitable when you have a large binary to send (>= 500 KiB), and other (non-chunked and
non-flow-controlled) senders result in truncated and corrupted binaries.
This normally runs at ~150 KiB/s for base64 encoded data, sufficient for use in CTF competitions.
Requires python-pwntools to be installed.
'''