OpenCTI integration with SIEM (Splunk)

OpenCTI integration with Splunk

Using OpenCTI Add-on for Splunk

OpenCTI Add-on for Splunk enables Splunk users to interconnect Splunk With OpenCTI and to leverage threat information to improce detection capabilities and response to security incidents.

Features

Ability to ingest Indicator exposed through an OpenCTI live stream dataarrow-up-right.

Ability to trigger OpenCTI actions in response of Alert and to investigate them directly in OpenCTI

Events format

The Live Stream feature in OpenCTI simplifies the use of real-time data streams through connectors. Users can easily create a data stream with specific filters right in the user interface (UI), and access this stream through the /stream/{STREAM_ID} path.

id: {Event stream id} -> Like 1620249512318-0
event: {Event type} -> create / update / delete
data: { -> The complete event data
    version -> The version number of the event
    type -> The inner type of the event
    scope -> The scope of the event [internal or external]
    data: {STIX data} -> The STIX representation of the data.
    message -> A simple string to easy understand the event
    origin: {Data Origin} -> Complex object with different information about the origin of the event
    context: {Event context} -> Complex object with meta information depending of the event type
}

For example raw log:

Configuration

Before configuring the App, we need create a new livestream data suitable for your organization.

Live stream data status displayed below. You can Start, Stop and Delete stream data.

Add-on configure, navigate to Splunk Web and open OpenCTI add-on for Splunk and navigate to Configuration page.

Parameter
Description

OpenCTI URL

The URL of the OpenCTI platform (A HTTPS connection is required

The URL of the OpenCTI platform (A HTTPS connection is required

The API Token of the previously created user

OpenCTI Indicators Inputs Configuration, β€œOpenCTI Add-On for Splunk” enables Splunk to be feed with indicators exposed through a live stream. To do this, the add-on implements and manages Splunk modular inputs. Indicators are stored in a dedicated kvstore named β€œopencti_indicators”. A default lookup definition named "opencti_lookup" is also implemented to facilitate indicator management.

Parameter
Description

Name

Unique name for the input being configured

Interval

Time interval of input in seconds. Leave as default (0) to allow continuous execution of the ingestion process

Index

The index that the data will be stored in (default)

Stream Id

The Live Stream ID of the OpenCTI stream to consume

Import from

The number of days to go back for the initial data collection (default: 30) (optional)

Once the Input parameter have been correctly configured click add

We can also consult the Indicators Dashboard which gives an overview of the data ingested

Easy query splunk query SPL with data from kvstore OpenCTI provide indicator.

Example search with IOCs. Rule Splunk:

By entering the Tag, it is easy to identify Hash files related to APT groups or Malware Type, etc.

Using OpenCTI GraphQL API + Splunk HEC

GraphQL is used as the query language. GraphQL allows users to flexibly select the required data fields and filter by specific conditions such as entity type, relationship type, creation time, confidence level, etc.

Some more important STIX naming shortcuts are:

  • STIX Domain Objects (SDO): Attack Patterns, Malware, Threat Actors, etc.

  • STIX Cyber Observable (SCO): IP Addresses, domain names, hashes, etc.

  • STIX Relationship Object (SRO): Relationships, Sightings

OpenCTI Data Model: OpenCTI builds the entire CTI system on the STIX 2.1 model, but also extends it to support real-world use cases such as:

  • Non-STIX entities: Narrative, Channel, Event

  • Extended relationships such as: amplifies, publishes, drops

This model is implemented as a knowledge graph. Helps to express tight connection and flexible query between objects.

For this way, first we need create a new Splunk HEC receive data. Navigate Settings > Data Inputs > HTTP Event Collector > Add new

Next, we select source type, index already exist or create new.

Recheck a little information and submit. Here, in the tab HTTP Event Collector you can set any port.

Now, we can check my token in HTTP Event Collector you just created.

Example GraphQL for usecase get relationship locations- malware- indicators.

You can import parameter

Example python script for:

  • Get data from OpenCTI ( relation Location -> Malware -> Indicator)

  • Send data into Splunk (Splunk HEC) with suitable format (index=opencti sourcetype=opencti:relationships)

Switch Splunk Search & Reporting, based on the index=opencti, we can see the data that OpenCTI has provided.

Example SPL query Indicatorand Malware relate to Location VietNam.

Raw log

Last updated