security-detections-mcp

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

security-detections-mcp

security-detections-mcp

Skill by ara.so — Security Skills collection
An MCP (Model Context Protocol) server providing LLM access to 8,200+ security detection rules across Sigma, Splunk ESCU, Elastic, KQL, Sublime, and CrowdStrike CQL formats, with MITRE ATT&CK mapping, coverage analysis, and autonomous detection engineering.
ara.so提供的技能——安全技能合集
这是一款MCP(Model Context Protocol)服务器,为大语言模型(LLM)提供对8200+条跨Sigma、Splunk ESCU、Elastic、KQL、Sublime和CrowdStrike CQL格式的安全检测规则的访问权限,支持MITRE ATT&CK映射、覆盖分析以及自动化检测工程。

What It Does

功能介绍

  • Unified detection search across 6 major security platforms (Sigma, Splunk, Elastic, KQL, Sublime, CrowdStrike)
  • MITRE ATT&CK integration with 172 threat actors, 784 software, 4,362 actor-technique relationships
  • Coverage analysis identifying gaps in detection by tactic/technique/actor
  • ATT&CK Navigator layers exportable as JSON for visualization
  • Autonomous detection pipeline from CTI ingestion to draft PR generation
  • 81 MCP tools for detection engineering (local) or ~25 tools (hosted)
  • 11 expert prompts for ransomware assessment, APT emulation, purple teaming
  • 统一检测搜索:覆盖6大主流安全平台(Sigma、Splunk、Elastic、KQL、Sublime、CrowdStrike)
  • MITRE ATT&CK集成:包含172个威胁 actor、784款软件、4362组 actor-技术关联关系
  • 覆盖分析:按战术/技术/actor识别检测缺口
  • ATT&CK Navigator图层:可导出为JSON格式用于可视化
  • 自动化检测流水线:从CTI摄入到生成草稿PR的完整流程
  • 81款MCP工具:用于本地检测工程,托管版本约提供25款工具
  • 11个专家提示词:用于勒索软件评估、APT仿真、紫队演练

Installation

安装步骤

Local Installation (Full Power)

本地安装(全功能版)

Prerequisites:
  • Node.js 18+
  • Detection rule repositories cloned locally
Quick start with npx:
bash
npx -y security-detections-mcp
Configure in Claude Desktop (
claude_desktop_config.json
):
json
{
  "mcpServers": {
    "security-detections": {
      "command": "npx",
      "args": ["-y", "security-detections-mcp"],
      "env": {
        "SIGMA_PATHS": "/path/to/sigma/rules,/path/to/sigma/rules-threat-hunting",
        "SPLUNK_PATHS": "/path/to/security_content/detections",
        "STORY_PATHS": "/path/to/security_content/stories",
        "ELASTIC_PATHS": "/path/to/detection-rules/rules",
        "KQL_PATHS": "/path/to/kql-rules",
        "SUBLIME_PATHS": "/path/to/sublime-rules/detection-rules",
        "CQL_HUB_PATHS": "/path/to/cql-hub/queries",
        "ATTACK_STIX_PATH": "/path/to/enterprise-attack.json"
      }
    }
  }
}
Configure in Cursor (
.cursor/settings.json
):
json
{
  "mcp": {
    "servers": {
      "security-detections": {
        "command": "npx",
        "args": ["-y", "security-detections-mcp"],
        "env": {
          "SIGMA_PATHS": "/Users/you/detections/sigma/rules",
          "SPLUNK_PATHS": "/Users/you/detections/security_content/detections"
        }
      }
    }
  }
}
Configure in VS Code (settings.json):
json
{
  "mcp.servers": {
    "security-detections": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "security-detections-mcp"],
      "env": {
        "SIGMA_PATHS": "/home/you/detections/sigma/rules"
      }
    }
  }
}
前置要求:
  • Node.js 18+
  • 已本地克隆检测规则仓库
