Blue Team Defense & Hardening

Blue Team Defense & Hardening is a skill for Claude Code from Masriyan/Claude-Code-CyberSecurity-Skill. It costs 30 tokens per session (6,818 once invoked), scanned B, original, MIT.

A defensive security aid for making servers, workstations, networks, and monitoring rules safer and easier to manage.

In plain words
What is it for?
It is for hardening Linux and Windows systems, reviewing SSH and web-server settings, creating rules for tools such as Sigma and Splunk, monitoring security baselines, and planning network and endpoint protections.
Why use it?
It helps turn security reviews into concrete configuration changes, detection rules, patch priorities, and improvement plans.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the cybersecurity plugin — 20 skills shipped together

Good fit It is for hardening Linux and Windows systems, reviewing SSH and web-server settings, creating rules for tools such as Sigma and Splunk, monitoring security baselines, and planning network and endpoint protections.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/masriyan/claude-code-cybersecurity-skill/15-blue-team-defense
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 Masriyan/Claude-Code-CyberSecurity-Skill --skill 15-blue-team-defense
Clone the repo
git clone --depth 1 https://github.com/Masriyan/Claude-Code-CyberSecurity-Skill

Made for: Claude Code.

Or install cybersecurity, the plugin that ships this one along with the rest of its 20 skills.

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 Blue Team Defense & Hardening

