sudo2shell

by KrishnaSSH

A Linux privilege escalation. You become root.

Reproduce

  1. Open a terminal.
  2. Type sudo -s and press Enter.
  3. Enter your root password and press Enter.
  4. You are root.
$ sudo -s
[sudo] password for user:
# whoami
root

Notes

This only works if you have the password and are allowed to use sudo, so it is the intended behavior of sudo and not a vulnerability. It won't get a CVE number.

Mitigation

Don't give people the root password, or remove them from sudoers.