COMPLETE GUIDEOPEN SOURCE

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.

Key features

6 essential capabilities

Incident Management

Complete centralization of security incidents with tracking, timeline and attribution

Cases management
Timeline tracking
IOCs correlation
Evidence collection
Response time-40%

Team Collaboration

Real-time collaborative work with assignment, comments and notifications

Multi-user support
Task assignment
Real-time updates
Comment threads
Productivity+60%

Automation

Automated workflows, Cortex responders and advanced orchestration

Cortex responders
Custom workflows
Auto-enrichment
Playbooks
Auto tasks75%

Integrations

Native connection with Cortex, MISP, SIEM and 100+ security tools

MISP sync
Cortex analyzers
SIEM integration
Custom APIs
Connectors100+

Real-time Alerts

Instant notification via email, webhooks, Slack and custom systems

Email alerts
Webhooks
Slack integration
Custom notifications
Reactivity<1min

Reporting

Automatic report generation, metrics and customizable dashboards

Custom templates
Metrics dashboard
Export formats
KPI tracking
FormatsPDF/JSON/CSV
Technical architecture

Architecture components

TheHive

Main incident management web application

Play Framework (Scala)
REST API
WebSocket
Elastic backend
9000 (HTTP)

Cortex

Observable analysis and enrichment engine

Analyzers (120+)
Responders (50+)
Python/Docker
API-driven
9001 (HTTP)

Elasticsearch

NoSQL database for storage and search

Index management
Full-text search
Clustering
Backup support
9200 (HTTP)9300 (Transport)

Cassandra (opt)

Distributed database alternative to Elasticsearch

Distributed DB
High availability
Scalability
Replication
9042 (CQL)
Installation

3 installation methods

Docker Compose

RECOMMENDED
📊 Easy⏱️ 15 min
1

Clone the repository

git clone https://github.com/StrangeBee/docker.git thehive-docker
2

Configuration

cd thehive-docker/testing
3

Environment variables

cat README.md  # Follow the documented initialization (secrets, certificates)
4

Startup

docker compose up -d
5

Verification

docker compose ps

Installation DEB/RPM

📊 Intermediate⏱️ 30 min
1

Add the repository

curl -fsSL https://archives.strangebee.com/keys/strangebee.gpg | sudo gpg --dearmor -o /usr/share/keyrings/strangebee.gpg
2

Java installation

sudo apt install openjdk-11-jre-headless
3

Elasticsearch installation

sudo apt install cassandra elasticsearch
4

TheHive installation

sudo apt install thehive
5

Configuration

sudo nano /etc/thehive/application.conf

Kubernetes

📊 Advanced⏱️ 1-2h
1

Helm repository

helm repo add strangebee https://helm.strangebee.com
2

Custom values

helm show values strangebee/thehive > values.yaml
3

Configuration

nano values.yaml  # Customize
4

Deployment

helm install thehive strangebee/thehive -f values.yaml
5

Verification

kubectl get pods -n thehive
Connectors

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
        }
      }
    }
  }]
}

Email

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
    }
  }]
}
REST API

API usage examples

Automate your workflows with TheHive's complete REST API

API Authentication

bash

Get 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

python

Creating 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

python

Adding 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

javascript

Adding 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

python

Advanced 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

bash

Trigger 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"
Best practices

TheHive best practices

📋 Organization

Consistent taxonomy

Define and apply standardized classification

TLP & PAP standards
Hierarchical tags
Custom business fields
Reusable templates

Case templates

Create templates for each type of incident

Phishing template
Malware analysis
Data breach
DDoS response

Severity matrix

Clear and documented severity matrix

1: Low - Info only
2: Medium - Investigation
3: High - Immediate action
4: Critical - Emergency

👥 Collaboration

Clear assignment

Responsibilities defined for each task

1 owner per case
Assigned tasks
Escalation process
Backup analysts

Continuous documentation

Document all actions and decisions

Detailed task logs
Attached screenshots
Precise timeline
Lessons learned

Communication

Notify and share information

Configured notifications
Regular status updates
Stakeholder communications
Post-incident reports

⚙️ Automation

Automated workflows

Automate repetitive tasks

Auto-enrichment IOCs
Response playbooks
Status transitions
Notification triggers

Cortex responders

Automatic response actions

Block IP at firewall
Quarantine email
Disable account
Create SIEM alert

API integrations

Connect with the security ecosystem

Bidirectional SIEM
Ticketing system
Asset management
Threat intel feeds
Use cases

Usage scenarios

SOC Operations

Daily management of alerts and incidents

Scenarios:

Alert triageIncident responseThreat huntingIOC management

Benefits:

Centralization
Collaboration
SOC metrics

CERT/CSIRT

Coordination of major incidents

Scenarios:

Crisis managementMulti-team coordinationExecutive reportingPost-mortem analysis

Benefits:

Precise timeline
Communication
Evidence tracking

Threat Intelligence

CTI analysis and sharing

Scenarios:

IOC correlationMISP integrationCampaign trackingAttribution analysis

Benefits:

MISP sync
IOC enrichment
Knowledge base

Forensics

In-depth forensic investigation

Scenarios:

Evidence collectionChain of custodyTimeline reconstructionLegal reporting

Benefits:

Documentation
Audit trail
Export formats
Resources

Additional resources

Ready to deploy TheHive?

Get started now with Docker Compose and transform your security incident management

CyberXTEL
100% Free

Ready to put it into practice?

CyberXTEL is our free platform to train hands-on: certifications, CTFs and a dedicated cyber awareness space.

Discover CyberXTEL