使用npx快速启动:
bash
npx -y security-detections-mcp
在Claude Desktop中配置
claude_desktop_config.json
):
json
{
  "mcpServers": {
    "security-detections": {
      "command": "npx",
      "args": ["-y", "security-detections-mcp"],
      "env": {
        "SIGMA_PATHS": "/path/to/sigma/rules,/path/to/sigma/rules-threat-hunting",
        "SPLUNK_PATHS": "/path/to/security_content/detections",
        "STORY_PATHS": "/path/to/security_content/stories",
        "ELASTIC_PATHS": "/path/to/detection-rules/rules",
        "KQL_PATHS": "/path/to/kql-rules",
        "SUBLIME_PATHS": "/path/to/sublime-rules/detection-rules",
        "CQL_HUB_PATHS": "/path/to/cql-hub/queries",
        "ATTACK_STIX_PATH": "/path/to/enterprise-attack.json"
      }
    }
  }
}
在Cursor中配置
.cursor/settings.json
):
json
{
  "mcp": {
    "servers": {
      "security-detections": {
        "command": "npx",
        "args": ["-y", "security-detections-mcp"],
        "env": {
          "SIGMA_PATHS": "/Users/you/detections/sigma/rules",
          "SPLUNK_PATHS": "/Users/you/detections/security_content/detections"
        }
      }
    }
  }
}
在VS Code中配置(settings.json):
json
{
  "mcp.servers": {
    "security-detections": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "security-detections-mcp"],
      "env": {
        "SIGMA_PATHS": "/home/you/detections/sigma/rules"
      }
    }
  }
}

Hosted Installation (Zero Setup)

托管安装(零配置)

Prerequisites:
Claude Desktop (requires
mcp-remote
):
json
{
  "mcpServers": {
    "security-detections": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://detect.michaelhaag.org/api/mcp/mcp",
        "--header",
        "Authorization: Bearer ${SDMCP_TOKEN}"
      ]
    }
  }
}
VS Code / Cursor:
json
{
  "mcp.servers": {
    "security-detections": {
      "type": "http",
      "url": "https://detect.michaelhaag.org/api/mcp/mcp",
      "headers": {
        "Authorization": "Bearer ${SDMCP_TOKEN}"
      }
    }
  }
}
前置要求:
Claude Desktop(需安装
mcp-remote
):
json
{
  "mcpServers": {
    "security-detections": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://detect.michaelhaag.org/api/mcp/mcp",
        "--header",
        "Authorization: Bearer ${SDMCP_TOKEN}"
      ]
    }
  }
}
VS Code / Cursor:
json
{
  "mcp.servers": {
    "security-detections": {
      "type": "http",
      "url": "https://detect.michaelhaag.org/api/mcp/mcp",
      "headers": {
        "Authorization": "Bearer ${SDMCP_TOKEN}"
      }
    }
  }
}

Getting Detection Content

获取检测内容

Download all detection sources with sparse checkout:
bash
mkdir -p ~/detections && cd ~/detections
使用稀疏检出下载所有检测源:
bash
mkdir -p ~/detections && cd ~/detections

Sigma rules

Sigma规则

git clone --depth 1 --filter=blob:none --sparse https://github.com/SigmaHQ/sigma.git cd sigma && git sparse-checkout set rules rules-threat-hunting && cd ..
git clone --depth 1 --filter=blob:none --sparse https://github.com/SigmaHQ/sigma.git cd sigma && git sparse-checkout set rules rules-threat-hunting && cd ..

Splunk ESCU

Splunk ESCU

git clone --depth 1 --filter=blob:none --sparse https://github.com/splunk/security_content.git cd security_content && git sparse-checkout set detections stories && cd ..
git clone --depth 1 --filter=blob:none --sparse https://github.com/splunk/security_content.git cd security_content && git sparse-checkout set detections stories && cd ..

Elastic

Elastic规则

git clone --depth 1 --filter=blob:none --sparse https://github.com/elastic/detection-rules.git cd detection-rules && git sparse-checkout set rules && cd ..
git clone --depth 1 --filter=blob:none --sparse https://github.com/elastic/detection-rules.git cd detection-rules && git sparse-checkout set rules && cd ..

KQL

KQL规则

Sublime

Sublime规则

git clone --depth 1 --filter=blob:none --sparse https://github.com/sublime-security/sublime-rules.git cd sublime-rules && git sparse-checkout set detection-rules && cd ..
git clone --depth 1 --filter=blob:none --sparse https://github.com/sublime-security/sublime-rules.git cd sublime-rules && git sparse-checkout set detection-rules && cd ..

