Skip to content

Linux Privilege Escalation Methodology

Guides an agent through escalating from a low-privilege Linux shell to root for authorized security tests.

Stars
10,230
Licence
MIT
Files
1 file

What it does

This skill gives an AI agent a structured playbook for raising its access on a Linux machine from an ordinary user account to full administrator (root). It walks through common weaknesses such as risky sudo rules, misconfigured SUID programs, Linux capabilities, cron jobs, PATH and library hijacking, Docker group membership, and known kernel and sudo vulnerabilities. It also covers how each technique looks to defenders, so it can support purple team exercises where attackers and defenders work together.

Great for

  • Penetration testers and red teams running authorized engagements on Linux systems they have permission to test
  • Students and CTF players practising privilege escalation in lab or competition environments
  • Blue teams and purple teams who want to understand attacker techniques and detection signatures

Skip it if

  • Systems you do not own or have written authorization to test, since the techniques are real intrusion methods and using them without permission is illegal
  • Production or monitored systems without coordination, because the skill runs noisy enumeration tools and exploit code that can crash services or trigger alerts
  • Learning Linux administration or hardening, where the content is attack-oriented and does not explain safe configuration in depth

Try asking

  • “I have a low-privilege shell on this lab box in my authorized pentest. Walk me through checking sudo, SUID binaries and capabilities for a path to root.”
  • “Enumerate this CTF target for privilege escalation vectors and suggest which kernel exploits might apply to this kernel version.”
  • “Review the cron jobs and PATH configuration on this test VM and explain how a writable script could be abused, with detection notes for the blue team.”
Step-by-step guide: how to use Linux Privilege Escalation MethodologyInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the MIT licence and an attribution note.

    offensive-linux-privesc.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip offensive-linux-privesc.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip offensive-linux-privesc.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Only use this skill with written authorization and a defined scope; state the engagement boundaries in your prompt so the agent stays within them.
  • Ask for detection and defender-side notes alongside each technique, and prefer the quieter LinPEAS options when systems are monitored.
  • Review every downloaded script and exploit before running it on a target, since the skill fetches and executes third-party code such as curl piped to sh.

What's inside

  • SKILL.md

Redistributed unmodified from SnailSploit/Claude-Red under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.