establishing-persistence

establishing-persistence is a skill for Claude Code, Codex from EvilFreelancer/secs. It costs 115 tokens per session (1,620 once invoked), scanned B, original, Apache-2.0.

A guide to maintaining authorized access during a red-team exercise after an initial foothold, even after a reboot or password change. Persistence means access that survives those changes.

In plain words
What is it for?
Testing Windows and Linux startup mechanisms, scheduled tasks, services, cron, systemd, shell profiles, SSH keys, Active Directory rights, tickets, and cloud identity access during an authorized engagement.
Why use it?
It helps test whether defenders can find and remove lasting access, while requiring every test mechanism to be recorded and cleaned up.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/evilfreelancer/secs/establishing-persistence
Any agent
npx skills add EvilFreelancer/secs --skill establishing-persistence
Clone the repo
git clone --depth 1 https://github.com/EvilFreelancer/secs

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for establishing-persistence

README.md
[![agentmods](https://agentmods.dev/badge/skills/evilfreelancer/secs/establishing-persistence.svg)](https://agentmods.dev/skills/evilfreelancer/secs/establishing-persistence)
Your own site
<a href="https://agentmods.dev/skills/evilfreelancer/secs/establishing-persistence"><img src="https://agentmods.dev/badge/skills/evilfreelancer/secs/establishing-persistence.svg" alt="Measured on agentmods" height="20"></a>
Per session 115 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,620 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00115 $0.01620
Opus 5 $0.00057 $0.00810
Sonnet 5 $0.00023 $0.00324
Haiku 4.5 $0.00012 $0.00162

Measured 4d ago against content hash 399fa9c81518, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

establishing-persistence scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reaches for credential filesmediumPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

- Cron / user crontab (T1053.003), systemd service or timer (T1543.002), shell rc profiles (T1546.004), `~/.ssh/authorized_keys` (T1098.004), SUID drop (coordinate with `escalating-linux-privileges`). Detection: file-int

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

.agents/skills/establishing-persistence/SKILL.md · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Establishing Persistence

Persistence is how a red team demonstrates the durability an intrusion would have — access that survives a reboot, a password reset, or the loss of the initial foothold — without which a report understates the real risk. It is also the phase most able to cause lasting harm if done carelessly, so it runs under tight rules: every mechanism is authorized, inventoried the moment it is placed, and removed at engagement end. A persistence mechanism you cannot account for is an incident you caused.

Hard limits from AGENTS.md, no exceptions: no backdoor that survives engagement closure without explicit written agreement to retain it; no self-propagating code, worms, or implants that spread beyond hosts you manually target; nothing destructive. Confirm the host and identity are in scope before placing anything, prefer the least-aggressive mechanism that proves the point, and treat all of this as LOUD — persistence is exactly what mature defenders hunt for. Record every artifact in maintaining-engagement-state as you create it, tagged for cleanup.

When to Use

  • Post-exploitation on an authorized engagement, to demonstrate durable access
  • Surviving reboots or credential rotation to show real intrusion impact
  • Establishing a fallback foothold before higher-risk actions
  • Modeling a specific actor's persistence TTPs for a purple-team exercise

When NOT to Use

  • Hunting or detecting persistence defensively — use hunting-threats
  • Finding persistence on a suspect host — use investigating-windows-endpoints
  • Gaining the privilege in the first place — use escalating-windows-privileges or escalating-linux-privileges
  • Domain-wide persistence primitives (DCSync, ticket forging) at depth — coordinate with attacking-active-directory
  • Cloud identity persistence at depth — coordinate with exploiting-cloud-platforms
  • Moving loot or tools onto the host — use transferring-files
  • Any request to leave a lasting backdoor for "after the test" — refuse and escalate unless there is written agreement to retain it

Read the full file on GitHub · 110 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 110 lines · 115 tokens per session scan B 399fa9c81518

Subscribe to this mod's changes

establishing-persistence is a skill published in the GitHub repository EvilFreelancer/secs (10 stars, last pushed 26d ago), licensed Apache-2.0. It adds 115 tokens to every session and 1,620 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it B with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

Blue Team Defense & Hardening

System hardening, detection engineering, security baseline monitoring, patch management, defense-in-depth architecture, and security posture improvement.

Masriyan/Claude-Code-CyberSecurity-Skill · 30 tokens

wave-issue-coverage

For each DRAFT requirement in a given Ground Control wave (or all waves), ensure a GitHub issue covers it and is bidirectionally linked. Use when the user asks to "cover wave N requirements with issues", "back-fill issues for draft requirements", or similar. Requires the Ground Control MCP and gh CLI.

Brad-Edwards/aptl · 72 tokens

ship

Ship current branch — CI, SonarCloud, code review, security review, fix all issues, merge. Assumes code is already committed and pushed.

Brad-Edwards/aptl · 33 tokens

create-huntable-agent

Add a new extraction sub-agent to Huntable CTI Studio as a first-class peer of CmdlineExtract, ProcTreeExtract, HuntQueriesExtract, RegistryExtract, ServicesExtract, and ScheduledTasksExtract. Use this skill whenever the user asks to "add a new agent", "create a sub-agent", "wire up a new extractor", "add a new…

dfirtnt/Huntable-CTI-Studio · 129 tokens

codebase-test-trueup

Audit test coverage gaps and generate unit tests to close them. Use when the user says "test trueup", "coverage gaps", "test coverage audit", "fill coverage", "write missing tests", "backfill tests", "scope tests", "test what I changed", or any request to identify and fill test gaps. Three modes: audit (report only)…

dfirtnt/Huntable-CTI-Studio · 96 tokens

mdu

Update all Markdown documentation to reflect code and session changes. Use this skill whenever the user says "mdu", asks to "update docs", "sync documentation", "refresh changelog", "update the changelog", "docs are stale", "add this to the changelog", or any request to align documentation with recent code changes.…

dfirtnt/Huntable-CTI-Studio · 203 tokens