agentsclimarketplace

Hunting persistence on linux

Skill meltedinhex/analyst-ai-pack/skills/hunting-persistence-on-linux

Hunts for Linux persistence by inspecting cron, systemd units, shell rc files, SSH authorized_keys, and common autostart locations for attacker-added entries. Activates for requests to hunt Linux persistence, audit cron/systemd for backdoors, or find unauthorized autostart and authorized_keys entries.From its SKILL.md

Install
npx -y skills add meltedinhex/analyst-ai-pack --skill hunting-persistence-on-linux

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 21 stars21 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

2.7 KB, 434 tokens by cl100k_base, as published. Nobody here has run it

Hunting Persistence on Linux

When to Use

  • You have collected Linux persistence-relevant files (cron entries, systemd units, shell rc files, authorized_keys, autostart) and want to flag suspicious entries.
  • You are triaging a suspected compromised Linux host's persistence surface.

Do not use this on a live root shell as a substitute for proper IR collection — feed it collected copies. It reads files statically and executes nothing.

Prerequisites

  • Collected persistence artifacts (cron files, unit files, rc files, authorized_keys).

Safety & Handling

  • Read files statically; treat their contents as untrusted.

Workflow

Step 1: Scan persistence files

python scripts/analyst.py scan /path/to/collected

Recursively scans known persistence locations and flags entries containing download/exec patterns (curl|wget ... | sh, base64 -d | bash, reverse-shell one-liners, nc -e), suspicious paths (/tmp, /dev/shm), and unexpected authorized_keys additions.

Step 2: Categorize by mechanism

Group findings by mechanism: cron, systemd, rc/profile, SSH keys, autostart.

Step 3: Confirm

Compare against a known-good baseline of expected services/keys; investigate deviations.

Step 4: Document

Record each persistence entry, its mechanism, and the suspicious indicator.

Validation

  • Findings are grouped by persistence mechanism.
  • Reverse-shell/download-exec one-liners are flagged with the matched pattern.
  • authorized_keys additions are surfaced for review.

Pitfalls

  • Legitimate admin cron/systemd entries — baseline before alerting.
  • Persistence in less-common spots (udev, PAM, LD_PRELOAD) not covered by basic scans.
  • Encoded/obfuscated payloads hiding the true command.

References

What ships with it: 3 files

4.3 KB alongside SKILL.md, 1 of them executable

references/

scripts/

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.