performing-privilege-escalation-assessment
できること
このツールは、限られたアクセス権しかないコンピューターで、より高い権限を得る方法を探すのに役立ちます。管理者権限を得るために、設定ミスや脆弱なプログラムを探します。
使う場面
- ✓セキュリティテストで最初のアクセスを得た後。
- ✓サーバーが侵入に対してよく守られているかを確認するとき。
- ✓セキュリティソフトが侵入の試みを検知できるかをテストするとき。
スキルのリンク
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-privilege-escalation-assessment/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このサーバーで管理者アクセス権を取得できるか確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
ツールはシステムを調べ、誤った設定、古いプログラム、保存されたパスワードなどを探します。そして、その結果を使って、システム全体へのアクセスを得られるかを試みます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Performing Privilege Escalation Assessment
When to Use
- After gaining initial low-privilege access during a penetration test to demonstrate full system compromise
- Assessing the security hardening of Linux and Windows servers against local privilege escalation attacks
- Evaluating whether endpoint detection and response (EDR) tools detect common privilege escalation techniques
- Testing the effectiveness of least-privilege policies and application whitelisting on endpoints
- Validating that container breakout and VM escape controls are properly configured
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.
Prerequisites
- Low-privilege shell access (reverse shell, SSH, RDP) to the target system obtained through authorized means
- Privilege escalation enumeration scripts: linPEAS (Linux), winPEAS (Windows), Linux Smart Enumeration (LSE)
- Compiled kernel exploits for common CVEs or access to compilation tools on the target
- GTFOBins reference for Linux SUID/sudo binary abuse and LOLBAS reference for Windows living-off-the-land binaries
- Precompiled post-exploitation binaries for the target architecture if compilation is not available on the target
Workflow
Step 1: System Enumeration
Gather comprehensive information about the target system:
Linux Enumeration:
id && whoami- Current user and group membershipsuname -a- Kernel version for kernel exploit identificationcat /etc/os-release- Distribution and versionsudo -l- Commands the current user can run as root via sudofind / -perm -4000 -type f 2>/dev/null- SUID binariesfind / -perm -2000 -type f 2>/dev/null- SGID binariescrontab -l && ls -la /etc/cron*- Scheduled tasks running as rootps aux | grep root- Processes running as rootcat /etc/passwd- User accounts (look for additional users with UID 0)find / -writable -type d 2>/dev/null- World-writable directories- Run
linpeas.shfor automated comprehensive enumeration
Windows Enumeration:
whoami /priv- Current user privileges (look for SeImpersonatePrivilege, SeDebugPrivilege)systeminfo- OS version, hotfix level, architecturewmic service get name,pathname,startmode- Unquoted service pathsicacls "C:\Program Files" /T- Writable directories in Program Filesreg query HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated- AlwaysInstallElevated checkcmdkey /list- Stored Windows credentialsschtasks /query /fo LIST /v- Scheduled tasks with their run-as accounts- Run
winPEAS.exefor automated comprehensive enumeration
Step 2: Linux Privilege Escalation Vectors
Test identified escalation vectors systematically:
- Sudo misconfigurations: If
sudo -lshows entries like(ALL) NOPASSWD: /usr/bin/vim, use GTFOBins to escalate:sudo vim -c ':!/bin/bash'to spawn a root shell- Common dangerous sudo entries: vim, less, find, nmap, python, perl, ruby, awk, env
- SUID binary abuse: If a SUID binary is identified that allows arbitrary command execution, shell escape, or file read:
- Custom SUID: Check if a custom SUID binary calls other programs without absolute paths (PATH injection)
- Known SUID: Check GTFOBins for exploitation of standard SUID binaries
- Cron job exploitation: If a cron job runs a script writable by the current user, or runs a script from a writable directory:
- Modify the script to add a reverse shell or SUID copy of bash
- PATH-based cron exploitation: if the cron job calls a command without absolute path and PATH is writable
- Kernel exploits: Match the kernel version to known exploits:
- DirtyPipe (CVE-2022-0847): Linux kernel 5.8-5.16.11
- DirtyCow (CVE-2016-5195): Linux kernel 2.6.22-4.8.3
- PwnKit (CVE-2021-4034): Polkit pkexec vulnerability affecting most Linux distributions
- Capabilities abuse:
getcap -r / 2>/dev/nullto find binaries with elevated capabilities (cap_setuid, cap_dac_override) - Writable /etc/passwd: If /etc/passwd is writable, add a new root user:
echo 'newroot:$1$hash:0:0::/root:/bin/bash' >> /etc/passwd
Step 3: Windows Privilege Escalation Vectors
Test Windows-specific escalation paths:
- Token impersonation: If the user has
SeImpersonatePrivilege(common for service accounts and IIS):
…
よくある質問
このツールを使うには許可が必要ですか?
はい。特に重要なシステムでは、使用前に書面による許可が必要です。
「権限昇格」とは何ですか?
通常のユーザーから管理者へ、といったように、システム上でより高い権限を得るプロセスのことです。
どのシステムに対応していますか?
LinuxとWindowsの両方のシステムで動作します。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 35k
- ランキング
- #8288
- ライセンス
- Apache-2.0
- 更新日
- 2026/8/31
コメント
- …
このリポジトリの他のスキル
abusing-dpapi-for-credential-access
35k特定のタスク向けに用意された指示をAIエージェントに与え、より良く、より速く作業できるようにします。
abusing-shadow-credentials-for-privesc
35kAIエージェントに、明確で構成のしっかりした文章の書き方を教えます。
achieving-cmmc-level-2-compliance
35kエージェントがCMMC Level 2への準拠に向けた環境を整えられるようにします。セキュリティ要件を実装し、必要なドキュメントを管理します。
acquiring-disk-image-with-dd-and-dcfldd
35kエージェントがハードディスクの完全なコピーを作成できるようにします。調査中に情報が失われたり改変されたりしないようにするのに役立ちます。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。