Master TheHive
The reference platform for security incident management, SOC collaboration and automation of threat response
What is TheHive?
TheHive is a Security Incident Response Platform (SIRP)designed to centralize, orchestrate and automate security incident management. Developed by StrangeBee, it has become the reference solution for SOCs, CERTs and cybersecurity teams worldwide.
With over 10,000 organizations using it and an active community, TheHive excels in real-time collaboration, automation via Cortex, and integration with MISP for complete incident lifecycle management.
6 essential capabilities
Incident Management
Complete centralization of security incidents with tracking, timeline and attribution
Team Collaboration
Real-time collaborative work with assignment, comments and notifications
Automation
Automated workflows, Cortex responders and advanced orchestration
Integrations
Native connection with Cortex, MISP, SIEM and 100+ security tools
Real-time Alerts
Instant notification via email, webhooks, Slack and custom systems
Reporting
Automatic report generation, metrics and customizable dashboards
Architecture components
TheHive
Main incident management web application
9000 (HTTP)Cortex
Observable analysis and enrichment engine
9001 (HTTP)Elasticsearch
NoSQL database for storage and search
9200 (HTTP)9300 (Transport)Cassandra (opt)
Distributed database alternative to Elasticsearch
9042 (CQL)3 installation methods
Docker Compose
RECOMMENDEDClone the repository
git clone https://github.com/StrangeBee/docker.git thehive-docker
Configuration
cd thehive-docker/testing
Environment variables
cat README.md # Follow the documented initialization (secrets, certificates)
Startup
docker compose up -d
Verification
docker compose ps
Installation DEB/RPM
Add the repository
curl -fsSL https://archives.strangebee.com/keys/strangebee.gpg | sudo gpg --dearmor -o /usr/share/keyrings/strangebee.gpg
Java installation
sudo apt install openjdk-11-jre-headless
Elasticsearch installation
sudo apt install cassandra elasticsearch
TheHive installation
sudo apt install thehive
Configuration
sudo nano /etc/thehive/application.conf
Kubernetes
Helm repository
helm repo add strangebee https://helm.strangebee.com
Custom values
helm show values strangebee/thehive > values.yaml
Configuration
nano values.yaml # Customize
Deployment
helm install thehive strangebee/thehive -f values.yaml
Verification
kubectl get pods -n thehive
Available integrations
Connect TheHive to your security ecosystem
Cortex
Powerful analysis and enrichment engine
Analyzers
120+ analyzers (VirusTotal, MISP, Shodan, etc.)
Responders
50+ responders (block IP, send email, create ticket)
Observable enrichment
Automatic IOC enrichment
Custom jobs
Creation of custom jobs
Configuration
cortex {
servers = [{
name = "local"
url = "http://cortex:9001"
auth {
type = "bearer"
key = "YOUR_API_KEY"
}
}]
}MISP
Threat Intelligence sharing platform
Event import
Automatic import of MISP events
IOC sync
Two-way IOC synchronization
Taxonomies
Taxonomy and galaxy support
Auto-export
Automatic export to MISP
Configuration
misp {
servers = [{
name = "local-misp"
url = "https://misp.local"
auth {
type = "key"
key = "YOUR_MISP_KEY"
}
wsConfig {
ssl {
loose {
acceptAnyCertificate = true
}
}
}
}]
}Automatic email ingestion and parsing
IMAP/POP3
Connection to email servers
Auto-parsing
Automatic IOC extraction
Attachments
Attachment handling
Case creation
Automatic case creation
Configuration
email {
enabled = true
server = "imap.gmail.com"
port = 993
ssl = true
username = "alerts@company.com"
password = "YOUR_PASSWORD"
}SIEM/SOAR
Integration with SIEM and SOAR systems
REST API
Full API for integrations
Webhooks
Custom webhook notifications
Splunk
Splunk app available
ELK Stack
Native Elasticsearch integration
Configuration
webhook {
endpoints = [{
name = "soar-platform"
url = "https://soar.company.com/webhook"
version = 0
wsConfig {
ssl.loose.acceptAnyCertificate = true
}
}]
}API usage examples
Automate your workflows with TheHive's complete REST API
API Authentication
bashGet an API token for authentication
# Login and retrieve token # TheHive 5: generate an API key in the user profile, # then send it as a Bearer header on every request curl http://localhost:9000/api/v1/user/current \ -H "Authorization: Bearer YOUR_API_KEY"
Create a case
pythonCreating a new incident case
import requests
url = "http://localhost:9000/api/v1/case"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json"
}
data = {
"title": "Phishing Campaign Detected",
"description": "Multiple phishing emails detected targeting finance team",
"severity": 3, # 1=Low, 2=Medium, 3=High, 4=Critical
"tlp": 2, # 0=Clear, 1=Green, 2=Amber, 3=Amber+Strict, 4=Red
"pap": 2, # 0=White, 1=Green, 2=Amber, 3=Red
"tags": ["phishing", "email", "finance"]
}
response = requests.post(url, headers=headers, json=data)
print(response.json())Add observables
pythonAdding IOCs to an existing case
# Add observables (IOCs) to a case
case_id = "~123456"
url = f"http://localhost:9000/api/v1/case/{case_id}/observable"
observables = [
{
"dataType": "ip",
"data": "203.0.113.50",
"tlp": 2,
"ioc": True,
"tags": ["malicious", "c2"],
"message": "C2 server IP"
},
{
"dataType": "domain",
"data": "malicious.example",
"tlp": 2,
"ioc": True,
"tags": ["phishing"]
},
{
"dataType": "hash",
"data": "d41d8cd98f00b204e9800998ecf8427e",
"tlp": 2,
"ioc": True
}
]
for obs in observables:
response = requests.post(url, headers=headers, json=obs)
print(f"Observable created: {response.json()[0]['_id']}")Create a task
javascriptAdding a task to a case
const axios = require('axios');
const caseId = '~123456';
const url = `http://localhost:9000/api/v1/case/${caseId}/task`;
const task = {
title: "Analyze malware sample",
description: "Submit sample to sandbox and analyze behavior",
status: "Waiting",
flag: false,
startDate: Date.now(),
dueDate: Date.now() + (24 * 60 * 60 * 1000), // 24h
assignee: "analyst1@company.com"
};
axios.post(url, task, {
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => console.log('Task created:', response.data))
.catch(error => console.error('Error:', error));Search cases
pythonAdvanced search with filters and pagination
# Case search with filters
url = "http://localhost:9000/api/v1/query"
query = {
"query": [
{
"_name": "listCase"
},
{
"_name": "filter",
"_and": [
{"_eq": {"_field": "severity", "_value": 3}},
{"_eq": {"_field": "stage", "_value": "InProgress"}},
{"_eq": {"_field": "tags", "_value": "phishing"}}
]
},
{
"_name": "sort",
"_fields": [
{
"startDate": "desc"
}
]
},
{
"_name": "page",
"from": 0,
"to": 10
}
]
}
response = requests.post(url, headers=headers, json=query)
cases = response.json()
for case in cases:
print(f"Case: {case['title']} - Severity: {case['severity']}")Launch a Cortex analysis
bashTrigger an analysis on an observable
# Analyze an observable with Cortex
OBSERVABLE_ID="~789012"
ANALYZER_ID="VirusTotal_GetReport_3_0"
curl -X POST http://localhost:9000/api/connector/cortex/job \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"cortexId": "local-cortex",
"artifactId": "'$OBSERVABLE_ID'",
"analyzerId": "'$ANALYZER_ID'"
}'
# Check the result
JOB_ID="returned_job_id"
curl -X GET http://localhost:9000/api/connector/cortex/job/$JOB_ID \
-H "Authorization: Bearer YOUR_API_TOKEN"TheHive best practices
📋 Organization
Consistent taxonomy
Define and apply standardized classification
Case templates
Create templates for each type of incident
Severity matrix
Clear and documented severity matrix
👥 Collaboration
Clear assignment
Responsibilities defined for each task
Continuous documentation
Document all actions and decisions
Communication
Notify and share information
⚙️ Automation
Automated workflows
Automate repetitive tasks
Cortex responders
Automatic response actions
API integrations
Connect with the security ecosystem
Usage scenarios
SOC Operations
Daily management of alerts and incidents
Scenarios:
Benefits:
CERT/CSIRT
Coordination of major incidents
Scenarios:
Benefits:
Threat Intelligence
CTI analysis and sharing
Scenarios:
Benefits:
Forensics
In-depth forensic investigation
Scenarios:
Benefits:
Additional resources
Ready to deploy TheHive?
Get started now with Docker Compose and transform your security incident management

Ready to put it into practice?
CyberXTEL is our free platform to train hands-on: certifications, CTFs and a dedicated cyber awareness space.