Implementation:0xSteph Pentest ai agents Privesc Advisor Agent
| Knowledge Sources | |
|---|---|
| Domains | Security, Privilege_Escalation, Methodology |
| Last Updated | 2026-10-22 12:00 GMT |
Overview
Concrete agent definition for privilege escalation guidance on Linux, Windows, and container environments provided by the pentest-ai-agents toolkit.
Description
The privesc-advisor agent is a Tier 1 (advisory-only) Claude Code subagent for systematic local enumeration and privilege escalation guidance. It covers Linux privesc (SUID/SGID, sudo misconfigs, capabilities, cron, NFS, kernel exploits, Docker escape), Windows privesc (token impersonation, service exploitation, AlwaysInstallElevated, DLL hijacking, UAC bypass), and container escape. It emphasizes enumeration-before-exploitation and reserves kernel exploits as last resort.
This is a Pattern Doc: the agent defines enumeration methodology, technique catalogs, and output formats for privilege escalation guidance.
Usage
- Linux privesc: Delegate for systematic Linux enumeration and escalation techniques.
- Windows privesc: Use for Windows privilege escalation analysis and SeImpersonate exploitation.
- Container escape: Ask for Docker/container escape guidance.
Code Reference
Source Location
- Repository: pentest-ai-agents
- File: agents/privesc-advisor.md
Signature
---
name: privesc-advisor
description: >
Delegates to this agent when the user asks about privilege escalation
techniques, local enumeration, Linux or Windows privilege escalation,
container escape, or needs help escalating access on a compromised system.
tools:
- Read
- Write
- Edit
- Grep
- Glob
- WebFetch
- WebSearch
model: sonnet
---
Import
# Loaded by Claude Code from .claude/agents/ when installed via install.sh
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| System access | text | Yes | Description of current access level and platform |
| Enumeration output | text | No | Pasted output from system enumeration |
Outputs
| Name | Type | Description |
|---|---|---|
| Enumeration methodology | Markdown | Ordered steps for systematic enumeration |
| Escalation techniques | Markdown | Ranked techniques with commands, prerequisites, reliability |
| Detection guidance | Markdown │ Event IDs, log sources, EDR behavior for each technique | |
| Cleanup instructions | Markdown | How to remove artifacts after testing |
Usage Examples
Linux Privilege Escalation
User: "I have SSH access as www-data on a Linux box. How do I escalate?"
# Agent provides systematic enumeration methodology:
# 1. System info: uname -a, cat /etc/*release
# 2. Current user: id, whoami, sudo -l
# 3. SUID/SGID: find / -perm -4000 -type f 2>/dev/null
# 4. Capabilities: getcap -r / 2>/dev/null
# 5. Cron jobs: cat /etc/crontab, crontab -l
# ... (10 total enumeration steps)
# Then provides techniques ranked by reliability:
# SUID abuse, sudo misconfig, capabilities, cron, kernel (last resort)
Related Pages
Implements Principles
Uses Heuristics
Related Implementations
- Implementation:0xSteph_Pentest_ai_agents_Findings_CLI receives host status updates from this agent's recommendations