CrowdStrike CQL

CrowdStrike CQL规则

MITRE ATT&CK STIX

MITRE ATT&CK STIX数据


Then update environment variables to point to these paths.

随后更新环境变量指向这些路径。

Core MCP Tools

核心MCP工具

Detection Search & Retrieval

检测搜索与检索

typescript
// Full-text search across all detections
{
  "name": "search",
  "arguments": {
    "query": "process injection",
    "limit": 10
  }
}

// Get specific detection by ID
{
  "name": "get_by_id",
  "arguments": {
    "id": "sigma_abc123"
  }
}

// List all detections with pagination
{
  "name": "list_all",
  "arguments": {
    "limit": 50,
    "offset": 0
  }
}

// Filter by source type
{
  "name": "list_by_source",
  "arguments": {
    "source_type": "sigma"  // sigma, splunk_escu, elastic, kql, sublime, crowdstrike_cql
  }
}

// Get index statistics
{
  "name": "get_stats",
  "arguments": {}
}
typescript
// 跨所有检测规则进行全文搜索
{
  "name": "search",
  "arguments": {
    "query": "process injection",
    "limit": 10
  }
}

// 通过ID获取特定检测规则
{
  "name": "get_by_id",
  "arguments": {
    "id": "sigma_abc123"
  }
}

// 分页列出所有检测规则
{
  "name": "list_all",
  "arguments": {
    "limit": 50,
    "offset": 0
  }
}

// 按源类型过滤
{
  "name": "list_by_source",
  "arguments": {
    "source_type": "sigma"  // sigma, splunk_escu, elastic, kql, sublime, crowdstrike_cql
  }
}

// 获取索引统计信息
{
  "name": "get_stats",
  "arguments": {}
}

MITRE ATT&CK Filtering

MITRE ATT&CK过滤

typescript
// Find detections for specific technique
{
  "name": "list_by_mitre",
  "arguments": {
    "technique_id": "T1059.001"  // PowerShell
  }
}

// Filter by tactic
{
  "name": "list_by_mitre_tactic",
  "arguments": {
    "tactic": "execution"  // execution, persistence, privilege-escalation, etc.
  }
}

// Search by CVE
{
  "name": "list_by_cve",
  "arguments": {
    "cve_id": "CVE-2021-34527"  // PrintNightmare
  }
}

// Find by process name
{
  "name": "list_by_process_name",
  "arguments": {
    "process_name": "powershell.exe"
  }
}

// Filter by severity
{
  "name": "list_by_severity",
  "arguments": {
    "level": "critical"  // critical, high, medium, low
  }
}

// Filter by data source
{
  "name": "list_by_data_source",
  "arguments": {
    "data_source": "process_creation"
  }
}
typescript
// 查找特定技术对应的检测规则
{
  "name": "list_by_mitre",
  "arguments": {
    "technique_id": "T1059.001"  // PowerShell
  }
}

// 按战术过滤
{
  "name": "list_by_mitre_tactic",
  "arguments": {
    "tactic": "execution"  // execution, persistence, privilege-escalation等
  }
}

// 按CVE搜索
{
  "name": "list_by_cve",
  "arguments": {
    "cve_id": "CVE-2021-34527"  // PrintNightmare
  }
}

// 按进程名称查找
{
  "name": "list_by_process_name",
  "arguments": {
    "process_name": "powershell.exe"
  }
}

// 按严重程度过滤
{
  "name": "list_by_severity",
  "arguments": {
    "level": "critical"  // critical, high, medium, low
  }
}

// 按数据源过滤
{
  "name": "list_by_data_source",
  "arguments": {
    "data_source": "process_creation"
  }
}

Coverage Analysis

覆盖分析

typescript
// Analyze overall coverage (~2KB response)
{
  "name": "analyze_coverage",
  "arguments": {
    "source_type": "sigma"  // optional: analyze specific source
  }
}

// Identify gaps for threat profile (~500B response)
{
  "name": "identify_gaps",
  "arguments": {
    "threat_profile": "ransomware"  // ransomware, apt, persistence, lateral_movement
  }
}

