Sudo Fail2ban Privilege Escalation
Investigation
sudo -l
(root) NOPASSWD: /etc/init.d/fail2ban restartfind /etc -writable -ls 2>/dev/null
4 drwxrwx--- 2 root security 4096 Oct 16 08:57 /etc/fail2ban/action.dless /etc/fail2ban/jail.conf
# ---------------------------------------------
# output
...
# "bantime" is the number of seconds that a host is banned.
bantime = 10s
# A host is banned if it has generated "maxretry" during the last "findtime"
# seconds.
findtime = 10s
# "maxretry" is the number of failures before a host get banned.
maxretry = 5
...Exploitation
1. Modify the Configuration File
2. Trigger the Action
Last updated