privesc-linux

privesc-linux is a skill for Claude Code from hypnguyen1209/offensive-claude. It costs 84 tokens per session (2,920 once invoked), scanned B, original, MIT.

A Linux security guide for finding ways to move from a limited account to a more privileged account, such as root. It covers common configuration mistakes, container escapes, and kernel vulnerabilities.

In plain words
What is it for?
Reviewing Linux servers, workstations, CI runners, containers, and Kubernetes pods after gaining an initial shell, including checks for SUID files, sudo rules, capabilities, and writable services.
Why use it?
It organizes host checks so security testers can find risky permissions, services, scheduled jobs, or vulnerable software before attempting a privilege increase.

Skill for Claude Code

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

Part of the offensive-claude plugin — 30 skills, 18 commands, 8 agents, 1 hook shipped together

Good fit Reviewing Linux servers, workstations, CI runners, containers, and Kubernetes pods after gaining an initial shell, including checks for SUID files, sudo rules, capabilities, and writable services.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hypnguyen1209/offensive-claude/privesc-linux
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add hypnguyen1209/offensive-claude --skill privesc-linux
Clone the repo
git clone --depth 1 https://github.com/hypnguyen1209/offensive-claude

Made for: Claude Code.

Or install offensive-claude, the plugin that ships this one along with the rest of its 30 skills, 18 commands, 8 agents, 1 hook.

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 privesc-linux

