All Projects → PLEXSolutions → readhook

PLEXSolutions / readhook

Licence: MIT license
Red-team tool to hook libc read syscall with a buffer overflow vulnerability.

Programming Languages

c
50402 projects - #5 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to readhook

Exploit-Development
Exploit Development - Weaponized Exploit and Proof of Concepts (PoC)
Stars: ✭ 84 (+170.97%)
Mutual labels:  exploit, rop, rop-exploitation, rop-gadgets, aslr, rop-chain, aslr-bypass
rop-benchmark
ROP Benchmark is a tool to compare ROP compilers
Stars: ✭ 23 (-25.81%)
Mutual labels:  rop, rop-gadgets, rop-chain
BFS2019
Bluefrost Exploitation Challenge 2019 - Exploit and Writeup
Stars: ✭ 20 (-35.48%)
Mutual labels:  buffer-overflow, rop-chain, aslr-bypass
pwnscripts
Very simple script(s) to hasten binary exploit creation
Stars: ✭ 66 (+112.9%)
Mutual labels:  exploit, rop, rop-gadgets
src
This is the source of our Return Oriented Programming tool.
Stars: ✭ 14 (-54.84%)
Mutual labels:  rop-exploitation, rop-gadgets, buffer-overflow
DrGadget
dr.rer.oec.gadget IDAPython plugin for the Interactive Disassembler <ABANDONED PROJECT>
Stars: ✭ 61 (+96.77%)
Mutual labels:  rop, rop-gadgets, rop-chain
Ropgadget
This tool lets you search your gadgets on your binaries to facilitate your ROP exploitation. ROPgadget supports ELF, PE and Mach-O format on x86, x64, ARM, ARM64, PowerPC, SPARC and MIPS architectures.
Stars: ✭ 2,908 (+9280.65%)
Mutual labels:  rop, rop-exploitation, rop-gadgets
SAP vulnerabilities
DoS PoC's for SAP products
Stars: ✭ 47 (+51.61%)
Mutual labels:  exploit, buffer-overflow
awesome-list-of-secrets-in-environment-variables
🦄🔒 Awesome list of secrets in environment variables 🖥️
Stars: ✭ 538 (+1635.48%)
Mutual labels:  exploit, red-team
Gef
GEF (GDB Enhanced Features) - a modern experience for GDB with advanced debugging features for exploit developers & reverse engineers ☢
Stars: ✭ 4,197 (+13438.71%)
Mutual labels:  exploit, exploit-development
H Encore
Fully chained kernel exploit for the PS Vita on firmwares 3.65-3.68
Stars: ✭ 968 (+3022.58%)
Mutual labels:  exploit, rop
HackingAllTheThings
My documentation and tools for learn ethical hacking.
Stars: ✭ 66 (+112.9%)
Mutual labels:  exploit, exploit-development
CVE-2021-44228-PoC-log4j-bypass-words
🐱‍💻 ✂️ 🤬 CVE-2021-44228 - LOG4J Java exploit - WAF bypass tricks
Stars: ✭ 760 (+2351.61%)
Mutual labels:  exploit, red-team
Trinity
Trinity Exploit - Emulator Escape
Stars: ✭ 371 (+1096.77%)
Mutual labels:  exploit, rop
Pwntools
CTF framework and exploit development library
Stars: ✭ 8,585 (+27593.55%)
Mutual labels:  exploit, rop
ShadowSteal
Pure Nim implementation for exploiting CVE-2021-36934, the SeriousSAM local privilege escalation
Stars: ✭ 186 (+500%)
Mutual labels:  exploit, exploit-development
Rop Tool
A tool to help you write binary exploits
Stars: ✭ 590 (+1803.23%)
Mutual labels:  exploit, rop
One gadget
The best tool for finding one gadget RCE in libc.so.6
Stars: ✭ 1,306 (+4112.9%)
Mutual labels:  exploit, libc
Search Libc
Web wrapper of niklasb/libc-database
Stars: ✭ 124 (+300%)
Mutual labels:  exploit, libc
Ctf
some experience in CTFs
Stars: ✭ 165 (+432.26%)
Mutual labels:  exploit, rop

readhook

Red-team tool to hook libc read syscall with a buffer overflow vulnerability.

Building

Readhook consists of a set of shared libraries that can be injected into an application to create an intentional buffer overflow vulnerability. The hook routines basehook.so and fullhook.so can be injected individually or as a chain using LD_PRELOAD. Both hooks insert themselves in front of the libc->read() system call and watch for magic strings to pass. Basehook.so contains the overflow endpoint alone, while fullhook.so adds helpful endpoints that assist in generating valid shellcode that can then be turned around and used by basehook.so for the actual overflow (fullhook.so also contains an overflow endpoint for convenience). (Additionally, there are two helper hooks for developers; nullhook.so which does nothing, and noophook.so which injects itself before the libc->read() function and simply passes the request through.)

./build.sh

Testing

First, start a listener (in a different shell) for test.sh to phone-home to. e.g.

nc -l 5555

Then, run test.sh. e.g.

./test.sh localhost:5555

Test.sh will run fullhook as an application. The default host is docker.for.mac.localhost. The default port is 5555. The purpose of test.sh and fullhook (the application) are to generate a payload against fullhook (the application) and manually call the internal, vulnerable buffer overflow with the generated payload. If a listener is started first, and reachable by fullhook (the application) running in the container, it should phone-home with a reverse shell. If the reverse shell fails to connect to the listener, or if the payload is not correct (a program error that test.sh is intended to detect for developers), the program behavior is undefined and may include: segment violation, illegal addresss, illegal instruction, infinite looping, and so on. In that sense, there is only one "defined" behavior for fullhook (the application), and that behavior is to phone-home to the listener. Failure to phone-home to the listener will result in "undefined" behavior by the program.

Tutorial

See https://blog.polyverse.io/an-intentional-buffer-overflow-hmm-5c357238b687

Additional Resources

This repository contains a simple node-based echo server with instructions on running under readhook.

git clone https://github.com/polyverse/node-echo-server

This repository contains the same node-based echo server built with readhook already pre-installed.

git clone https://github.com/polyverse/readhook-node-echo-server
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].