// Get detection suggestions for technique (~2KB)
{
  "name": "suggest_detections",
  "arguments": {
    "technique_id": "T1003.001"  // LSASS Memory
  }
}

// Coverage summary by tactic (~200B)
{
  "name": "get_coverage_summary",
  "arguments": {
    "source_type": "splunk_escu"
  }
}

// Analyze coverage against threat actor
{
  "name": "analyze_actor_coverage",
  "arguments": {
    "actor": "APT29"
  }
}

// Compare coverage across multiple actors
{
  "name": "compare_actor_coverage",
  "arguments": {
    "actors": ["APT29", "APT28", "Lazarus Group"]
  }
}

// Behavioral procedure breakdown for technique
{
  "name": "analyze_procedure_coverage",
  "arguments": {
    "technique_id": "T1055"
  }
}
typescript
// 分析整体覆盖情况(约2KB响应)
{
  "name": "analyze_coverage",
  "arguments": {
    "source_type": "sigma"  // 可选:分析特定源
  }
}

// 识别威胁场景的检测缺口(约500B响应)
{
  "name": "identify_gaps",
  "arguments": {
    "threat_profile": "ransomware"  // ransomware, apt, persistence, lateral_movement
  }
}

// 获取特定技术的检测建议(约2KB)
{
  "name": "suggest_detections",
  "arguments": {
    "technique_id": "T1003.001"  // LSASS Memory
  }
}

// 按战术汇总覆盖情况(约200B)
{
  "name": "get_coverage_summary",
  "arguments": {
    "source_type": "splunk_escu"
  }
}

// 分析针对特定威胁actor的覆盖情况
{
  "name": "analyze_actor_coverage",
  "arguments": {
    "actor": "APT29"
  }
}

// 对比多个actor的覆盖情况
{
  "name": "compare_actor_coverage",
  "arguments": {
    "actors": ["APT29", "APT28", "Lazarus Group"]
  }
}

// 分析特定技术的行为流程覆盖
{
  "name": "analyze_procedure_coverage",
  "arguments": {
    "technique_id": "T1055"
  }
}

ATT&CK Navigator Layer Generation

ATT&CK Navigator图层生成

typescript
// Generate Navigator layer JSON
{
  "name": "generate_navigator_layer",
  "arguments": {
    "name": "Current Coverage",
    "description": "Detection coverage as of 2024-01",
    "filter": {
      "source": "sigma",
      "tactic": "defense-evasion",
      "min_severity": "medium"
    },
    "color_by": "coverage"  // coverage, severity, source
  }
}

// Export to file (local only)
{
  "name": "export_navigator_layer",
  "arguments": {
    "output_path": "./coverage-layer.json",
    "filter": {
      "actor": "APT29"
    }
  }
}
typescript
// 生成Navigator图层JSON
{
  "name": "generate_navigator_layer",
  "arguments": {
    "name": "Current Coverage",
    "description": "Detection coverage as of 2024-01",
    "filter": {
      "source": "sigma",
      "tactic": "defense-evasion",
      "min_severity": "medium"
    },
    "color_by": "coverage"  // coverage, severity, source
  }
}

// 导出到文件(仅本地版支持)
{
  "name": "export_navigator_layer",
  "arguments": {
    "output_path": "./coverage-layer.json",
    "filter": {
      "actor": "APT29"
    }
  }
}

Common Patterns

常见使用场景

Ransomware Readiness Assessment

勒索软件就绪评估

Use the built-in prompt:
Use the ransomware-readiness-assessment prompt to evaluate our coverage
Or manually:
typescript
// 1. Identify gaps
{
  "name": "identify_gaps",
  "arguments": {
    "threat_profile": "ransomware"
  }
}

// 2. Get detections for weak areas
{
  "name": "list_by_mitre",
  "arguments": {
    "technique_id": "T1486"  // Data Encrypted for Impact
  }
}

// 3. Generate coverage layer
{
  "name": "generate_navigator_layer",
  "arguments": {
    "name": "Ransomware Coverage",
    "filter": {
      "threat_profile": "ransomware"
    }
  }
}
使用内置提示词:
使用ransomware-readiness-assessment提示词评估我们的覆盖情况
或手动执行:
typescript
// 1. 识别检测缺口
{
  "name": "identify_gaps",
  "arguments": {
    "threat_profile": "ransomware"
  }
}

