https://github.com/borodun/linux-capabilities
Study on linux capabilities
https://github.com/borodun/linux-capabilities
linux linux-capabilities
Last synced: 2 months ago
JSON representation
Study on linux capabilities
- Host: GitHub
- URL: https://github.com/borodun/linux-capabilities
- Owner: borodun
- Created: 2021-05-16T03:47:29.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-21T12:22:41.000Z (about 5 years ago)
- Last Synced: 2025-03-15T07:45:29.887Z (about 1 year ago)
- Topics: linux, linux-capabilities
- Language: C
- Homepage:
- Size: 39.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# capshow
Prints out info about capabilities
## Building
You need libcap-dev
```sh
$ sudo apt-get install libcap-dev
```
Then compile using gcc
```sh
$ gcc capShow.c -o capshow -lcap
```
## Usage
Show every capability of all threads
```sh
$ ./capshow
```
Show capabilities of particular process
```sh
$ ./capshow -p pid
```
Show readable version of capabilities
```sh
$ ./capshow -r
```
# capenv
An application locks itself, and all of its descendants, into an environment where the only way of gaining capabilities is by executing a program with associated file capabilities
## Building
You need libcap-ng-dev
```sh
$ sudo apt-get install libcap-ng-dev
```
Then compile using gcc
```sh
$ gcc capEnviron.c -o capenv -lcap-ng
```
## Usage
Run program with some capabilities
```sh
$ sudo ./capenv (capabilities_to_add ...) -p program_path program_args
```
Run programm without any capabilities
```sh
$ sudo ./capenv -p program_path program_args
```
## services
Services were used for testing ways of manipulating capabilities of a program