Skip to content

Commit c2c7680

Browse files
committed
docs: clarify index-based ingestion setup and remove ES references
- document index configuration, macros, and required saved searches - remove Enterprise Security integration claims
1 parent c846a0b commit c2c7680

File tree

1 file changed

+99
-122
lines changed

1 file changed

+99
-122
lines changed

README.md

Lines changed: 99 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -160,176 +160,153 @@ You can monitor the import of indicators using the following Splunk SPL query th
160160
index="opencti_data" source="opencti" sourcetype="opencti:indicator"
161161
```
162162

163-
## Splunk Enterprise Security Integration
163+
## Index-Based Ingestion Configuration (Required for Saved Searches)
164164

165-
The add-on can expose OpenCTI indicators to the Splunk Enterprise Security (ES) Threat Intelligence Framework by populating an ES-compliant lookup called `opencti_threatintel`.
165+
When using **Index mode** ingestion, OpenCTI data is first written to a Splunk index and then synchronized into KV Store collections via saved searches.
166+
This section explains **how to define the index**, **configure macros**, and **enable the required saved searches**.
166167

167-
At a high level:
168-
169-
1. The modular input writes OpenCTI events into a Splunk index (for example, `opencti_stream`).
170-
2. Normalization searches populate a catalog of indicators in the `opencti_indicators` KV store.
171-
3. A scheduled search maps `opencti_indicators` into an ES-friendly lookup named `opencti_threatintel`.
172-
4. ES is configured to treat `opencti_threatintel` as a threat intelligence source.
168+
---
173169

174-
> **Note:** The `opencti_threatintel` lookup can be defined either in this add-on **or** in the ES app (`SA-ThreatIntelligence`).
175-
> A saved search running in the OpenCTI app can populate it as long as:
176-
>
177-
> - The lookup definition is shared **Global**, and
178-
> - There is no other lookup with the same name shadowing it in the OpenCTI app.
170+
## 1. Choose or Create a Splunk Index
179171

180-
### Prerquisites
172+
By default, the add-on **does not assume a fixed index name**.
181173

182-
- Splunk Enterprise Security installed on the search head where this add-on is installed.
183-
- The OpenCTI modular input is configured and successfully ingesting data.
184-
- The `opencti_indicators` KV store lookup is populated
185-
- You have admin (or equivalent) permissions in Splunk and ES.
174+
### Recommended default index
175+
```
176+
opencti_data
177+
```
178+
### Create a dedicated index (recommended)
186179

187-
### 1. Create the `opencti_threatintel` KV Store lookup
180+
In Splunk Web:
188181

189-
1. In Splunk Web, go to **Settings ▸ Lookups ▸ Lookup definitions**.
190-
2. Click **Add new** and create a KV Store lookup:
191-
- **Destination app:** `SA-ThreatIntelligence`
192-
- **Name:** `opencti_threatintel`
193-
- **Type:** KV Store
194-
- **KV store collection name:** `opencti_threatintel`
195-
- **Fields:** \_key, threat_key, threat_match_value, threat_type, threat_description, threat_group, threat_category, threat_first_seen, threat_last_seen, threat_confidence, threat_weight
196-
3. After saving, click on the **Permissions** link for the `opencti_threatintel` lookup definition:
197-
- Set **Sharing** to **Global** so ES (in apps like `TA-opencti-for-splunk-enterprise`) can read it.
182+
1. Go to **Settings ▸ Indexes**
183+
2. Click **New Index**
184+
3. Set:
185+
- **Index name:** `opencti_data`
186+
- Leave other settings at defaults (or align with your data retention policy)
187+
4. Save
198188

199-
> If you prefer to manage collections via config files, you can instead define this collection in `collections.conf` and the lookup in `transforms.conf`.
189+
> ⚠️ If you choose a **custom index name**, you must update the OpenCTI macro configuration (see below).
200190
201191
---
202192

203-
### 2. Verify the `opencti_indicators` lookup
204-
205-
The shipped searches in this add-on maintain a canonical indicator lookup in the `opencti_indicators` KV store. ES integration builds on top of this lookup.
193+
## 2. Configure the OpenCTI Modular Input (Index Mode)
206194

207-
To verify it has data:
195+
When creating a modular input:
208196

209-
1. Open **Search & Reporting**.
210-
2. Run:
197+
| Field | Value |
198+
|----------------|-------|
199+
| **Input Type** | `Index entry` |
200+
| **Index** | `opencti_data` (or your custom index) |
201+
| **Stream ID** | OpenCTI Live Stream ID |
202+
| **Interval** | `0` (continuous) |
211203

212-
```spl
213-
| inputlookup opencti_indicators
214-
| head 10
215-
```
204+
Once enabled:
205+
- Each **OpenCTI stream event** is written as a **Splunk event**
206+
- Events are **append-only**
207+
- The same indicator may appear multiple times as it evolves over time
216208

217-
3. You should see one row per OpenCTI indicator, with fields such as id, name, pattern, value, score, confidence, main_observable_type, etc.
209+
### Event metadata
218210

219-
If this lookup is empty, review your OpenCTI inputs and the “Update OpenCTI Indicators Lookup” / “Nightly Rebuild OpenCTI Indicators Lookup” saved searches before proceeding.
211+
| Field | Value |
212+
|------|------|
213+
| `source` | `opencti` |
214+
| `sourcetype` | `opencti:indicator`, `opencti:report`, etc. |
220215

221216
---
222217

223-
### 3. Enable the Update Enterprise Security Threat Intelligence saved search
218+
## 3. Configure the OpenCTI Index Macro (Required)
224219

225-
The OpenCTI add-on ships with a saved search called `Update Enterprise Security Threat Intelligence` that transforms the opencti_indicators catalog into the ES Threat Intelligence schema and writes it into the opencti_threatintel KV Store lookup.
220+
All shipped saved searches rely on a macro to locate OpenCTI data.
226221

227-
Saved search properties (default):
222+
### Macro name
228223

229-
- **Name:** `Update Enterprise Security Threat Intelligence`
230-
- **App context:** TA-opencti-for-splunk-enterprise
231-
- **Schedule:** _/5 _ \* \* \* (every 5 minutes)
232-
- **Core SPL (conceptual):**
224+
```
225+
opencti_index
226+
```
233227

234-
- Reads from opencti_indicators via | inputlookup opencti_indicators
235-
- Maps OpenCTI fields into ES fields:
228+
### Default definition
236229

237-
| ES field | Source OpenCTI field(s) | Notes |
238-
| -------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
239-
| `threat_key` | `id` | Stable identifier for the indicator (OpenCTI ID). |
240-
| `threat_match_value` | `value` | Actual indicator value (IP, domain, URL, hash, email, etc.). |
241-
| `threat_type` | `main_observable_type`, `type` | Mapped to ES types such as `ip_intel`, `domain_intel`, `url_intel`, `file_intel`, `email_intel`, etc. |
242-
| `threat_description` | `name` | Human-readable name/title of the indicator. |
243-
| `threat_group` | `created_by` | Origin or owner of the indicator (e.g., group, organization, actor). |
244-
| `threat_category` | `labels`, `attack_patterns`, `malware`, `vulnerabilities` | Combined, multi-valued category/tactic/context information. |
245-
| `threat_first_seen` | `valid_from`, `created`, `created_at` | First time the indicator was observed or became valid. |
246-
| `threat_last_seen` | `valid_until`, `modified`, `updated_at` | Last time the indicator was observed or considered valid. |
247-
| `threat_confidence` | `confidence` | Numeric or ordinal confidence score from OpenCTI. |
248-
| `threat_weight` | `score` | Severity/priority score used by ES for weighting during correlation. |
230+
```
231+
index=opencti_data
232+
```
249233

250-
To verify or adjust this saved search:
234+
### How to configure
251235

252-
1. In Splunk Web, go to **Settings ▸ Searches, reports, and alerts**.
253-
2. Set App to TA-opencti-for-splunk-enterprise.
254-
3. Locate `Update Enterprise Security Threat Intelligence`
255-
4. Open the search:
256-
- Confirm it begins with | inputlookup opencti_indicators.
257-
- Confirm it ends with | outputlookup opencti_threatintel.
258-
5. On the Schedule tab:
259-
- Ensure the search is enabled.
260-
- Adjust the schedule if needed (for example, to run less or more frequently based on your OpenCTI update cadence). 6. Save your changes.
236+
1. Go to **Settings ▸ Advanced Search ▸ Search macros**
237+
2. Locate `opencti_index`
238+
3. Edit the macro definition:
239+
```
240+
index=<YOUR_INDEX_NAME>
241+
```
242+
4. Save
261243

262-
On each run, this search rebuilds the ES Threat Intelligence KV from the enriched opencti_indicators KV.
244+
> ⚠️ If this macro is not updated correctly:
245+
> - Saved searches will return **zero results**
246+
> - KV Store synchronization will silently fail
263247
264248
---
265249

266-
### 4. Validate that opencti_threatintel is being populated
267-
268-
After the `Update Enterprise Security Threat Intelligence` search has run at least once:
250+
## 4. Enable Required Saved Searches (Index → KV Store Sync)
269251

270-
1. Go to **Settings ▸ Lookups ▸ KV Store lookups**
271-
2. Click Lookup contents for opencti_threatintel.
272-
3. You should see rows of indicators with ES threat fields populated.
252+
Index mode relies on scheduled searches to populate KV Store collections.
273253

274-
Or from search:
254+
### Required saved searches
275255

276-
```
277-
| inputlookup opencti_threatintel
278-
| head 20
279-
```
256+
| Saved Search Name | Purpose |
257+
|------------------|--------|
258+
| `Update OpenCTI Indicators Lookup` | Sync indicators into `opencti_indicators` KV Store |
259+
| `Update OpenCTI Reports Lookup` | Sync reports into `opencti_reports` |
260+
| `Nightly Rebuild OpenCTI Indicators Lookup` | Full rebuild safety net |
280261

281-
If you see no results:
262+
### Enable them
282263

283-
- Confirm the saved search `Update Enterprise Security Threat Intelligence` has run successfully (check Activity ▸ Jobs).
284-
- Confirm opencti_indicators contains data.
285-
- Check lookup permissions:
286-
- opencti_indicators and opencti_threatintel must both be shared Global and readable by ES.
264+
1. Go to **Settings ▸ Searches, reports, and alerts**
265+
2. Set **App context** to `TA-opencti-for-splunk-enterprise`
266+
3. Enable:
267+
- `Update OpenCTI Indicators Lookup`
268+
- `Update OpenCTI Reports Lookup`
269+
4. Verify schedules are enabled (default is sufficient)
287270

288271
---
289272

290-
### 5. Register opencti_threatintel as a Threat Intelligence source in ES
291-
292-
Once opencti_threatintel contains data, register it as a threat intelligence source:
273+
## 5. Data Flow Summary (Index Mode)
274+
```
275+
OpenCTI Stream
276+
277+
Splunk Index (opencti_data)
278+
279+
Saved Searches
280+
281+
KV Store Collections
282+
283+
Dashboards / Alert Actions
284+
```
285+
---
293286

294-
1. In Splunk Enterprise Security, go to
295-
**Configure ▸ Data Enrichment ▸ Threat Intelligence Management** (menu name may vary slightly by ES version).
296-
2. Under Threat Intelligence Sources, add a new source:
297-
**Type:** KV Store
298-
**Name:** OpenCTI Threat Intelligence (or any clear label)
299-
**Collection / Lookup:** `opencti_threatintel`
300-
3. Enable the source.
301-
4. Confirm that field mappings align with your lookup structure:
302-
**Indicator value** → threat_match_value
303-
**Type** → threat_type
304-
**Description / group / category** → threat_description, threat_group, threat_category
305-
**Temporal / scoring fields** → threat_first_seen, threat_last_seen, threat_confidence, threat_weight
287+
## 6. Common Failure Modes (and How to Avoid Them)
306288

307-
At this point, ES correlation searches and threat intel–aware dashboards can use opencti_threatintel as a live feed of indicators from OpenCTI.
289+
| Issue | Cause | Fix |
290+
|-----|------|-----|
291+
| No indicators in dashboards | Macro points to wrong index | Update `opencti_index` |
292+
| KV Stores empty | Saved searches disabled | Enable saved searches |
293+
| Duplicate indicators | Expected behavior | Events are versioned |
308294

309295
---
310296

311-
### 6. Troubleshooting
297+
## 7. Verification Checklist
312298

313-
No indicators appear in ES correlation searches
314-
315-
- Check opencti_indicators:
299+
Run these searches to confirm everything is working:
316300

301+
### Index ingestion
317302
```
318-
| inputlookup opencti_indicators
319-
| stats count
303+
`opencti_index`
304+
| stats count by sourcetype
320305
```
321306

322-
- Check the job history of `Update Enterprise Security Threat Intelligence` for errors.
323-
- Confirm that opencti_threatintel has rows:
307+
### KV Store population
324308

325309
```
326-
| inputlookup opencti_threatintel
327-
| stats count
310+
| inputlookup opencti_indicators
311+
| head 10
328312
```
329-
330-
- Verify that ES has a Threat Intelligence source configured for opencti_threatintel.
331-
332-
Permission or lookup issues
333-
Ensure: - opencti_indicators KV Store lookup is shared Global. - opencti_threatintel KV Store lookup is defined in SA-ThreatIntelligence and shared Global. - Verify that the roles used by ES and the OpenCTI add-on have read/write access to these lookups.
334-
335-
With these steps completed, OpenCTI becomes a first-class Threat Intelligence provider for Splunk Enterprise Security via the opencti_threatintel KV Store, maintained by the `Update Enterprise Security Threat Intelligence` saved search.

0 commit comments

Comments
 (0)