Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Problem99-io/kodeblue --skill persistence-hunting -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/persistence-hunting/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/persistence-hunting/

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

Similar skills

SKILL.md skills catalog →

From the same set13

The whole set →
miner-and-reverse-shell miner-and-reverse-shell is a Claude Code skill that stops miners and reverse shells. Triggers on unexpected CPU spikes, suspicious outbound ports, and binaries in /tmp. CX Codex +1 ★ 71repo stars ssh-access-forensics ssh-access-forensics is a Claude Code skill that investigates new SSH keys, suspicious logins, and sshd backdoors. Inspects compromised servers right after brute-force alerts or auth anomalies. CX Codex +1 ★ 71repo stars container-host-checks container-host-checks is a Claude Code skill that investigates suspicious activity on Docker or Podman hosts. It checks new and privileged containers, exposed ports, and signs of host escapes. CX Codex +1 ★ 71repo stars containment-verification containment-verification is a Claude Code skill that inspects the host after security actions like block_ip, kill_process, quarantine_file, or stop_unit to confirm they hold. CX Codex +1 ★ 71repo stars linux-intrusion-triage linux-intrusion-triage is a Claude Code skill for examining a Linux host that may have been compromised. It guides the initial checks in sequence, using kodeblue’s read-only tools. CX Codex +1 ★ 71repo stars false-positive-playbook false-positive-playbook is a Claude Code skill that helps agents prove security findings are benign. It checks package logs, deployments, and admin sessions instead of guessing. CX Codex +1 ★ 71repo stars web-app-attack-chain web-app-attack-chain is a Claude Code skill that rebuilds a web app attack from request logs. It identifies successful in-app actions and lists the cleanup a person must handle. CX Codex +1 ★ 71repo stars kodeblue-self-integrity kodeblue-self-integrity is a Claude Code skill that investigates changes to kodeblue binaries, engine, and configuration. It analyzes whether modifications or watcher downtime stem from tampering. CX Codex +1 ★ 71repo stars

Project sponsors

Companies that keep this analytics open