Sudo Shutdown, Poweroff Privilege Escalation
Sudo shutdown command might be vulnerable to privilege escalation (PrivEsc).
If we can execute "shutdown" command as root, we can gain access to privileges by overwriting the path of "poweroff".
First create /tmp/poweroff binary which invoke a shell.
Then change permissions of the file and add "/tmp" folder to PATH.
Now execute "shutdown" as root.
/tmp/poweroff is executed and spawn a root shell.
Last updated