TheHive responders and Cortex analyzers

Custom Cortex analyzers and responders turn TheHive into the place where an analyst runs enrichment and response in one click, without switching between consoles.

  • −50%console switching per case
  • 15+custom analyzers and responders
  • 1 clickfrom observable to action

01Framing the project

The SOC ran TheHive for case management and Cortex for analysis, but its most useful lookups and actions were not in the standard library: an internal CMDB, a regional threat feed, EDR actions. Analysts copied observables out of the case and pasted them into other consoles.

Objectives and success criteria

  • Let an analyst run enrichment and response without leaving the case.
  • Make every action appear in the case timeline.
  • Make a new integration a small, tested module.

Scope

In scope
  • Custom Cortex analyzers for the repeated lookups
  • Custom responders for blocking, isolating and ticketing
  • Automatic triggers from case templates
  • Packaging, tests and deployment of the components
Out of scope
  • Replacing TheHive
  • Changes to TheHive core
  • Detection content

02Starting point

Consoles opened to work one case
several, observables copied by hand
Time to the first action on a case
about 14 min
Custom analyzers and responders
a handful, undocumented
Tests for custom components
none

We spent a week watching analysts work cases and noted every lookup and action they repeated. That list became the backlog, ordered by how often each one occurred.

03Design and integration

  1. Phase 1

    Inventory the repeated work

    Observables of every type (IP, domain, hash, URL, user, host) and the actions analysts took on them, ranked by frequency.

  2. Phase 2

    Build the analyzers

    Python analyzers that return a short structured report and taxonomy tags, so results read at a glance and stay searchable.

  3. Phase 3

    Build the responders

    Responders for blocking an indicator, isolating a host and opening a ServiceNow ticket, under TheHive roles.

  4. Phase 4

    Automate the triggers

    Analyzers run when an observable is added. Responders chain from case templates and alerts.

  5. Phase 5

    Industrialize

    Components are versioned and tested, their secrets stay outside the code, and a pipeline deploys them.

04Difficulties we solved

Difficulty

Cortex jobs timed out when an external API was slow.

What we did

Results are cached, slow lookups return a pending status, and the analyzer reports partial results instead of failing.

Difficulty

Analyzers needed API keys that analysts should never see.

What we did

Secrets are injected at runtime from a secrets manager, one least-privilege credential per analyzer.

Difficulty

Upgrades of TheHive or Cortex could break custom components silently.

What we did

Versions are pinned and every component has contract tests that replay recorded API responses.

05Results

MeasureBeforeAfter
Console switching per casebaseline−50%
Time to the first action on a caseabout 14 minabout 5 min
Custom analyzers and responders in productiona handful15+
From observable to actioncopy, paste, switch1 click

Analysts stay in the case from alert to closure, and a new integration is now a small Python module with its own tests.

06Guardrails in production

  • Analyzers are read-only. Responders run under TheHive roles, so only the right people can trigger a block or an isolation.
  • Rate limits and caching protect the external APIs and their quotas.
  • Unit tests replay recorded API responses, so a component is checked without calling the live service.

07Stack

Case management
  • TheHive
  • Cortex
Language and delivery
  • Python
  • Git
  • GitHub Actions
  • GitLab CI
Integrations
  • MISP
  • OpenCTI
  • VirusTotal
  • Recorded Future
  • ServiceNow
  • Jira
  • EDR APIs

Related use cases

Want this result on your stack?

Book a call and leave with where I would start.