Skip to content

ThreatConnect Threat Intelligence Executor

Category: Threat Intelligence Script: threatconnect.py Integration: REST API (HMAC) Faraday Plugin: Raw JSON Website: https://threatconnect.com/threat-intelligence-platform/

Description

Imports indicators of compromise (IOCs) of one type from a ThreatConnect owner into Faraday. Each indicator becomes a vulnerability under a single threat-intelligence host.

Prerequisites

  • A ThreatConnect account with an API user. Create it under Account Settings > Memberships and save its access ID and secret key.
  • Read access to the owner (organization, community or source) that you want to import
  • Network access to your ThreatConnect instance

Configuration

Environment Variables (Setup)

Variable Required Description
TC_HOST Yes ThreatConnect API URL (default: https://api.threatconnect.com). Change it for a dedicated or on-premises instance.
TC_ACCESS_ID Yes API user access ID
TC_SECRET_KEY Yes API user secret key

These variables are also accepted as execution arguments, so a single run can override them.

Execution Arguments

Parameter Type Mandatory Description
TC_OWNER string Yes Name of the ThreatConnect owner whose indicators are imported (e.g., Common Community or your organization name)
TC_INDICATOR_TYPE string Yes Type of indicators to import: Address, EmailAddress, File, Host or URL

YAML Configuration Example

executors:
  threatconnect:
    repo_executor: threatconnect.py
    max_size: 65536
    varenvs:
      TC_HOST: "https://api.threatconnect.com"
      TC_ACCESS_ID: "<tc_access_id>"
      TC_SECRET_KEY: "<tc_secret_key>"
    params:
      TC_OWNER:
        mandatory: true
        type: string
        base: string
      TC_INDICATOR_TYPE:
        mandatory: true
        type: string
        base: string

How It Works

  1. Signs every request with HMAC-SHA256 using TC_ACCESS_ID and TC_SECRET_KEY
  2. Reads /api/v3/indicators with a TQL filter on TC_OWNER and TC_INDICATOR_TYPE, newest first, in pages of up to 500
  3. Creates one vulnerability per indicator, with its value, type, rating, confidence, tags and associated groups as description and references
  4. Maps severity from ThreatConnect's ThreatAssess score (800+ critical, 500+ high, 200+ medium, 50+ low, below 50 info), falling back to the 1-5 rating (5 critical down to 1 info). Inactive indicators are imported as info.

Notes

  • All indicators are placed under one host with IP 0.0.0.0 and hostname threatconnect, because IOCs are not tied to hosts.
  • All vulnerabilities have status open. The resolution is a blocking recommendation suited to the indicator type.
  • At most 10,000 indicators are imported per run.
  • Run the executor once per indicator type to import several types.
  • The run fails if TC_INDICATOR_TYPE is not one of the allowed values.
  • The shared agent parameters (AGENT_CONFIG_* tags and severity filters) are not applied by this executor.