What problem does it solve?
During authorized penetration tests, testers often overlook Linux capabilities as a privilege escalation vector, running getcap once and missing high-impact misconfigurations like cap_setuid on interpreters or cap_sys_admin in containers. This Skill provides a systematic workflow to enumerate, confirm, and exploit capability misconfigurations for local privilege escalation and container escape.
Core Features & Use Cases
- Capability Enumeration: Guides discovery of file and process capabilities using getcap, getpcaps, and capsh, including decoding raw capability masks.
- Exploitation Playbooks: Provides concrete command sequences for abusing cap_setuid, cap_dac_read_search, cap_dac_override, cap_sys_admin, cap_sys_ptrace, cap_chown, and ambient capabilities.
- Container Escape: Covers mounting host disks via cap_sys_admin and chrooting into the host filesystem from within a container.
- Use Case: A tester with a low-privilege shell finds /usr/bin/python3.11 = cap_setuid+ep via getcap -r /, then follows the Skill's steps to call setuid(0) and obtain a root shell, documenting the finding with the provided report template.
Quick Start
Ask the assistant to enumerate Linux capabilities on the target host and identify exploitable ones for privilege escalation.