capsh
A Linux tool that shows and changes process capabilities, including decoding the hexadecimal masks in /proc status.
In more detail
capsh --decode turns a CapEff value such as 00000000a80425fb into capability names. It can also start a shell with a reduced capability set for testing.
Example
The same bitmask can be decoded in a few lines of Python by testing each bitRelated terms
- Linux capabilities — Separate pieces of root power, such as binding low ports or changing file owners, that can be granted or removed one by one.
- /proc filesystem — A virtual folder the Linux kernel fills with live information about processes and the system.
Taught in
- Container Hardening: Distroless & Rootless — Cloud Security & DevSecOps Engineering