// 2. 获取薄弱环节的检测规则
{
  "name": "list_by_mitre",
  "arguments": {
    "technique_id": "T1486"  // Data Encrypted for Impact
  }
}

// 3. 生成覆盖图层
{
  "name": "generate_navigator_layer",
  "arguments": {
    "name": "Ransomware Coverage",
    "filter": {
      "threat_profile": "ransomware"
    }
  }
}

APT Threat Emulation

APT威胁仿真

typescript
// 1. Analyze actor coverage
{
  "name": "analyze_actor_coverage",
  "arguments": {
    "actor": "APT29"
  }
}

// 2. Get techniques used by actor
{
  "name": "get_actor_techniques",
  "arguments": {
    "actor": "APT29"
  }
}

// 3. Find detections for each technique
{
  "name": "list_by_mitre",
  "arguments": {
    "technique_id": "T1059.001"
  }
}

// 4. Compare with other actors
{
  "name": "compare_actor_coverage",
  "arguments": {
    "actors": ["APT29", "APT28"]
  }
}
typescript
// 1. 分析actor覆盖情况
{
  "name": "analyze_actor_coverage",
  "arguments": {
    "actor": "APT29"
  }
}

// 2. 获取actor使用的技术
{
  "name": "get_actor_techniques",
  "arguments": {
    "actor": "APT29"
  }
}

// 3. 查找每个技术对应的检测规则
{
  "name": "list_by_mitre",
  "arguments": {
    "technique_id": "T1059.001"
  }
}

// 4. 与其他actor对比
{
  "name": "compare_actor_coverage",
  "arguments": {
    "actors": ["APT29", "APT28"]
  }
}

Detection Gap Analysis

检测缺口分析

typescript
// 1. Get coverage summary
{
  "name": "get_coverage_summary",
  "arguments": {}
}

// 2. Analyze coverage by tactic
{
  "name": "analyze_coverage",
  "arguments": {}
}

// 3. Identify specific gaps
{
  "name": "identify_gaps",
  "arguments": {
    "threat_profile": "apt"
  }
}

// 4. Get suggestions for weak techniques
{
  "name": "suggest_detections",
  "arguments": {
    "technique_id": "T1078"  // Valid Accounts
  }
}
typescript
// 1. 获取覆盖汇总
{
  "name": "get_coverage_summary",
  "arguments": {}
}

// 2. 按战术分析覆盖情况
{
  "name": "analyze_coverage",
  "arguments": {}
}

// 3. 识别特定缺口
{
  "name": "identify_gaps",
  "arguments": {
    "threat_profile": "apt"
  }
}

// 4. 获取薄弱技术的检测建议
{
  "name": "suggest_detections",
  "arguments": {
    "technique_id": "T1078"  // Valid Accounts
  }
}

Building Detection Content

构建检测内容

typescript
// 1. Search existing detections for pattern
{
  "name": "search",
  "arguments": {
    "query": "lateral movement SMB",
    "limit": 10
  }
}

// 2. Analyze procedure coverage
{
  "name": "analyze_procedure_coverage",
  "arguments": {
    "technique_id": "T1021.002"  // SMB/Windows Admin Shares
  }
}

// 3. Get detection template
{
  "name": "generate_detection_template",
  "arguments": {
    "technique_id": "T1021.002",
    "format": "sigma"
  }
}

// 4. Validate against existing detections
{
  "name": "list_by_mitre",
  "arguments": {
    "technique_id": "T1021.002"
  }
}
typescript
// 1. 搜索现有检测规则中的模式
{
  "name": "search",
  "arguments": {
    "query": "lateral movement SMB",
    "limit": 10
  }
}

// 2. 分析流程覆盖情况
{
  "name": "analyze_procedure_coverage",
  "arguments": {
    "technique_id": "T1021.002"  // SMB/Windows Admin Shares
  }
}

// 3. 获取检测模板
{
  "name": "generate_detection_template",
  "arguments": {
    "technique_id": "T1021.002",
    "format": "sigma"
  }
}

