编程

Soc Deploy Thehive

试用

Deploy TheHive 5 + Cortex 3 incident response platform on any Docker-ready Linux host. Automates account creation, API key generation, Cortex CSRF handling,...

它能做什么

Deploy TheHive + Cortex incident response platform on any Docker-ready Linux host.

技能文档

SOC Deploy: TheHive 5.4 + Cortex 3.1.8

Deploy TheHive + Cortex incident response platform on any Docker-ready Linux host.

This skill does NOT create VMs. It expects an SSH target with Docker installed. Use hyperv-create-vm or proxmox-create-vm first if you need infrastructure.

When to Use

  • "deploy thehive"
  • "set up thehive"
  • "install thehive and cortex"
  • "thehive lab"
  • "incident response platform"

User Inputs

ParameterDefaultRequired
SSH target-Yes (user@host)
Admin passwordChangeMe123!No
Org name (Cortex)SOCNo
TheHive secret(generated 40-char)No

Prerequisites Check

# SSH works
ssh  "echo OK"

# Docker + Compose v2
ssh  "docker --version && docker compose version"

# RAM check (need 4GB+ free)
ssh  "free -h | grep Mem"

Execution

Single command deployment

scp scripts/setup.sh :~/
scp references/docker-compose.yml :~/thehive-cortex/docker-compose.yml
ssh  "bash ~/setup.sh '' ''"

What setup.sh does (from thehive-cortex-setup-guide.md)

  1. Create directory + write docker-compose.yml
  2. docker compose up -d (Cassandra + ES + TheHive + Cortex)
  3. Poll health endpoints until all services respond:
    • GET :9200/_cluster/health (Elasticsearch)
    • GET :9000/api/status (TheHive)
    • GET :9001/api/status (Cortex)
  4. TheHive admin setup:
    • POST /api/v1/login with admin@thehive.local / secret
    • POST /api/v1/user/admin@thehive.local/password/change (NOT PATCH)
    • POST /api/v1/user/admin@thehive.local/key/renew -> API key
  5. Cortex setup (CSRF dance):
    • POST /api/maintenance/migrate
    • POST /api/user (create superadmin, first-user endpoint)
    • POST /api/login -> session cookie
    • GET /api/user/admin -> capture CORTEX-XSRF-TOKEN cookie
    • POST /api/organization (with CSRF cookie + header)
    • POST /api/user (org admin, with CSRF)
    • POST /api/user//key/renew (with CSRF) -> org key
    • POST /api/user/admin/key/renew (with CSRF) -> super key
  6. Wire integration:
    • Update docker-compose.yml: add --cortex-hostnames cortex --cortex-keys
    • docker compose up -d thehive (restart only TheHive)
    • Wait 30s for TheHive startup
  7. Verify both APIs respond with Bearer keys
  8. Write credentials to ~/thehive-cortex/api-keys.txt

Output to User

TheHive + Cortex deployed!

TheHive: http://:9000
Cortex:  http://:9001

Credentials:
  TheHive admin:     admin@thehive.local / 
  Cortex superadmin: admin / 
  Cortex org admin:  -admin (API key only)

API Keys:
  TheHive:           
  Cortex superadmin: 
  Cortex org admin:  

MCP Connection:
  THEHIVE_URL=http://:9000
  THEHIVE_API_KEY=
  CORTEX_URL=http://:9001
  CORTEX_API_KEY=

Keys saved to: ~/thehive-cortex/api-keys.txt

Critical Gotchas

See references/gotchas.md for full details:

  1. Cortex CSRF (biggest automation blocker): Cookie CORTEX-XSRF-TOKEN + header X-CORTEX-XSRF-TOKEN on ALL mutating requests. Standard Play Framework bypass headers do NOT work. After first API key, use Authorization: Bearer to skip CSRF
  2. TheHive password endpoint: POST /password/change with currentPassword+password. The PATCH endpoint returns 204 but silently ignores the password field
  3. Bash ! in passwords: Use printf '...' | curl -d @-, not direct -d with exclamation marks
  4. First-user one-shot: Cortex POST /api/user without auth only works when zero users exist
  5. TheHive startup delay: 15-30s after compose up (waits for Cassandra)
  6. Secret length: TheHive Play Framework JWT needs 32+ char secret
  7. Use org admin key (not superadmin) for TheHive-Cortex integration (least privilege)

API Quick Reference

See references/api-reference.md for the full endpoint list.

Timeout Strategy

Setup takes ~5-7 min (mostly waiting for services). If docker images are not cached, add ~5 min for pull. Split into:

  • Turn 1: docker compose up -d + pull images (~5 min)
  • Turn 2: Account setup + API keys (~3 min)

Pairs With

  • hyperv-create-vm - create a Hyper-V VM, then deploy TheHive on it
  • proxmox-create-vm - create a Proxmox LXC/VM, then deploy TheHive on it
  • soc-deploy-misp - deploy MISP alongside for threat intelligence

相关技能

把自然语言描述转为结构化 JSON,并由 mcp-diagram-generator MCP 服务生成 Draw.io、Mermaid 或 Excalidraw 图表文件。

作者 nssa.io1.0k 次安装47 星标

从 AdMapix API 拉取广告创意、应用、榜单和收入预估等数据,原样返回结构化 JSON。

作者 fly0pants

在本地磁盘以分类纯 Markdown 文件保存需要长期留存的事实,与智能体内置记忆并存。

作者 Iván1 次安装

以 AI 机器人身份加入视频会议,提供语音、虚拟形象与屏幕共享四种模式。

作者 johnpatternai21 次安装8 星标

按用户明确指令,在得到大脑(Get笔记)中保存、搜索并管理笔记与知识库。

作者 iswalle763 次安装66 星标

通过托管 OAuth 访问 Microsoft Graph Excel 接口,读写 OneDrive 中的工作簿、工作表、区域、表格与图表。

作者 byungkyu800 次安装42 星标

solomonneas 的更多技能

浏览全部技能

Essential penetration testing command reference. Quick lookup for nmap, Metasploit, hydra, john, nikto, gobuster, and other offensive security tools. Covers...

作者 Solomon Neas65 次安装1 星标

Memory forensics with Volatility and related tools. Acquire RAM dumps, extract processes and DLLs, investigate rootkits and fileless malware, recover credent...

作者 solomonneas30 次安装1 星标

This skill should be used when the user asks to "run pentest commands", "scan with nmap", "use metasploit exploits", "crack passwords with hydra or john", "s...

作者 solomonneas36 次安装

Expert malware analysis for defensive security research. Static and dynamic analysis, sandbox triage, IOC extraction, unpacking, and malware family identific...

作者 solomonneas31 次安装

Knowledge card memory system with semantic search. Agents wake up fresh each session but remember everything through atomic ~350-token cards with YAML frontm...

作者 solomonneas28 次安装

Network traffic analysis with Wireshark and tshark. Capture packets, write display and BPF filters, follow TCP/UDP/TLS streams, detect C2 beacons, troublesho...

作者 solomonneas27 次安装