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

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md.

Good fit 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.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/evilfreelancer/secs/establishing-persistence
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.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for establishing-persistence

Your own site · 80×15
<a href="https://agentmods.dev/skills/evilfreelancer/secs/establishing-persistence"><img src="https://agentmods.dev/badge/skills/evilfreelancer/secs/establishing-persistence.svg" alt="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00115 $0.01620
Opus 5.5 $0.00046 $0.00648
Sonnet 5.5 $0.00023 $0.00324
Haiku 4.5 $0.00012 $0.00162

Measured 3mo ago against content hash 399fa9c81518, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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. 3mo 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 (11 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 115 tokens to every session and 1,620 once invoked, about $0.0005 per session on Opus 5.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

establishing-persistence compared with skills from other repositories

establishing-persistence next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
establishing-persistenceEvilFreelancer/secsSkill113mo agoApache-2.0B115Claude Code, Codex
ctf-reverse26zl/cybersec-toolkitSkill1135d agoMITA125Claude Code
analyzing-email-headers-for-phishing-investigation26zl/cybersec-toolkitSkill1135d agoMITA84Claude Code
analyzing-ransomware-encryption-mechanisms26zl/cybersec-toolkitSkill1135d agoMITA79Claude Code
analyzing-slack-space-and-file-system-artifacts26zl/cybersec-toolkitSkill1135d agoMITA86Claude Code
configuring-identity-aware-proxy-with-google-iap26zl/cybersec-toolkitSkill1135d agoMITA98Claude Code
configuring-network-segmentation-with-vlans26zl/cybersec-toolkitSkill1135d agoMITA93Claude Code