
Automates vulnerability check for sudo versions and privilege escalation via sudoedit if exploitable, helping users test and gain root access.
automatically exploit the sudoedit vulnerability fo CVE-2023-22809
For guide use the following link https://medium.com/@spydomain1/cve-2023-22809-f36a2b3804b3
This Python script automates the exploitation of CVE-2023-22809, a vulnerability affecting certain versions of sudo when used with sudoedit. If the user is allowed to run sudoedit or sudo -e on arbitrary files as root, privilege escalation is possible. This script checks for the vulnerable version, verifies sudoedit privileges, and then helps escalate to root by modifying /etc/sudoers.
⚠️ DISCLAIMER: This tool is for educational and authorized penetration testing purposes only. Do not use it on systems you do not own or have permission to test.
sudoedit (sudo -e)sudo version is within the vulnerable range.sudoedit or sudo -e as root or with (ALL) privileges./etc/sudoers file./etc/sudoers with sudoedit.sudo su root.sudo version installedsudoedit access with (root) or (ALL) privilegescd CVE-2023-22809-automated-python-exploits/
python3 script.py