// 4. 与现有检测规则对比验证
{
  "name": "list_by_mitre",
  "arguments": {
    "technique_id": "T1021.002"
  }
}

Cross-Platform Detection Comparison

跨平台检测对比

typescript
// Compare Sigma vs Splunk for technique
// 1. Get Sigma detections
{
  "name": "list_by_mitre",
  "arguments": {
    "technique_id": "T1003.001"
  }
}

// Filter results by source_type: "sigma"

// 2. Get Splunk detections
{
  "name": "list_by_source",
  "arguments": {
    "source_type": "splunk_escu"
  }
}

// Filter by same technique

// 3. Compare coverage
{
  "name": "analyze_coverage",
  "arguments": {
    "source_type": "sigma"
  }
}

{
  "name": "analyze_coverage",
  "arguments": {
    "source_type": "splunk_escu"
  }
}
typescript
// 对比Sigma与Splunk针对某技术的检测规则
// 1. 获取Sigma检测规则
{
  "name": "list_by_mitre",
  "arguments": {
    "technique_id": "T1003.001"
  }
}

// 按source_type: "sigma"过滤结果

// 2. 获取Splunk检测规则
{
  "name": "list_by_source",
  "arguments": {
    "source_type": "splunk_escu"
  }
}

// 按同一技术过滤

// 3. 对比覆盖情况
{
  "name": "analyze_coverage",
  "arguments": {
    "source_type": "sigma"
  }
}

{
  "name": "analyze_coverage",
  "arguments": {
    "source_type": "splunk_escu"
  }
}

Configuration Reference

配置参考

Environment Variables

环境变量

VariableDescriptionExample
SIGMA_PATHS
Comma-separated Sigma rule directories
/path/to/sigma/rules,/path/to/sigma/rules-threat-hunting
SPLUNK_PATHS
Splunk ESCU detection directories
/path/to/security_content/detections
STORY_PATHS
Splunk analytic story directories (optional)
/path/to/security_content/stories
ELASTIC_PATHS
Elastic detection rule directories
/path/to/detection-rules/rules
KQL_PATHS
KQL hunting query directories (comma-separated)
/path/to/kql-bertjanp,/path/to/kql-jkerai1
SUBLIME_PATHS
Sublime Security rule directories
/path/to/sublime-rules/detection-rules
CQL_HUB_PATHS
CQL Hub (CrowdStrike) query directories
/path/to/cql-hub/queries
ATTACK_STIX_PATH
Path to
enterprise-attack.json
STIX bundle
/path/to/enterprise-attack.json
变量名描述示例
SIGMA_PATHS
逗号分隔的Sigma规则目录
/path/to/sigma/rules,/path/to/sigma/rules-threat-hunting
SPLUNK_PATHS
Splunk ESCU检测规则目录
/path/to/security_content/detections
STORY_PATHS
Splunk分析场景目录(可选)
/path/to/security_content/stories
ELASTIC_PATHS
Elastic检测规则目录
/path/to/detection-rules/rules
KQL_PATHS
逗号分隔的KQL狩猎查询目录
/path/to/kql-bertjanp,/path/to/kql-jkerai1
SUBLIME_PATHS
Sublime Security规则目录
/path/to/sublime-rules/detection-rules
CQL_HUB_PATHS
CQL Hub(CrowdStrike)查询目录
/path/to/cql-hub/queries
ATTACK_STIX_PATH
enterprise-attack.json
STIX数据包路径
/path/to/enterprise-attack.json

Source Type Values

源类型取值

  • sigma
    - Sigma rules (YAML)
  • splunk_escu
    - Splunk Enterprise Security Content Update
  • elastic
    - Elastic Security detection rules
  • kql
    - Kusto Query Language hunting queries
  • sublime
    - Sublime Security detection rules
  • crowdstrike_cql
    - CrowdStrike Query Language (CQL)
  • sigma
    - Sigma规则(YAML格式)
  • splunk_escu
    - Splunk Enterprise Security Content Update
  • elastic
    - Elastic Security检测规则
  • kql
    - Kusto Query Language狩猎查询
  • sublime
    - Sublime Security检测规则
  • crowdstrike_cql
    - CrowdStrike Query Language (CQL)

