Sudo Shutdown, Poweroff Privilege Escalation
The sudo shutdown
command might be vulnerable to privilege escalation (PrivEsc).
Investigation
If we can execute "shutdown" command as root, we can gain access to privileges by overwriting the path of "poweroff".
Exploitation
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.