OpenCTI Feed 4.X
Ingest indicators from the OpenCTI feed. Compatible with OpenCTI 5.12.17 and above.
Data Enrichment & Threat Intelligence · OpenCTI Feed · Feed
Details
| ID | OpenCTI Feed 4.X |
|---|---|
| Provider | Filigran |
| Category | Data Enrichment & Threat Intelligence |
| From Version | 5.5.0 |
| Docker Image | demisto/vendors-sdk:1.0.0.115493 |
| Supported Modules | Agentix XSIAM |
README
Ingest indicators from the OpenCTI feed. Compatible with OpenCTI 5.12.17 and above.
Configure OpenCTI Feed 4.X in Cortex
| Parameter | Description | Required |
|---|---|---|
| Base URL | True | |
| API Key (leave empty. Fill in the API key in the password field.) | False | |
| Indicator types to fetch | The indicator types to fetch. Out-of-the-box indicator types supported in XSOAR are: Account, Domain, Email, File, Host, IP, IPv6, Registry Key, and URL. Other types will not cause automatic indicator creation in XSOAR. | True |
| Max indicators per fetch | False | |
| Fetch indicators | False | |
| Indicator Reputation | Indicators from this integration instance will get this reputation. If none of the options is chosen, the indicator reputation will be set according to the indicator data. | False |
| Source Reliability | Reliability of the source providing the intelligence data. | True |
| Traffic Light Protocol Color | The Traffic Light Protocol (TLP) designation to apply to indicators fetched from the feed. If none of the options is chosen, the TLP color will be set according to the indicator data. | False |
| Feed Fetch Interval | False | |
| Tags | CSV values are supported. | False |
| Bypass exclusion list | When selected, the exclusion list is ignored for indicators from this feed. This means that if an indicator from this feed is on the exclusion list, the indicator might still be added to the system. | False |
| Trust any certificate (not secure) | False | |
| Use system proxy settings | False | |
| Score minimum value | Score minimum value to filter by. Values range is 1-100. | False |
| Score maximum value | Score maximum value to filter by. Values range is 1-100. | False |
Commands
You can execute these commands from the CLI, as part of an automation, or in a playbook.
After you successfully execute a command, a DBot message appears in the War Room with the command details.
opencti-reset-fetch-indicators
WARNING: This command will reset your fetch history.
Base Command
opencti-reset-fetch-indicators
Input
There are no input arguments for this command.
Context Output
There is no context output for this command.
Command Example
#### Human Readable Output
>Fetch history deleted successfully
### opencti-get-indicators
***
Gets indicators from the feed.
#### Base Command
`opencti-get-indicators`
#### Input
| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| limit | The maximum number of indicators to return per fetch. Default value is 50. Maximum value is 500. | Optional |
| indicator_types | The indicator types to fetch. Out-of-the-box indicator types supported in XSOAR are: Account, Domain, Email, File, Host, IP, IPv6, Registry Key, and URL. Other types will not cause automatic indicator creation in XSOAR. Possible values are: ALL, Account, Domain, Email, File, Host, IP, IPv6, Registry Key, URL. Default is ALL. | Optional |
| last_run_id | The last ID from the previous call, from which to begin pagination for this call. You can find this value at the OpenCTI.IndicatorsList.LastRunID context path. | Optional |
| score_start | Score minimum value to filter by. Values range is 1-100. | Optional |
| score_end | Score naximum value to filter by. Values range is 1-100. | Optional |
#### Context Output
There is no context output for this command.
#### Command Example
```!opencti-get-indicators limit=2 indicator_types="IP"```
#### Context Example
```json
{
"OpenCTI": {
"Indicators": {
"IndicatorsList": [
{
"createdBy": "1e12fe87-db3e-4838-8391-6910547bf60d",
"description": "test_desc",
"externalReferences": [],
"id": "700c8187-2dce-4aeb-bf3a-0864cb7b02c7",
"labels": [
"dev1"
],
"marking": [
"TLP:AMBER"
],
"score": 70,
"type": "IP",
"value": "1.2.3.4"
},
{
"createdBy": "1e12fe87-db3e-4838-8391-6910547bf60d",
"description": "test fetch one",
"externalReferences": [],
"id": "33bd535b-fa1c-41e2-a6f9-80d82dd29a9b",
"labels": [
"dev1",
"test-label-1"
],
"marking": [],
"score": 100,
"type": "IP",
"value": "1.1.1.1"
}
],
"lastRunID": "YXJyYXljb25uZWN0aW9uOjI="
}
}
}
Human Readable Output
Indicators
type value id IP 1.2.3.4 700c8187-2dce-4aeb-bf3a-0864cb7b02c7 IP 1.1.1.1 33bd535b-fa1c-41e2-a6f9-80d82dd29a9b
Configuration parameters
base_url— Base URL (required)credentials— API Key (leave empty. Fill in the API key in the password field.)indicator_types— Indicator types to fetch (required)max_indicator_to_fetch— Max indicators per fetchfeed— Fetch indicatorsfeedReputation— Indicator ReputationfeedReliability— Source Reliability (required)tlp_color— Traffic Light Protocol ColorfeedExpirationPolicy—feedExpirationInterval—feedFetchInterval— Feed Fetch IntervalfeedTags— TagsfeedBypassExclusionList— Bypass exclusion listinsecure— Trust any certificate (not secure)proxy— Use system proxy settingsscore_start— Score minimum valuescore_end— Score maximum value
Commands (2)
-
opencti-get-indicatorsGets indicators from the feed.
-
opencti-reset-fetch-indicatorsWARNING: This command will reset your fetch history.
from CommonServerPython import CommandResults from FeedOpenCTI_v4 import * from pycti import StixCyberObservable from test_data.feed_data import RESPONSE_DATA, RESPONSE_DATA_WITHOUT_INDICATORS class Client: temp = "" stix_cyber_observable = StixCyberObservable def test_get_indicators(mocker): """Tests get_indicators function Given The following indicator types: 'registry key', 'account' that were chosen by the user. When - `fetch_indicators_command` or `get_indicators_command` are calling the get_indicators function Then - convert the result to indicators list - validate the length of the indicators list - validate the new_last_id that is saved into the integration context is the same as the ID returned by the command. """ client = Client mocker.patch.object(client.stix_cyber_observable, "list", return_value=RESPONSE_DATA) _, indicators = get_indicators(client, indicator_types=["registry key", "account"], limit=10) assert len(indicators) == 2 def test_get_indicators__filters(mocker): """Tests get_indicators function filters Given The following: indicator types: 'registry key', 'account', score: [1, 2]. When - the get_indicators function is called Then - validate the filters that are sent to the API are correct. """ client = Client mock_request = mocker.patch.object(client.stix_cyber_observable, "list", return_value=RESPONSE_DATA) _, indicators = get_indicators(client, indicator_types=["registry key", "account"], score=[1, 2], limit=10) assert mock_request.call_args[1]["filters"] == { "mode": "and", "filters": [ {"key": "entity_type", "values": ["Windows-Registry-Key", "User-Account"], "operator": "eq", "mode": "or"}, {"key": "x_opencti_score", "values": [1, 2], "operator": "eq", "mode": "or"}, ], "filterGroups": [], } def test_fetch_indicators_command(mocker): """Tests fetch_indicators_command function Given The following indicator types: 'registry key', 'account' that were chosen by the user. When - Calling `fetch_indicators_command` Then - convert the result to indicators list - validate the length of the indicators list """ client = Client mocker.patch.object(client.stix_cyber_observable, "list", return_value=RESPONSE_DATA) indicators = fetch_indicators_command(client, indicator_types=["registry key", "account"], max_fetch=200) assert len(indicators) == 2 def test_get_indicators_command(mocker): """Tests get_indicators_command function Given The following indicator types: 'registry key', 'account' that were chosen by the user and 'limit': 2 When - Calling `get_indicators_command` Then - convert the result to human readable table - validate the readable_output, raw_response. """ client = Client args = {"indicator_types": "registry key,account", "limit": 2} mocker.patch.object(client.stix_cyber_observable, "list", return_value=RESPONSE_DATA) results: CommandResults = get_indicators_command(client, args) assert len(results.raw_response) == 2 assert "Indicators" in results.readable_output def test_get_indicators_command_with_no_data_to_return(mocker): """Tests get_indicators_command function with no data to return Given The following indicator types: 'registry key', 'account' that were chosen by the user. When - Calling `get_indicators_command` Then - validate the response to have a "No indicators" string """ client = Client args = {"indicator_types": ["registry key", "account"]} mocker.patch.object(client.stix_cyber_observable, "list", return_value=RESPONSE_DATA_WITHOUT_INDICATORS) results: CommandResults = get_indicators_command(client, args) assert "No indicators" in results.readable_output