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.
npx agentmods add skills/evilfreelancer/secs/establishing-persistencenpx skills add EvilFreelancer/secs --skill establishing-persistencegit clone --depth 1 https://github.com/EvilFreelancer/secsWrote 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.
[](https://agentmods.dev/skills/evilfreelancer/secs/establishing-persistence)<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>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.
| Model | Per session | Once 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 |
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.
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-privilegesorescalating-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
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.
- 4d ago First seen · 110 lines · 115 tokens per session scan B 399fa9c81518
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.
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.
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.
ship
Ship current branch — CI, SonarCloud, code review, security review, fix all issues, merge. Assumes code is already committed and pushed.
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…
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)…
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.…