Tactic Values (MITRE ATT&CK)

MITRE ATT&CK战术取值

  • reconnaissance
  • resource-development
  • initial-access
  • execution
  • persistence
  • privilege-escalation
  • defense-evasion
  • credential-access
  • discovery
  • lateral-movement
  • collection
  • command-and-control
  • exfiltration
  • impact
  • reconnaissance
  • resource-development
  • initial-access
  • execution
  • persistence
  • privilege-escalation
  • defense-evasion
  • credential-access
  • discovery
  • lateral-movement
  • collection
  • command-and-control
  • exfiltration
  • impact

Troubleshooting

故障排除

MCP Server Not Indexing Rules

MCP服务器未索引规则

Problem:
get_stats
shows 0 detections
Solution:
  1. Verify paths exist:
    ls -la /path/to/sigma/rules
  2. Check environment variables are set correctly in MCP config
  3. Rebuild index manually:
    typescript
    {
      "name": "rebuild_index",
      "arguments": {}
    }
  4. Check MCP server logs in Claude Desktop:
    ~/Library/Logs/Claude/mcp*.log
问题:
get_stats
显示0条检测规则
解决方案:
  1. 验证路径存在:
    ls -la /path/to/sigma/rules
  2. 检查MCP配置中的环境变量是否设置正确
  3. 手动重建索引:
    typescript
    {
      "name": "rebuild_index",
      "arguments": {}
    }
  4. 查看Claude Desktop中的MCP服务器日志:
    ~/Library/Logs/Claude/mcp*.log

Permission Denied Errors

权限拒绝错误

Problem: Cannot read detection files
Solution:
bash
undefined
问题: 无法读取检测文件
解决方案:
bash
undefined

Fix permissions on detection directories

修复检测目录权限

chmod -R 755 ~/detections
undefined
chmod -R 755 ~/detections
undefined

Hosted MCP 401 Unauthorized

托管MCP返回401未授权

Problem: Token authentication failing
Solution:
  1. Verify token starts with
    sdmcp_
  2. Check token is not expired at detect.michaelhaag.org/account/tokens
  3. Ensure
    Authorization: Bearer
    header format is correct
  4. Free tier rate limit: 200 calls/day
问题: 令牌认证失败
解决方案:
  1. 验证令牌以
    sdmcp_
    开头
  2. detect.michaelhaag.org/account/tokens检查令牌是否过期
  3. 确保
    Authorization: Bearer
    头格式正确
  4. 免费版限制:每日200次调用

Missing MITRE ATT&CK Data

缺少MITRE ATT&CK数据

Problem: Actor/technique queries return empty
Solution:
  1. Download STIX bundle:
    bash
    curl -o ~/detections/enterprise-attack.json \
      https://raw.githubusercontent.com/mitre/cti/master/enterprise-attack/enterprise-attack.json
  2. Set
    ATTACK_STIX_PATH
    environment variable
  3. Rebuild index
问题: Actor/技术查询返回空结果
解决方案:
  1. 下载STIX数据包:
    bash
    curl -o ~/detections/enterprise-attack.json \
      https://raw.githubusercontent.com/mitre/cti/master/enterprise-attack/enterprise-attack.json
  2. 设置
    ATTACK_STIX_PATH
    环境变量
  3. 重建索引

Sigma Rules Not Parsing

Sigma规则解析失败

Problem: Some Sigma rules show errors
Solution:
  • Ensure you're using the official SigmaHQ repo
  • Update to latest rules:
    cd sigma && git pull
  • Some experimental rules may have schema issues - this is expected
  • Check parsing errors in MCP logs
问题: 部分Sigma规则显示错误
解决方案:
  • 确保使用官方SigmaHQ仓库
  • 更新到最新规则:
    cd sigma && git pull
  • 部分实验性规则可能存在 schema 问题,属于正常现象
  • 在MCP日志中查看解析错误

Slow Initial Index Build

初始索引构建缓慢

Problem: First startup takes 30+ seconds
Solution:
  • Expected behavior with 8,200+ detections
  • Subsequent startups use cached index (~2 seconds)
  • Use hosted MCP for zero startup time
  • Reduce
    PATHS
    to only needed sources