README.md
[![agentmods](https://agentmods.dev/badge/skills/masriyan/claude-code-cybersecurity-skill/15-blue-team-defense/github.svg)](https://agentmods.dev/skills/masriyan/claude-code-cybersecurity-skill/15-blue-team-defense)
Your own site
<a href="https://agentmods.dev/skills/masriyan/claude-code-cybersecurity-skill/15-blue-team-defense"><img src="https://agentmods.dev/badge/skills/masriyan/claude-code-cybersecurity-skill/15-blue-team-defense/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 Blue Team Defense & Hardening

Your own site · 80×15
<a href="https://agentmods.dev/skills/masriyan/claude-code-cybersecurity-skill/15-blue-team-defense"><img src="https://agentmods.dev/badge/skills/masriyan/claude-code-cybersecurity-skill/15-blue-team-defense.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,818 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 11 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 73
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 195
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 217
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 196
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 218
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Privilege Escalation · line 185
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Tool Misuse · line 187
    Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.
    Fix: Override unsafe defaults with secure settings (verify=True, auth required, restrictive permissions). Review and harden all tool configurations.
  • medium Privilege Escalation · line 223
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 258
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 248
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Rogue Agent · line 351
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
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.00030 $0.06818
Opus 5 $0.00015 $0.03409
Sonnet 5 $0.00006 $0.01364
Haiku 4.5 $0.00003 $0.00682

Measured 3d ago against content hash 0f28f95782f3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade B, and why

Blue Team Defense & Hardening scanned grade B with 2 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 3d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/hardening_checker.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

-a always,exit -F path=/usr/bin/sudo -F perm=x -F auid>=1000 -F auid!=4294967295 -k sudo_use

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

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.

AuthorizedKeysFile .ssh/authorized_keys

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

skills/15-blue-team-defense/SKILL.md · 757 lines

How it starts

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

Blue Team Defense & Hardening

Purpose

Enable Claude to assist defenders with comprehensive security hardening, detection rule engineering, security baseline establishment, patch management, and security architecture review. Claude directly analyzes provided configurations, scripts, and system state — then produces specific hardening commands, detection rules, and improvement plans.


Activation Triggers

This skill activates when the user asks about:

  • Hardening Linux (Ubuntu, RHEL, CentOS, Debian) servers
  • Hardening Windows Server or Windows workstations (CIS Benchmarks)
  • Creating detection rules (Sigma, Splunk, KQL, YARA, Snort/Suricata)
  • Security baseline definition and monitoring
  • Patch management strategy and prioritization
  • Security architecture review (defense-in-depth, zero trust)
  • Implementing Sysmon, auditd, or Windows audit policy
  • Hardening SSH, nginx, Apache, or database configurations
  • Network security controls and microsegmentation
  • Endpoint protection (EDR, HIPS) configuration guidance
  • Security posture improvement after a red team or pentest

Prerequisites

pip install pyyaml jinja2 requests

Tools used in this skill:

  • Sysmon — Windows endpoint telemetry (SwiftOnSecurity config recommended)
  • auditd — Linux audit daemon
  • Lynis — Linux security auditing tool
  • OpenSCAP / oscap — CIS/STIG compliance scanning
  • fail2ban — SSH and service brute-force protection
  • CIS-CAT — CIS Benchmark compliance tool

Core Capabilities

1. Linux System Hardening

When the user asks to harden a Linux server:

Claude produces specific commands ready to run.

SSH Hardening
# /etc/ssh/sshd_config — Secure SSH configuration
cat >> /etc/ssh/sshd_config << 'EOF'
# Security hardening
Protocol 2
PermitRootLogin no
PasswordAuthentication no
PermitEmptyPasswords no
MaxAuthTries 3
LoginGraceTime 30
ClientAliveInterval 300
ClientAliveCountMax 2
AllowUsers [specific_users]     # Explicit user allowlist
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
X11Forwarding no
AllowAgentForwarding no
AllowTcpForwarding no
PrintMotd no
Banner /etc/ssh/banner
Subsystem sftp /usr/lib/openssh/sftp-server -l INFO
EOF

# Restart SSH (check config first)
sshd -t && systemctl restart sshd

Read the full file on GitHub · 757 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago Changed 0f28f95782f3
  2. 12d ago First seen · 757 lines · 30 tokens per session scan B 5da2b88cb34f

Subscribe to this mod's changes

Blue Team Defense & Hardening is a skill published in the GitHub repository Masriyan/Claude-Code-CyberSecurity-Skill (409 stars, last pushed 4d ago), licensed MIT. It adds 30 tokens to every session and 6,818 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

deploying-ransomware-canary-files

Deploys and monitors ransomware canary files across critical directories using Python's watchdog library for real-time filesystem event detection. Places strategically named decoy files that mimic high-value targets (financial records, credentials, database exports) in locations ransomware typically enumerates first.…

26zl/cybersec-toolkit · 103 tokens

hardening

A set of Linux instructions for hardening systems, meaning reducing unsafe settings and limiting unnecessary access.

chaterm/terminal-skills · 6 tokens

analyzing-security-logs-with-splunk

Leverages Splunk Enterprise Security and SPL (Search Processing Language) to investigate security incidents through log correlation, timeline reconstruction, and anomaly detection. Covers Windows event logs, firewall logs, proxy logs, and authentication data analysis. Activates for requests involving Splunk…

26zl/cybersec-toolkit · 82 tokens

configuring-windows-defender-advanced-settings

Configures Microsoft Defender for Endpoint (MDE) advanced protection settings including attack surface reduction rules, controlled folder access, network protection, and exploit protection. Use when hardening Windows endpoints beyond default Defender settings, deploying enterprise-grade endpoint protection, or meeting…

26zl/cybersec-toolkit · 88 tokens

deploying-active-directory-honeytokens

Deploys deception-based honeytokens in Active Directory including fake privileged accounts with AdminCount=1, fake SPNs for Kerberoasting detection (honeyroasting), decoy GPOs with cpassword traps, and fake BloodHound paths. Monitors Windows Security Event IDs 4769, 4625, 4662, 5136 for honeytoken interaction. Use…

26zl/cybersec-toolkit · 101 tokens

deploying-decoy-files-for-ransomware-detection

Deploys canary files (honeytokens) across file systems to detect ransomware encryption activity in real time. Uses strategically placed decoy documents monitored via file integrity monitoring or OS-level watchdogs to trigger alerts when ransomware modifies or encrypts them. Activates for requests involving ransomware…

26zl/cybersec-toolkit · 87 tokens