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 commands/ogrodev/fsociety/op-hardengit clone --depth 1 https://github.com/ogrodev/fsocietyWrote 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/commands/ogrodev/fsociety/op-harden)<a href="https://agentmods.dev/commands/ogrodev/fsociety/op-harden"><img src="https://agentmods.dev/badge/commands/ogrodev/fsociety/op-harden.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.00018 | $0.00839 |
| Opus 5 | $0.00009 | $0.00419 |
| Sonnet 5 | $0.00004 | $0.00168 |
| Haiku 4.5 | $0.00002 | $0.00084 |
Grade A, and why
op-harden scanned grade A with 0 findings 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 today.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Storage Policy: ALL output files MUST be saved in the project directory. NEVER write to /tmp/ or any system temporary directory.
OS Hardening Assessment
Target and options: $ARGUMENTS
-
Parse
$ARGUMENTSfor target host,--scope(defaultfull), and--applyflag. Store parsed values for use throughout the command. -
Load tools via
ToolSearch: system administration, network configuration tools. Identify available Hexstrike MCP tools for remote system assessment. -
For each scope category enabled by the
--scopeflag, run assessment checks via Hexstrike MCP tools. Collect all findings before generating the report. -
Log each finding to the ops tracker:
node "${CLAUDE_PLUGIN_ROOT}/scripts/ops-tracker.js" add <target> hardening-check <category> "<action>" <result> <severity> -
Kernel (
--scope kernelorfull): Check sysctl parameters for secure defaults:net.ipv4.ip_forward— should be0unless routing is requiredkernel.randomize_va_space— should be2(full ASLR)kernel.dmesg_restrict— should be1(restrict dmesg to root)kernel.kptr_restrict— should be2(hide kernel pointers)net.ipv4.conf.all.rp_filter— should be1(reverse path filtering)net.ipv4.icmp_echo_ignore_broadcasts— should be1(prevent smurf attacks)
-
SSH (
--scope sshorfull): Parsesshd_configand verify:PermitRootLogin— should benoPasswordAuthentication— should beno(key-only)Port— should be non-default (not 22)MaxAuthTries— should be3or fewerAllowUsers— should be explicitly setPubkeyAuthentication— should beyes
-
Firewall (
--scope firewallorfull): Check iptables/nftables configuration:- Verify default INPUT/FORWARD policy is DROP
- List all ACCEPT rules and flag overly permissive ones
- Cross-reference open ports with running services
- Check for rate limiting on SSH and other exposed services
-
Services (
--scope servicesorfull): List all running services viasystemctl list-units --type=service --state=running. Flag unnecessary or risky services (telnet, rpcbind, avahi-daemon, cups, nfs, rsh, rlogin). -
MAC (
--scope macorfull): Check if macchanger is installed and configured for interface randomization on boot. Verify NetworkManager dispatcher scripts or systemd unit for automatic MAC rotation. -
If
--applyflag is set: Generate remediation commands for each failed check. Present the full remediation plan to the user and execute only after explicit confirmation. Apply changes incrementally and verify each one. -
Write the hardening report to the project directory. Include a summary table of all checks with PASS/FAIL/WARN status, severity ratings, and remediation commands for failed checks.
-
Update session metrics:
node "${CLAUDE_PLUGIN_ROOT}/scripts/session-state.js" metric checks_passed node "${CLAUDE_PLUGIN_ROOT}/scripts/session-state.js" metric checks_failed
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.
- today First seen · 59 lines · 18 tokens per session scan A 1dc8101df7ab
op-harden is a command published in the GitHub repository ogrodev/fsociety (20 stars, last pushed 5mo ago), licensed MIT. It adds 18 tokens to every session and 839 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other commands, from other repositories
pentest
Activate pentest mode — displays ASCII art, configures session isolation, collects engagement scope, then OWNS the engagement: pre-flight, recon, planning (via the pentester-orchestrator planner), executor dispatch, a time-budget quota loop, aggregation, and report generation.
pentest-attacks
Define the attack profile for an engagement — select which attack categories and skills to use. Saves to .pentest-attacks.json. If run before /pentest:pentest, the orchestrator will respect the selection. If run standalone, does not launch a pentest.
pentest-kali
Connect to a Metasploit-Kali Server (MKS) REST API — verifies connectivity, discovers available Kali tools, and configures agents to prefer MKS endpoints over local Bash equivalents.
pentest-scope
Define or update engagement scope — saves scope to disk without launching a pentest. Can be run before or during an engagement. If a pentest is active and the target changes drastically, warns the operator and suggests a new engagement.
pentest-exit
Close pentest session — summarizes findings, ensures outputs are saved, lifts isolation, and prompts for /clear.
bb-ad
Active Directory enumeration and attack techniques. Includes LDAP enumeration, Kerberos attacks (Kerberoasting, AS-REP Roasting), SMB attacks, and domain privilege escalation. Use this when targeting Windows domain environments.