Building IOC Enrichment Pipeline with OpenCTI

OpenCTI is an open-source platform for managing cyber threat intelligence knowledge, built on STIX 2.1 as its

What Is This

The "Building IOC Enrichment Pipeline with OpenCTI" skill focuses on designing and implementing an automated enrichment pipeline for Indicators of Compromise (IOCs) using OpenCTI. OpenCTI (Open Cyber Threat Intelligence) is an open-source platform for managing, structuring, and sharing cyber threat intelligence, built on the STIX 2.1 data model. This skill is highly relevant for cybersecurity professionals seeking to enhance their threat intelligence workflows by automatically enriching IOCs with valuable contextual data from external sources such as VirusTotal, Shodan, AbuseIPDB, GreyNoise, and others. The enrichment pipeline leverages OpenCTI’s modular connector ecosystem to collect, correlate, and score indicators, enabling effective prioritization and response.

Why Use It

Automated IOC enrichment is critical in modern threat intelligence operations for several reasons:

  • Contextualization: Raw IOCs such as IP addresses, hashes, or domains provide limited value without additional context like malware associations, threat actors, or campaign links. Enrichment adds this context, making IOCs actionable.
  • Efficiency: Manual enrichment is time-consuming and error-prone. Automation ensures consistent, timely enrichment of new indicators as they are ingested.
  • Prioritization: Enriched IOCs can be scored based on reputation, frequency, and threat relevance, allowing analysts to focus on the most critical threats.
  • Correlation: By automatically linking IOCs to known threat actors, TTPs (Tactics, Techniques, and Procedures), and campaigns, organizations can build a comprehensive threat landscape view.
  • Compliance: Enriched intelligence supports requirements for threat detection and response as outlined in frameworks like NIST CSF.

This skill is particularly valuable for teams aiming to operationalize threat intelligence, improve detection fidelity, and streamline incident response.

How to Use It

Prerequisites

  • OpenCTI Platform: Deployed via Docker and Docker Compose for ease of maintenance and scalability.
  • Connectors: Pre-built or custom connectors for data sources (e.g., VirusTotal, Shodan, AbuseIPDB).
  • API Keys: Valid API keys for each enrichment service.
  • Basic Python Knowledge: For configuring and, if necessary, customizing connectors.

1. Deploy

OpenCTI

Deploy OpenCTI using Docker Compose. Example docker-compose.yml:

version: '3'
services:
  opencti:
    image: opencti/platform:latest
    environment:
      - NODE_OPTIONS=--max-old-space-size=4096
      - APP__ADMIN__EMAIL=admin@domain.com
      - APP__ADMIN__PASSWORD=ChangeThisPassword
    ports:
      - "8080:8080"
    depends_on:
      - elasticsearch
      - redis
      - rabbitmq
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:8.6.2
    environment:
      - discovery.type=single-node
    ports:
      - "9200:9200"
  redis:
    image: redis:7
    ports:
      - "6379:6379"
  rabbitmq:
    image: rabbitmq:3
    ports:
      - "5672:5672"

Bring up the stack:

docker-compose up -d

2. Configure

Connectors

Connectors are microservices that enable enrichment. Configure connectors by supplying API keys and relevant parameters. Example: VirusTotal connector configuration (config.yml):

opencti:
  base_url: http://opencti:8080
  token: 'Your-OpenCTI-API-Token'

connector:
  id: 'virustotal'
  type: 'EXTERNAL_IMPORT'
  name: 'VirusTotal'
  update_existing_data: true

virustotal:
  api_key: 'Your-VirusTotal-API-Key'
  interval: 60 # seconds

Start the connector as a service:

docker run -d \
  -e "CONNECTOR_CONF=config.yml" \
  -v /path/to/config.yml:/config.yml \
  opencti/connector-virustotal:latest

Repeat this process for other enrichment sources like Shodan, AbuseIPDB, and GreyNoise.

3. Pipeline

Automation

Once connectors are running, OpenCTI will automatically:

  • Ingest new IOCs (manually or via ingestion connectors)
  • Trigger enrichment workflows for each new IOC
  • Correlate enriched IOCs with known entities (threat actors, campaigns, TTPs)
  • Assign scores or tags for analyst prioritization

4. Analyst

Workflow

Analysts can view enriched IOCs in the OpenCTI UI, investigate correlations, export reports, or trigger alerts based on scoring and context.

When to Use It

  • When deploying or configuring an IOC enrichment pipeline in threat intelligence or SOC environments
  • When establishing security controls to meet compliance or regulatory requirements (e.g., NIST CSF)
  • When building or upgrading the security architecture to support automated CTI workflows
  • During security assessments or maturity evaluations that require automated enrichment and correlation of threat data

Important Notes

  • API Limits: Many enrichment sources (e.g., VirusTotal, Shodan) have API rate limits. Monitor usage to avoid throttling.
  • Data Privacy: Ensure handling of IOCs and enrichment data complies with data protection policies.
  • Connector Maintenance: Keep connectors up to date to support new features and security patches.
  • Scalability: For large-scale environments, monitor performance and consider scaling OpenCTI and connectors horizontally.
  • STIX 2.1 Compliance: OpenCTI natively uses the STIX 2.1 data model. Ensure any custom integrations or connectors maintain STIX compatibility for interoperability.
  • Customization: OpenCTI supports custom connectors. For bespoke enrichment sources, use the OpenCTI Python connector framework as a starting point.

By implementing this skill, organizations can significantly increase the value and operational utility of their threat intelligence, enabling faster, more informed security decisions. For more detailed configurations and code samples, refer to the source repository.