README.md
[![agentmods](https://agentmods.dev/badge/skills/hypnguyen1209/offensive-claude/privesc-linux/github.svg)](https://agentmods.dev/skills/hypnguyen1209/offensive-claude/privesc-linux)
Your own site
<a href="https://agentmods.dev/skills/hypnguyen1209/offensive-claude/privesc-linux"><img src="https://agentmods.dev/badge/skills/hypnguyen1209/offensive-claude/privesc-linux/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 privesc-linux

Your own site · 80×15
<a href="https://agentmods.dev/skills/hypnguyen1209/offensive-claude/privesc-linux"><img src="https://agentmods.dev/badge/skills/hypnguyen1209/offensive-claude/privesc-linux.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,920 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 24 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 7
    Potential security issue detected. Manual review is recommended.
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
  • high YARA Match · line 7
    YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
    Fix: Remove offensive tool references and exploit code. Legitimate agent skills should not contain penetration testing tools, exploit frameworks, or reconnaissance utilities.
  • high Tool Misuse · line 49
    Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
    Fix: Limit tool chaining depth and validate the output of each tool before passing it to the next. Require explicit user approval for multi-step chains.
  • high Tool Misuse · line 50
    Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
    Fix: Limit tool chaining depth and validate the output of each tool before passing it to the next. Require explicit user approval for multi-step chains.
  • high Tool Misuse · line 51
    Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
    Fix: Limit tool chaining depth and validate the output of each tool before passing it to the next. Require explicit user approval for multi-step chains.
  • high Tool Misuse · line 102
    Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
    Fix: Limit tool chaining depth and validate the output of each tool before passing it to the next. Require explicit user approval for multi-step chains.
  • high Tool Misuse · line 103
    Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
    Fix: Limit tool chaining depth and validate the output of each tool before passing it to the next. Require explicit user approval for multi-step chains.
  • high Privilege Escalation · line 119
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 120
    Potential security issue detected. Manual review is recommended.
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
  • medium Privilege Escalation · line 3
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 49
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 50
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 51
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 53
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 80
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 83
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 102
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 103
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 117
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 61
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
How audits are shown
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.00084 $0.02920
Opus 5 $0.00042 $0.01460
Sonnet 5 $0.00017 $0.00584
Haiku 4.5 $0.00008 $0.00292

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

Security

Grade B, and why

privesc-linux scanned grade B with 1 finding 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 10d ago.

The scan reads SKILL.md. This mod also ships 5 executable files (scripts/cap_suid_hunter.sh, scripts/container_escape_check.sh, scripts/kernel_exploit_suggester.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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

description: Use when escalating privileges on a Linux host — SUID/SGID & GTFOBins, sudo LPE (CVE-2025-32462/32463), capabilities & LD_PRELOAD, kernel LPE (CVE-2024-1086, Dirty Pipe, GameOver(lay)), service misconfig (Pw
skills/privesc-linux/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 Privilege Escalation

When to Activate

  • Gained an initial unprivileged shell on a Linux host and need root or a higher-privileged account
  • Post-exploitation lateral/vertical movement on Linux servers, workstations, CI runners, or appliances
  • Container / Kubernetes pod foothold that needs to escape to the host node
  • Triaging a host for misconfig-based LPE (SUID, sudo, capabilities, writable units/cron) before reaching for kernel 0-day
  • CTF / lab challenges requiring privilege escalation with a defensible, detection-aware methodology

Technique Map

Technique ATT&CK CWE Reference Script
Automated + manual enumeration (LinPEAS/pspy/LES2) T1082, T1057 CWE-200 references/enumeration-tooling.md scripts/linpriv_enum.py
Detection-aware / low-noise enumeration T1082 CWE-200 references/enumeration-tooling.md scripts/linpriv_enum.py
SUID/SGID binary abuse (GTFOBins) T1548.001 CWE-269 references/suid-sudo-capabilities.md scripts/cap_suid_hunter.sh
sudo misconfig + GTFOBins escape T1548.003 CWE-269 references/suid-sudo-capabilities.md scripts/cap_suid_hunter.sh
sudo host option LPE (CVE-2025-32462) T1548.003 CWE-863 references/suid-sudo-capabilities.md scripts/sudo_cve_2025_check.sh
sudo chroot/NSS LPE (CVE-2025-32463) T1548.003 CWE-829 references/suid-sudo-capabilities.md scripts/sudo_cve_2025_check.sh
Linux capabilities abuse (setuid/dac_read/sys_admin) T1548 CWE-250 references/suid-sudo-capabilities.md scripts/cap_suid_hunter.sh
LD_PRELOAD / LD_LIBRARY_PATH sudo hijack T1574.006 CWE-426 references/suid-sudo-capabilities.md scripts/cap_suid_hunter.sh
nf_tables double-free LPE (CVE-2024-1086) T1068 CWE-416 references/kernel-exploits.md scripts/kernel_exploit_suggester.py
io_uring memory-sharing LPE (CVE-2024-0582/2025-21836) T1068 CWE-416 references/kernel-exploits.md scripts/kernel_exploit_suggester.py
Dirty Pipe page-cache overwrite (CVE-2022-0847) T1068 CWE-787 references/kernel-exploits.md scripts/kernel_exploit_suggester.py
GameOver(lay) OverlayFS (CVE-2023-2640/32629) T1068 CWE-269 references/kernel-exploits.md scripts/kernel_exploit_suggester.py
udisks/libblockdev loop-mount LPE (CVE-2025-6019) T1068 CWE-250 references/service-misconfig-lpe.md scripts/linpriv_enum.py
PAM allow_active bypass (CVE-2025-6018) T1068 CWE-863 references/service-misconfig-lpe.md scripts/linpriv_enum.py
glibc ld.so Looney Tunables (CVE-2023-4911) T1068 CWE-787 references/service-misconfig-lpe.md scripts/kernel_exploit_suggester.py
polkit pkexec PwnKit (CVE-2021-4034) T1548.001 CWE-787 references/service-misconfig-lpe.md scripts/linpriv_enum.py
Cron/systemd/PATH/writable-file abuse T1053.003, T1574.007 CWE-732 references/service-misconfig-lpe.md scripts/linpriv_enum.py
NFS no_root_squash SUID drop T1222.002 CWE-732 references/service-misconfig-lpe.md scripts/linpriv_enum.py
runc fd-leak container escape (CVE-2024-21626) T1611 CWE-668 references/container-namespace-escape.md scripts/container_escape_check.sh
Docker socket / privileged container escape T1611, T1610 CWE-269 references/container-namespace-escape.md scripts/container_escape_check.sh
cgroup release_agent / CAP_SYS_ADMIN escape T1611 CWE-269 references/container-namespace-escape.md scripts/container_escape_check.sh
Kubernetes pod/token escape T1611 CWE-668 references/container-namespace-escape.md scripts/container_escape_check.sh

Read the full file on GitHub · 121 lines

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. 10d ago First seen · 121 lines · 84 tokens per session scan B d099b698077d

Subscribe to this mod's changes

privesc-linux is a skill published in the GitHub repository hypnguyen1209/offensive-claude (357 stars, last pushed 23d ago), licensed MIT. It adds 84 tokens to every session and 2,920 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

bt6-queue-audit

Audit the full pull-request and issue queue of a BT6 research or support repository, classifying readiness, evidence risk, and next action without mutating tracker state.

elder-plinius/T3MP3ST · 40 tokens

bt6-issue-steward

Triage and steward issues in BT6 research and support repositories, deciding whether to answer, reproduce, correct evidence, link work, design a feature, route security, implement, or close.

elder-plinius/T3MP3ST · 46 tokens

bt6-merge-train

Run an explicitly authorized, conservative BT6 merge train that processes validated pull requests one at a time and reconciles repository, CI, evidence, and issue state after each merge.

elder-plinius/T3MP3ST · 42 tokens

bt6-pr-audit

Audit one pull request in a BT6 research or support repository at an exact head SHA, covering correctness, research integrity, security, tests, contracts, and merge readiness.

elder-plinius/T3MP3ST · 40 tokens

bt6-provider-review

Audit an external AI/API provider and its integration into a BT6 repository for service reality, independent verification, trust boundaries, secret handling, API/model correctness, completeness, claim traceability, and merge readiness.

elder-plinius/T3MP3ST · 46 tokens

xiaohongshu-search-full

Search Xiaohongshu (XHS / RedNote) notes by keyword with full field extraction including body text, topics/tags, image list URLs, video stream URL, publish timestamp, and all engagement stats (likes, collects, comments, shares). Supports all page filter options: sort order (general, latest, most liked, most commented…

browser-act/skills · 254 tokens