
Modular framework for researching and exploiting a Linux kernel privilege escalation vulnerability using AF_ALG and page cache injection to modify SUID binaries in memory.
Modular framework for studying a Linux privilege escalation (LPE) vulnerability based on AF_ALG + Page Cache Injection techniques.
This project is designed for:
This framework implements a technique that allows:
The exploitation is based on the combination of multiple kernel mechanisms:
Allows interacting with cryptographic algorithms from user space through special sockets.
Specially crafted structures are sent to the kernel to trigger unexpected behavior.
Allows transferring data between file descriptors directly in kernel space (zero-copy).
The in-memory content of files is modified without altering the file on disk.
✔️ Result: The binary executes modified code only in memory
/usr/bin/su)python3 main.py
[+] Scanning system...
[+] Vulnerable kernel detected
[+] Target found: /usr/bin/su
[+] Injecting payload...
[+] Execution completed
/proc/crypto → AF_ALG
splice syscall → kernel transfer
exploit/
├── core.py # Exploitation engine
├── payloads.py # Payload management
├── targets.py # Target definitions
└── detectors.py # Vulnerability detection
modules/
├── logger.py # Structured logging
├── stealth.py # Anti-detection
└── utils.py # Utilities
main.py # Entry point
It may fail if mitigations such as the following are present:
This framework allows teaching:
This project is exclusively for:
❌ Do not use on systems without authorization.
MIT License