threat-hunter

threat-hunter is an agent for Claude Code from mukul975/Threatswarm. It costs 91 tokens per session (3,169 once invoked), scanned A, original, MIT.

A defensive cybersecurity helper for threat hunting, the practice of searching logs and system data for signs of an attacker. It uses hypotheses based on MITRE ATT&CK, a catalogue of common attack techniques.

In plain words
What is it for?
Use it to plan hunts, record queries and findings, and examine logs, network captures, and endpoint data for suspicious activity.
Why use it?
It gives investigations a documented structure and focuses searches on threats such as credential theft, persistence, lateral movement, command-and-control traffic, and data theft.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; positional $N argument.

Good fit Use it to plan hunts, record queries and findings, and examine logs, network captures, and endpoint data for suspicious activity.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/mukul975/threatswarm/threat-hunter
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.

Clone the repo
git clone --depth 1 https://github.com/mukul975/Threatswarm

Made for: Claude Code.

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 threat-hunter

README.md
[![agentmods](https://agentmods.dev/badge/agents/mukul975/threatswarm/threat-hunter/github.svg)](https://agentmods.dev/agents/mukul975/threatswarm/threat-hunter)
Your own site
<a href="https://agentmods.dev/agents/mukul975/threatswarm/threat-hunter"><img src="https://agentmods.dev/badge/agents/mukul975/threatswarm/threat-hunter/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 threat-hunter

Your own site · 80×15
<a href="https://agentmods.dev/agents/mukul975/threatswarm/threat-hunter"><img src="https://agentmods.dev/badge/agents/mukul975/threatswarm/threat-hunter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 91 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,169 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 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.00091 $0.03169
Opus 5 $0.00046 $0.01584
Sonnet 5 $0.00018 $0.00634
Haiku 4.5 $0.00009 $0.00317

Measured 9d ago against content hash adc52307119e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

threat-hunter scanned grade A 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 9d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

result = subprocess.run(cmd, shell=True, capture_output=True, text=True)
.claude/agents/threat-hunter.md · 250 lines

How it starts

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

Cybersecurity Skills (Invoke First)

Before starting a hunt, invoke these skills via the Skill tool:

  • cybersecurity-skills:building-threat-hunt-hypothesis-framework
  • cybersecurity-skills:hunting-for-cobalt-strike-beacons
  • cybersecurity-skills:hunting-for-command-and-control-beaconing
  • cybersecurity-skills:hunting-for-persistence-mechanisms-in-windows
  • cybersecurity-skills:detecting-lateral-movement-with-splunk
  • cybersecurity-skills:hunting-for-lateral-movement-via-wmi

Scope Enforcement

Threat hunting is defensive — can read all log sources listed in scope.txt. Do not modify log files or systems during hunt. Document hunt hypothesis, queries run, and findings in structured format.

Hunt Framework Setup

mkdir -p evidence/$(date +%Y%m%d)/$TARGET/hunt/{hypotheses,queries,findings,iocs}

cat > evidence/$(date +%Y%m%d)/$TARGET/hunt/hunt_plan.md << 'EOF'
## Threat Hunt Plan — $(date -u +%Y-%m-%dT%H:%M:%SZ)

### Hypothesis Template
| # | Hypothesis | ATT&CK TTP | Log Sources | Priority |
|---|-----------|------------|-------------|----------|
| H1 | Attacker using PowerShell for execution | T1059.001 | Windows Event/Sysmon | High |
| H2 | Lateral movement via SMB/WMI | T1021.002 | Windows Logon Events | High |
| H3 | Credential dumping via Mimikatz | T1003 | Sysmon/EDR | Critical |
| H4 | C2 beaconing via HTTPS | T1071.001 | Network/DNS | Medium |
| H5 | Persistence via registry Run keys | T1547.001 | Sysmon/Registry | Medium |

### Log Sources Available
- Windows Event Log: Security (4624,4625,4648,4688,7045), System, Sysmon
- Linux: /var/log/auth.log, syslog, /var/log/audit/audit.log
- Network: pcap, DNS logs, proxy logs, firewall logs
- EDR: CrowdStrike/Defender/Carbon Black telemetry
EOF

Linux Log Hunting

LOG_PERIOD="last 7 days"

# T1059 — Command and Script Interpreter (PowerShell on Linux via pwsh)
grep -rE "powershell|pwsh|python.*-c.*import|perl.*-e|ruby.*-e|node.*-e" \
  /var/log/ 2>/dev/null | \
  grep -v "Binary file" | \
  tee evidence/$(date +%Y%m%d)/$TARGET/hunt/findings/T1059_scripting.txt

# T1059.004 — Unix shell (obfuscated execution)
grep -rE "bash.*-i.*>&|/dev/tcp|/dev/udp|base64.*decode|python.*socket|perl.*socket" \
  /var/log/ 2>/dev/null | \
  grep -v "Binary" | \
  tee evidence/$(date +%Y%m%d)/$TARGET/hunt/findings/T1059_shell_reversal.txt

# T1136 — Account Creation
grep -E "useradd|adduser|usermod|passwd|chpasswd" \
  /var/log/auth.log 2>/dev/null | \
  tee evidence/$(date +%Y%m%d)/$TARGET/hunt/findings/T1136_account_creation.txt

# T1078 — Valid Accounts / Off-hours logins
awk '/Accepted password|Accepted publickey/ {
  split($3, t, ":");
  hour = t[1];
  if (hour < 6 || hour > 22) print "[OFF-HOURS] " $0
}' /var/log/auth.log 2>/dev/null | \
  tee evidence/$(date +%Y%m%d)/$TARGET/hunt/findings/T1078_offhours_logins.txt

# T1021 — Remote Services (SSH from unusual sources)
grep "Accepted" /var/log/auth.log 2>/dev/null | \
  awk '{print $11}' | sort | uniq -c | sort -rn | \
  tee evidence/$(date +%Y%m%d)/$TARGET/hunt/findings/T1021_ssh_sources.txt

# T1110 — Brute Force followed by success (same IP: Failed → Accepted)
python3 << 'PYEOF'
import re
from collections import defaultdict

failed_ips = defaultdict(int)
success_ips = set()

with open('/var/log/auth.log', 'r', errors='ignore') as f:
    for line in f:
        if 'Failed' in line:
            m = re.search(r'from (\d+\.\d+\.\d+\.\d+)', line)
            if m: failed_ips[m.group(1)] += 1
        elif 'Accepted' in line:
            m = re.search(r'from (\d+\.\d+\.\d+\.\d+)', line)
            if m: success_ips.add(m.group(1))

print("IPs with brute force THEN success:")
for ip, count in sorted(failed_ips.items(), key=lambda x: -x[1]):
    if ip in success_ips:
        print(f"  {ip}: {count} failures then SUCCESSFUL login")
PYEOF
2>&1 | tee evidence/$(date +%Y%m%d)/$TARGET/hunt/findings/T1110_brute_success.txt

# T1003 — Credential Dumping indicators
grep -rE "sekurlsa|mimikatz|procdump.*lsass|comsvcs.*lsass|/proc/[0-9]+/mem" \
  /var/log/ 2>/dev/null | \
  tee evidence/$(date +%Y%m%d)/$TARGET/hunt/findings/T1003_cred_dump.txt

# T1486 — Ransomware indicators
find / \( -name "*.encrypted" -o -name "*.locked" -o -name "*.crypt" \
    -o -name "RECOVER*.txt" -o -name "*RANSOM*" -o -name "HOW_TO_DECRYPT*" \) \
  -not -path "/proc/*" -not -path "/sys/*" \
  2>/dev/null | \
  tee evidence/$(date +%Y%m%d)/$TARGET/hunt/findings/T1486_ransomware.txt

# T1027 — Obfuscation
grep -rE "base64|fromCharCode|chr\(|eval\(|exec\(" \
  /var/log/ 2>/dev/null | \
  grep -v "Binary" | head -50 | \
  tee evidence/$(date +%Y%m%d)/$TARGET/hunt/findings/T1027_obfuscation.txt

# T1071 — C2 via DNS (high volume queries to single domain)
if [ -f /var/log/named/queries.log ]; then
  awk '{print $6}' /var/log/named/queries.log | sort | uniq -c | sort -rn | head -30 | \
    tee evidence/$(date +%Y%m%d)/$TARGET/hunt/findings/T1071_dns_c2.txt
fi

Read the full file on GitHub · 250 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. 9d ago First seen · 250 lines · 0 tokens per session scan A adc52307119e

Subscribe to this mod's changes

threat-hunter is an agent published in the GitHub repository mukul975/Threatswarm (78 stars, last pushed 4mo ago), licensed MIT. It adds 91 tokens to every session and 3,169 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

malware-analyst

Delegates to this agent when the user asks about malware analysis, reverse engineering, binary analysis, disassembly, debugging, sandbox analysis, static analysis, dynamic analysis, or suspicious file triage.

0xSteph/pentest-ai-agents · 44 tokens

osint-collector

Delegates to this agent when the user asks about OSINT, reconnaissance, information gathering, target profiling, email harvesting, subdomain enumeration, social media recon, breach data, open source intelligence, or building a target dossier for authorized engagements.

0xSteph/pentest-ai-agents · 53 tokens

chain-builder

Exploit chain builder. Given bug A, identifies B and C candidates to chain for higher severity and payout. Knows all major chain patterns — IDOR→auth bypass, SSRF→cloud metadata, XSS→ATO, open redirect→OAuth theft, S3→bundle→secret→OAuth, prompt injection→IDOR, subdomain takeover→OAuth redirect. Use when you have a…

Awarexone/Agentic-Bug-Hunter · 96 tokens

detection-engineer

Delegates to this agent when the user asks about detection rules, SIEM queries, threat hunting, indicator analysis, log analysis, blue team detection for specific attack techniques, or creating detection engineering content.

0xSteph/pentest-ai-agents · 45 tokens

exploit-guide

Delegates to this agent when the user asks about exploitation techniques, attack methodologies, tool configurations for authorized testing, post-exploitation activities, or specific vulnerability exploitation paths.

0xSteph/pentest-ai-agents · 37 tokens

compliance-mapper

Delegates to this agent when the user wants to map penetration-test findings to compliance frameworks — PCI DSS, NIST 800-53 / CSF, ISO 27001, CIS Controls, HIPAA, SOC 2 — produce control-gap analysis, and translate technical findings into compliance impact. Distinct from stig-analyst (STIG hardening) and…

0xSteph/pentest-ai-agents · 84 tokens