
CVE-2021-3493 OverlayFS privilege escalation exploit framework with advanced red team features. Includes persistence mechanisms, post-exploitation modules, stealth capabilities, and comprehensive documentation. For authorized testing only.
OverlayFS Capability Privilege Escalation Framework - Red Team Professional Edition
DeepRoot framework is a comprehensive privilege escalation exploit for CVE-2021-3493 (OverlayFS Privilege Escalation) with advanced red team features including persistence mechanisms, stealth capabilities, and post-exploitation modules.
Created by: George S. Yanni
Original Advisory: https://ssd-disclosure.com/ssd-advisory-overlayfs-pe/
FOR EDUCATIONAL AND AUTHORIZED TESTING PURPOSES ONLY
DeepRoot framework is designed for:
DO NOT use against production systems without explicit authorization. Unauthorized access to computer systems is illegal.
CVE-2021-3493 is a privilege escalation vulnerability in the Linux OverlayFS filesystem that allows an unprivileged user to gain root privileges by exploiting improper capability handling in user namespaces.
Key Characteristics:
CLONE_NEWUSER) to map UID 0CLONE_NEWNS) for isolated mountssetxattr()CAP_ALL_EP (all capabilities) on target binaryCVE-2021-3493/
├── comprehensive.c # Main exploit source code
├── README.md # This file
│
├── Option_1_Inject_SSH_backdoor_key/
│ └── README.md # SSH backdoor guide
│
├── Option_2_Install_sudo_backdoor/
│ └── README.md # Sudo backdoor guide
│
├── Option_3_Install_cron_persistence/
│ └── README.md # Cron persistence guide
│
├── Option_4_Install_systemd_service/
│ └── README.md # Systemd service guide
│
├── Option_5_Install_LD_PRELOAD_backdoor/
│ └── README.md # LD_PRELOAD backdoor guide
│
├── Option_6_Collect_system_information/
│ └── README.md # System info collection guide
│
├── Option_7_Search_for_credentials/
│ └── README.md # Credential search guide
│
├── Option_8_Check_lateral_movement/
│ └── README.md # Lateral movement guide
│
├── Option_9_Establish_C2_connection/
│ └── README.md # C2 connection guide
│
├── Option_Shell_and_Cleanup/
│ └── README.md # Shell and cleanup guide
│
└── Stealth_Mode_Guide/
└── README.md # Stealth mode documentation
gcc -o comprehensive comprehensive.c
# Run the exploit
./comprehensive
# The exploit will:
# 1. Create necessary directories (./ovlcap/)
# 2. Set up user and mount namespaces
# 3. Mount OverlayFS
# 4. Set capabilities on binary
# 5. Execute privileged binary
# 6. Present post-exploitation menu
After successful privilege escalation, you'll see:
╔══════════════════════════════════════════════════╗
║ POST-EXPLOITATION MENU ║
╚══════════════════════════════════════════════════╝
Available actions:
1. Inject SSH backdoor key
2. Install sudo backdoor
3. Install cron persistence
4. Install systemd service
5. Install LD_PRELOAD backdoor
6. Collect system information
7. Search for credentials
8. Check lateral movement
9. Establish C2 connection
s. Spawn root shell
0. Cleanup and exit
Select option:
Each option has its own documentation folder with complete guides:
kernel.unprivileged_userns_clone=1 or CAP_SYS_ADMIN)The exploit targets systems vulnerable to CVE-2021-3493. Check your kernel version and ensure user namespaces are available.
Namespace Creation: Creates new user and mount namespaces using unshare(CLONE_NEWNS | CLONE_NEWUSER)
UID/GID Mapping: Maps current unprivileged UID to 0 (root) within the new namespace via /proc/self/uid_map and /proc/self/gid_map
OverlayFS Mount: Mounts OverlayFS with lower, upper, and work directories
Binary Copy: Copies the exploit binary to the overlay merge directory
Capability Injection: Uses setxattr() to set CAP_ALL_EP (all capabilities, effective and permitted) on the copied binary