performing-privilege-escalation-assessment
Has your agent check how attackers can gain more control on systems. It looks for flaws and vulnerabilities in Windows and Linux systems. It's useful for understanding how secure a system is after an initial attack.
What it does
This tool helps find ways to gain more control on a computer you already have limited access to. It looks for misconfigurations or vulnerable programs to achieve administrator privileges.
When to use it
- ✓After gaining initial access in a security test.
- ✓To check if a server is well-protected against intrusions.
- ✓To test if security programs detect intrusion attempts.
Example of what to ask your AI
“Check if I can gain administrator access on this server.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The tool examines the system for incorrect settings, outdated programs, or saved passwords. It then tries to use these findings to get full system access.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill performing-privilege-escalation-assessmentOr download just the file:
curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/performing-privilege-escalation-assessment/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Performing Privilege Escalation Assessment
When to Use
- After gaining initial low-privilege access during a penetration test to demonstrate full system compromise
- Assessing the security hardening of Linux and Windows servers against local privilege escalation attacks
- Evaluating whether endpoint detection and response (EDR) tools detect common privilege escalation techniques
- Testing the effectiveness of least-privilege policies and application whitelisting on endpoints
- Validating that container breakout and VM escape controls are properly configured
Do not use without written authorization, against production systems where exploitation could cause downtime, or for deploying kernel exploits on systems without prior approval and rollback capability.
Prerequisites
- Low-privilege shell access (reverse shell, SSH, RDP) to the target system obtained through authorized means
- Privilege escalation enumeration scripts: linPEAS (Linux), winPEAS (Windows), Linux Smart Enumeration (LSE)
- Compiled kernel exploits for common CVEs or access to compilation tools on the target
- GTFOBins reference for Linux SUID/sudo binary abuse and LOLBAS reference for Windows living-off-the-land binaries
- Precompiled post-exploitation binaries for the target architecture if compilation is not available on the target
Workflow
Step 1: System Enumeration
Gather comprehensive information about the target system:
Linux Enumeration:
id && whoami- Current user and group membershipsuname -a- Kernel version for kernel exploit identificationcat /etc/os-release- Distribution and versionsudo -l- Commands the current user can run as root via sudofind / -perm -4000 -type f 2>/dev/null- SUID binariesfind / -perm -2000 -type f 2>/dev/null- SGID binariescrontab -l && ls -la /etc/cron*- Scheduled tasks running as rootps aux | grep root- Processes running as rootcat /etc/passwd- User accounts (look for additional users with UID 0)find / -writable -type d 2>/dev/null- World-writable directories- Run
linpeas.shfor automated comprehensive enumeration
Windows Enumeration:
whoami /priv- Current user privileges (look for SeImpersonatePrivilege, SeDebugPrivilege)systeminfo- OS version, hotfix level, architecturewmic service get name,pathname,startmode- Unquoted service pathsicacls "C:\Program Files" /T- Writable directories in Program Filesreg query HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated- AlwaysInstallElevated checkcmdkey /list- Stored Windows credentialsschtasks /query /fo LIST /v- Scheduled tasks with their run-as accounts- Run
winPEAS.exefor automated comprehensive enumeration
Step 2: Linux Privilege Escalation Vectors
Test identified escalation vectors systematically:
- Sudo misconfigurations: If
sudo -lshows entries like(ALL) NOPASSWD: /usr/bin/vim, use GTFOBins to escalate:sudo vim -c ':!/bin/bash'to spawn a root shell- Common dangerous sudo entries: vim, less, find, nmap, python, perl, ruby, awk, env
- SUID binary abuse: If a SUID binary is identified that allows arbitrary command execution, shell escape, or file read:
- Custom SUID: Check if a custom SUID binary calls other programs without absolute paths (PATH injection)
- Known SUID: Check GTFOBins for exploitation of standard SUID binaries
- Cron job exploitation: If a cron job runs a script writable by the current user, or runs a script from a writable directory:
- Modify the script to add a reverse shell or SUID copy of bash
- PATH-based cron exploitation: if the cron job calls a command without absolute path and PATH is writable
- Kernel exploits: Match the kernel version to known exploits:
- DirtyPipe (CVE-2022-0847): Linux kernel 5.8-5.16.11
- DirtyCow (CVE-2016-5195): Linux kernel 2.6.22-4.8.3
- PwnKit (CVE-2021-4034): Polkit pkexec vulnerability affecting most Linux distributions
- Capabilities abuse:
getcap -r / 2>/dev/nullto find binaries with elevated capabilities (cap_setuid, cap_dac_override) - Writable /etc/passwd: If /etc/passwd is writable, add a new root user:
echo 'newroot:$1$hash:0:0::/root:/bin/bash' >> /etc/passwd
Step 3: Windows Privilege Escalation Vectors
Test Windows-specific escalation paths:
- Token impersonation: If the user has
SeImpersonatePrivilege(common for service accounts and IIS):
…
FAQ
Do I need permission to use this tool?
Yes, you need written authorization before using it, especially on important systems.
What is 'privilege escalation'?
It's the process of gaining higher permissions on a system, like going from a regular user to an administrator.
What systems does this tool support?
It works on both Linux and Windows systems.
Details
Original description by the author
Performs privilege escalation assessments on compromised Linux and Windows systems to identify paths from low-privilege access to root or SYSTEM-level control. The tester enumerates misconfigurations, vulnerable services, kernel exploits, SUID binaries, unquoted service paths, and credential stores to demonstrate the full impact of an initial compromise. Activates for requests involving privilege
Popularity
- GitHub stars
- 35k
- Ranking position
- #6125
- License
- Apache-2.0
- Updated
- 8/31/2026
Comments
- …
More skills from this repository
abusing-dpapi-for-credential-access
Gives your AI agent ready-made instructions for a specific task, so it does it better and faster.
mukul975/Anthropic-Cybersecurity-Skills
abusing-shadow-credentials-for-privesc
Teaches your AI agent to write clear, well-structured text.
mukul975/Anthropic-Cybersecurity-Skills
achieving-cmmc-level-2-compliance
Helps your agent prepare an environment for CMMC Level 2 compliance. It implements security requirements and manages necessary documentation.
mukul975/Anthropic-Cybersecurity-Skills
acquiring-disk-image-with-dd-and-dcfldd
Helps your agent create exact copies of hard drives. This is useful for ensuring no information is lost or altered during investigations.
mukul975/Anthropic-Cybersecurity-Skills
Similar skills
django-security
Helps your agent implement security practices in Django applications. It focuses on authentication, authorization, and prevention against common attacks, ensuring more secure code.
affaan-m/ECC
laravel-security
Helps your agent secure Laravel applications against threats. Implements security practices for authentication, authorization, and common attack prevention.
affaan-m/ECC
module-regression
Helps your agent manage changes in large projects. Ensures code changes in one part don't break other parts.
affaan-m/ECC