问题: 首次启动耗时30秒以上
解决方案:
  • 8200+条检测规则的正常现象
  • 后续启动将使用缓存索引(约2秒)
  • 使用托管MCP实现零启动时间
  • 仅保留需要的源以减少
    PATHS
    数量

Advanced Usage

高级用法

Custom Detection Repositories

自定义检测仓库

Add your private detections:
json
{
  "env": {
    "SIGMA_PATHS": "/path/to/sigma/rules,/path/to/my-custom-sigma",
    "SPLUNK_PATHS": "/path/to/security_content/detections,/path/to/internal-splunk"
  }
}
添加私有检测规则:
json
{
  "env": {
    "SIGMA_PATHS": "/path/to/sigma/rules,/path/to/my-custom-sigma",
    "SPLUNK_PATHS": "/path/to/security_content/detections,/path/to/internal-splunk"
  }
}

Autonomous Detection Pipeline

自动化检测流水线

Enable autonomous CTI → detection generation:
typescript
// Configure autonomous settings (local only)
{
  "name": "configure_autonomous",
  "arguments": {
    "enabled": true,
    "cti_sources": ["misp", "otx"],
    "auto_pr": false  // Manual review before PR
  }
}

// Trigger gap analysis
{
  "name": "run_autonomous_analysis",
  "arguments": {
    "threat_actor": "APT29"
  }
}
See Autonomous docs for full pipeline details.
启用从CTI到检测规则生成的自动化流程:
typescript
// 配置自动化设置(仅本地版支持)
{
  "name": "configure_autonomous",
  "arguments": {
    "enabled": true,
    "cti_sources": ["misp", "otx"],
    "auto_pr": false  // PR生成前需人工审核
  }
}

// 触发缺口分析
{
  "name": "run_autonomous_analysis",
  "arguments": {
    "threat_actor": "APT29"
  }
}
完整流水线详情请查看自动化文档

Exporting for SIEM

导出到SIEM

typescript
// Export detections in native format
{
  "name": "export_detections",
  "arguments": {
    "technique_id": "T1055",
    "format": "sigma",  // or splunk, elastic, kql
    "output_path": "./exports/process_injection.yml"
  }
}
typescript
// 以原生格式导出检测规则
{
  "name": "export_detections",
  "arguments": {
    "technique_id": "T1055",
    "format": "sigma",  // 或splunk, elastic, kql
    "output_path": "./exports/process_injection.yml"
  }
}

Expert Prompts

专家提示词

Built-in workflows accessible by name:
  • ransomware-readiness-assessment
    - Full kill-chain coverage analysis
  • apt-threat-emulation
    - Actor-specific detection mapping
  • purple-team-exercise
    - Combined offensive/defensive planning
  • executive-briefing
    - High-level coverage summary
  • detection-sprint-planning
    - Engineering backlog prioritization
  • insider-threat-detection
    - Privilege abuse coverage
  • cloud-security-assessment
    - Cloud-specific technique coverage
  • supply-chain-security
    - Third-party risk detection
  • data-exfiltration-defense
    - Exfiltration technique coverage
  • initial-access-hardening
    - Entry point detection review
  • credential-theft-protection
    - Credential access coverage
Usage:
Use the ransomware-readiness-assessment prompt
可通过名称调用内置工作流:
  • ransomware-readiness-assessment
    - 完整杀伤链覆盖分析
  • apt-threat-emulation
    - 特定Actor检测映射
  • purple-team-exercise
    - 攻防结合规划
  • executive-briefing
    - 高层覆盖汇总
  • detection-sprint-planning
    - 工程待办事项优先级排序
  • insider-threat-detection
    - 权限滥用覆盖分析
  • cloud-security-assessment
    - 云特定技术覆盖分析
  • supply-chain-security
    - 第三方风险检测
  • data-exfiltration-defense
    - 数据泄露技术覆盖分析
  • initial-access-hardening
    - 入口点检测审查
  • credential-theft-protection
    - 凭证窃取覆盖分析
用法示例:
使用ransomware-readiness-assessment提示词

Resources

相关资源