Python Privilege Escalation
Python Privilege Escalation
There are multiple ways to escalate with python
EXAMPLES:
MODULE HIJACKING
SETENV: NOPASSWD /usr/bin/python /home/whatever/script.pyimport os; os.system('/bin/bash') chmod +x pwned.pySUDO PRIVILEGE ESCALATION
MODULE OVERRIDING
OS COMMANDS IN INPUT()
BLACKLISTED PYTHON MODULES
Examples:
PYTHON YAML PRIVILEGE ESCALATION
Python yaml package is vulnerable to execute arbitrary commands
Base64 Encoding RCE
Reverse Shell
Last updated