persistence-hunting — Claude Code skill for Linux persistence
persistence-hunting is a Claude Code skill that checks common Linux persistence points. It runs after a persistence alert or a confirmed compromise.
Apache-2.0 ★ 71 updated 2026-11-15
npx skills add Problem99-io/kodeblue --skill persistence-hunting -a claude-codeWhat persistence-hunting does
The skill checks Linux locations where unwanted code can persist, including cron jobs, systemd services and timers, shell startup files, PAM, SSH, kernel modules, udev rules and web roots. For each finding, it prompts the agent to identify what runs, whether a package owns the target, and how its modification time relates to logins.
Scripts found in /tmp, /dev/shm or hidden directories, along with encoded commands, are treated as hostile until verified. Containment uses quarantine_file for a dropped payload and stop_unit for a malicious service. The report should include the cron or systemd file path so a human can remove the entry.
What it helps with
- inspect common Linux persistence locations
- spot suspicious cron jobs and systemd services
- compare file changes with user login times
- quarantine a payload and stop a malicious service
Example prompts for the agent
- Check common persistence locations on this Linux host after a confirmed compromise.
- Inspect cron, systemd and SSH for persistence indicators.
- Look for recently added PHP files in the web root and report suspicious paths.
How to install persistence-hunting
1Skills CLI (Vercel)
npx skills add Problem99-io/kodeblue --skill persistence-hunting -a claude-code2Manually: put the files in place
~/.claude/skills/persistence-hunting/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/persistence-hunting/
1Skills CLI (Vercel)
npx skills add Problem99-io/kodeblue --skill persistence-hunting -a codex2Manually: put the files in place
.agents/skills/persistence-hunting/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Problem99-io/kodeblue --skill persistence-hunting -a cursor2Manually: put the files in place
.cursor/skills/persistence-hunting/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Problem99-io/kodeblue blue/skills/persistence-hunting2Manually: put the files in place
.github/skills/persistence-hunting/SKILL.md1Skills CLI (Vercel)
npx skills add Problem99-io/kodeblue --skill persistence-hunting -a gemini-cli2Platform CLI
gemini skills install https://github.com/Problem99-io/kodeblue --path blue/skills/persistence-huntingManually: put the files in place
.devin/skills/persistence-hunting/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about persistence-hunting
How do I install persistence-hunting in Claude Code?
Run npx skills add Problem99-io/kodeblue --skill persistence-hunting -a claude-code. The skill file is installed at ~/.claude/skills/persistence-hunting/SKILL.md.
What does persistence-hunting do?
It checks common Linux locations for persistence after a finding or confirmed compromise. It can flag suspicious files and stop a malicious service.
Which Linux locations does persistence-hunting inspect?
It covers cron, systemd, shell startup files, the loader, PAM, SSH, kernel modules, udev, motd and web roots.
Source text
SKILL.md · Apache-2.0
--- name: persistence-hunting description: Check every common Linux persistence location when a persistence finding fires or after a confirmed compromise. metadata: kodeblue-bundled: true --- # Persistence hunting Check these locations. For each finding, ask what it executes, whether that target is packaged (`dpkg -S` / `rpm -qf`), and when it changed relative to logins. | Location | How to inspect | |---|---| | cron | `host_read /etc/crontab`, `host_list /etc/cron.d`, `host_list /var/spool/cron/crontabs`, `host_exec ["crontab","-l","-u","<user>"]` | | systemd | `host_exec ["systemctl","list-unit-files","--state=enabled","--no-pager"]`, `host_list /etc/systemd/system`, `host_exec ["systemctl","cat","<unit>"]`; also user units in `~/.config/systemd/user` | | timers | `host_exec ["systemctl","list-timers","--all","--no-pager"]` | | shell init | `/etc/profile`, `/etc/profile.d/*`, `/etc/bash.bashrc`, `~/.bashrc`, `~/.profile` — look for curl, wget, base64, nc, or `/dev/tcp` | | loader | `/etc/ld.so.preload` (should almost never exist), `/etc/ld.so.conf.d/*` | | PAM | `/etc/pam.d/*`: a `pam_exec.so` line or an unknown .so is a backdoor pattern; check `dpkg -V libpam-modules` | | ssh | `~/.ssh/rc`, `/etc/ssh/sshrc`, `authorized_keys` `command=` options | | kernel | `host_exec ["lsmod"]`, then `["modinfo","<mod>"]` for unknown modules; check `/etc/modules-load.d` | | udev / motd | `/etc/udev/rules.d/*` with `RUN+=`, `/etc/update-motd.d/*` | | web | new `.php`/`.jsp` files in web roots: `find <webroot> -newermt "-2 days" -name "*.php"` | A target script in /tmp, /dev/shm or a hidden directory, or an encoded command, is an attack until proven otherwise. Containment: `quarantine_file` the dropped payload and `stop_unit` the malicious unit. Note the cron or systemd file path in the report so a human removes the entry.
© Problem99-io · Apache-2.0 · Problem99-io/kodeblue