Skip to content
Back to skills

Hunting Persistence On Linux

DSecurity

'Hunts for Linux persistence by inspecting cron, systemd units, shell rc files, SSH

  • 22 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 11, 2026
securitypythonrustgoshellbashgitapisecurity

Works with

  • api

Security analysis

D50/100
  • criticalPipes output to a shell interpreter
  • criticalDownloads and executes remote scripts — classic supply chain attack

Pro scans all 4 files and shows the line behind each finding

Scanned September 11, 2026

npx -y skills add meltedinhex/analyst-ai-pack --skill hunting-persistence-on-linux --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Hunting Persistence On Linux?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Hunting Persistence On Linux
[![Security: D — Skills Directory](https://www.skillsdirectory.com/api/skills/meltedinhex-hunting-persistence-on-linux/badge)](https://www.skillsdirectory.com/skills/meltedinhex-hunting-persistence-on-linux)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: hunting-persistence-on-linux
description: '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.'
domain: cybersecurity
subdomain: threat-hunting
tags:
  - threat-hunting
  - linux
  - persistence
  - cron
  - systemd
version: 1.0.0
author: analyst-ai-pack
license: Apache-2.0
mitre_attack:
  - T1053.003
  - T1543.002
  - T1098.004
d3fend:
  - D3-FA
  - D3-PSA
references:
  - 'MITRE ATT&CK T1543.002 Systemd Service — https://attack.mitre.org/techniques/T1543/002/'
  - 'MITRE ATT&CK T1053.003 Cron — https://attack.mitre.org/techniques/T1053/003/'
---

# 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

```bash
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

- See [`references/api-reference.md`](references/api-reference.md) for the scanner.
- ATT&CK T1543.002 and T1053.003 (linked in frontmatter).

Files in this skill

  • LICENSE340 B
  • SKILL.md2.7 KB
  • references/api-reference.md1.2 KB
  • scripts/analyst.py2.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.