davila7/claude-code-templates/privilege-escalation-methods
Claude Code and agent skill by davila7/claude-code-templates
- community
Checking that the SKILL.md file is still in the repository.
This skill should be used when the user asks to "escalate privileges", "get root access", "become administrator", "privesc techniques", "abuse sudo", "exploit SUID binaries", "Kerberoasting", "pass-the-ticket", "token impersonation", or needs guidance on post-exploitation privilege escalation for Linux or Windows systems.
Install
npx vskill@latest install davila7/claude-code-templates/privilege-escalation-methodsSKILL.md
Privilege Escalation Methods
Purpose
Provide comprehensive techniques for escalating privileges from a low-privileged user to root/administrator access on compromised Linux and Windows systems. Essential for penetration testing post-exploitation phase and red team operations.
Inputs/Prerequisites
- Initial low-privilege shell access on target system
- Kali Linux or penetration testing distribution
- Tools: Mimikatz, PowerView, PowerUpSQL, Responder, Impacket, Rubeus
- Understanding of Windows/Linux privilege models
- For AD attacks: Domain user credentials and network access to DC
Outputs/Deliverables
- Root or Administrator shell access
- Extracted credentials and hashes
- Persistent access mechanisms
- Domain compromise (for AD environments)
Core Techniques
Linux Privilege Escalation
1. Abusing Sudo Binaries
Exploit misconfigured sudo permissions using GTFOBins techniques:
2. Abusing Scheduled Tasks (Cron)
3. Abusing Capabilities
4. NFS Root Squashing
5. MySQL Running as Root
Windows Privilege Escalation
1. Token Impersonation
2. Service Abuse
3. Abusing SeBackupPrivilege
4. Abusing SeLoadDriverPrivilege
5. Abusing GPO
Active Directory Attacks
1. Kerberoasting
2. AS-REP Roasting
3. Golden Ticket
4. Pass-the-Ticket
5. Golden Ticket with Scheduled Tasks
Credential Harvesting
LLMNR Poisoning
NTLM Relay
Dumping with VSS
Quick Reference
| Technique | OS | Domain Required | Tool | |
|---|---|---|---|---|
| Sudo Binary Abuse | Linux | No | GTFOBins | |
| Cron Job Exploit | Linux | No | Manual | |
| Capability Abuse | Linux | No | getcap | |
| NFS no_root_squash | Linux | No | mount | |
| Token Impersonation | Windows | No | SweetPotato | |
| Service Abuse | Windows | No | PowerUp | |
| Kerberoasting | Windows | Yes | Rubeus/Impacket | |
| AS-REP Roasting | Windows | Yes | Rubeus | |
| Golden Ticket | Windows | Yes | Mimikatz | |
| Pass-the-Ticket | Windows | Yes | Rubeus | |
| DCSync | Windows | Yes | Mimikatz | |
| LLMNR Poisoning | Windows | Yes | Responder |
Constraints
Must:
- Have initial shell access before attempting escalation
- Verify target OS and environment before selecting technique
- Use appropriate tool for domain vs local escalation
Must Not:
- Attempt techniques on production systems without authorization
- Leave persistence mechanisms without client approval
- Ignore detection mechanisms (EDR, SIEM)
Should:
- Enumerate thoroughly before exploitation
- Document all successful escalation paths
- Clean up artifacts after engagement
Examples
Example 1: Linux Sudo to Root
Example 2: Windows Kerberoasting
Troubleshooting
| Issue | Solution | |
|---|---|---|
| sudo -l requires password | Try other enumeration (SUID, cron, capabilities) | |
| Mimikatz blocked by AV | Use Invoke-Mimikatz or SafetyKatz | |
| Kerberoasting returns no hashes | Check for service accounts with SPNs | |
| Token impersonation fails | Verify SeImpersonatePrivilege is present | |
| NFS mount fails | Check NFS version compatibility (vers=2,3,4) |
Additional Resources
For detailed enumeration scripts, use:
- LinPEAS: Linux privilege escalation enumeration
- WinPEAS: Windows privilege escalation enumeration
- BloodHound: Active Directory attack path mapping
- GTFOBins: Unix binary exploitation reference
Security
- Security scanPassed, 40 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcli-tool/components/skills/security/privilege-escalation-methods/SKILL.md
Popularity
- Repository stars
- 23,336
- Repository forks
- 2,235
- Repository npm downloads, 7 days
- 3,197
- 7-day trend score
- 70
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 22 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/davila7/claude-code-templates/privilege-escalation-methods)