Skip to content

Commit 77d6df8

Browse files
content-botnestoor22MichaelYochpaz
authored andcommitted
Recordedfuture threathunting v2.5.0 (#29641)
* Recordedfuture threathunting v2.5.0 (#29025) * Add commands related to Automated Threat hunting recordedfuture-threat-map recordedfuture-threat-links recordedfuture-detection-rules * Add recordedfuture-collective-insight command. Change app version. * Update README.md. Add release notes * Add playbook. Add unittests * Add unittests * Fix test_collective_insight_command * Remove incorrect release note * Add documentation for threat actor search playbook * update Recorded Future Threat actor search playbook. add release note about new playbook. * Update release notes, fix formatting * Format yml files * Update Recorded future threat actor search playbook * Update docker image * Fix linter --------- Co-authored-by: Michael Yochpaz <[email protected]> * Minor README fixes --------- Co-authored-by: Yaroslav Nestor <[email protected]> Co-authored-by: Michael Yochpaz <[email protected]>
1 parent 9a8dd38 commit 77d6df8

File tree

8 files changed

+1302
-8
lines changed

8 files changed

+1302
-8
lines changed

Packs/RecordedFuture/Integrations/RecordedFuture/README.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,119 @@ Search for a malware by specified filters.
11541154
| RecordedFuture.Malware.type | string | Recorded Future entity type \(always = "Malware"\). |
11551155
| RecordedFuture.Malware.intelCard | date | Recorded Future intelligence card URL. |
11561156

1157+
1158+
#### Base Command
1159+
1160+
`recordedfuture-threat-map`
1161+
1162+
#### Input
1163+
1164+
| **Argument Name** | **Description** | **Required** |
1165+
| --- | --- | --- |
1166+
| actors_ids | Actors IDs for which to get the threat map | Optional |
1167+
| actor_name | Actors name for which to get the threat map | Optional |
1168+
| include_links | Fetch links to threat actor or not | Optional |
1169+
1170+
#### Context Output
1171+
1172+
| **Path** | **Type** | **Description** |
1173+
|--------------------------------------|----------|-------------------------------------------|
1174+
| RecordedFuture.ThreatMap.id | string | Recorded Future threat actor ID. |
1175+
| RecordedFuture.ThreatMap.name | string | Recorded Future entity name. |
1176+
| RecordedFuture.ThreatMap.alias | array | Recorded Future threat actor alias. |
1177+
| RecordedFuture.ThreatMap.intent | number | Recorded Future threat actor intent. |
1178+
| RecordedFuture.ThreatMap.id | string | Recorded Future threat actor ID. |
1179+
| RecordedFuture.ThreatMap.opportunity | number | Recorded Future threat actor opportunity. |
1180+
| RecordedFuture.ThreatMap.log_entries | array | Recorded Future threat actor log entries. |
1181+
| RecordedFuture.ThreatMap.links | array | Recorded Future threat actor links. |
1182+
1183+
1184+
#### Base Command
1185+
1186+
`recordedfuture-threat-links`
1187+
1188+
#### Input
1189+
1190+
| **Argument Name** | **Description** | **Required** |
1191+
|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|
1192+
| entity_type | Type of the entity to fetch links for. E.g. "domain", "ip", "file", "url", "cve", "malware", "organization, "person". Should be provided along with the entity in entity_name argument. | Optional |
1193+
| entity_name | Name of the entity to fetch links for | Optional |
1194+
| entity_id | ID of entity to fetch links for | Optional |
1195+
| source_type | Source of the links to be fetched. Can be "insikt" or "technical" | Optional |
1196+
| timeframe | Time range of the links to be fetched. Eg. "-1d" for last 1 day | Optional |
1197+
| technical_type | Type of technical source to fetch links from. Can be "type:MalwareAnalysis", "type:InfrastructureAnalysis", "type:NetworkTrafficAnalysis" or "type:TTPAnalysis" | Optional |
1198+
1199+
#### Context Output
1200+
1201+
| **Path** | **Type** | **Description** |
1202+
|---------------------------------------|----------|----------------------------------|
1203+
| RecordedFuture.Links.entity.id | string | Recorded Future Entity id. |
1204+
| RecordedFuture.Links.entity.type | string | Recorded Future Entity type |
1205+
| RecordedFuture.Links.links.type | string | Recorded Future link type. |
1206+
| RecordedFuture.Links.links.id | string | Recorded Future link id. |
1207+
| RecordedFuture.Links.links.name | string | Recorded Future link name. |
1208+
| RecordedFuture.Links.links.source | string | Recorded Future link source. |
1209+
| RecordedFuture.Links.links.section | string | Recorded Future link section. |
1210+
| RecordedFuture.Links.links.attributes | string | Recorded Future link attributes. |
1211+
1212+
1213+
#### Base Command
1214+
1215+
`recordedfuture-detection-rules`
1216+
1217+
#### Input
1218+
1219+
| **Argument Name** | **Description** | **Required** |
1220+
|-------------------|--------------------------------------------|--------------|
1221+
| entity_type | Type of the entity to fetch links for | Optional |
1222+
| entity_name | Name of the entity to fetch links for | Optional |
1223+
| entity_id | ID of entity to fetch links for | Optional |
1224+
| rule_types | Rule type. Can be "yara", "sigma", "snort" | Optional |
1225+
| title | Rule title | Optional |
1226+
1227+
#### Context Output
1228+
1229+
| **Path** | **Type** | **Description** |
1230+
|---------------------------------------------------|----------|---------------------------------------------|
1231+
| RecordedFuture.DetectionRules.id | string | Recorded Future Detection rule id. |
1232+
| RecordedFuture.DetectionRules.type | string | Recorded Future Detection rule type. |
1233+
| RecordedFuture.DetectionRules.title | string | Recorded Future Detection rule title. |
1234+
| RecordedFuture.DetectionRules.description | string | Recorded Future Detection rule description. |
1235+
| RecordedFuture.DetectionRules.created | string | Recorded Future link name. |
1236+
| RecordedFuture.DetectionRules.updated | string | Recorded Future link source. |
1237+
| RecordedFuture.DetectionRules.rules | array | Recorded Future link section. |
1238+
| RecordedFuture.DetectionRules.rules.entities | array | Recorded Future link attributes. |
1239+
| RecordedFuture.DetectionRules.rules.entities.id | string | Recorded Future link attributes. |
1240+
| RecordedFuture.DetectionRules.rules.entities.type | string | Recorded Future link attributes. |
1241+
| RecordedFuture.DetectionRules.rules.entities.name | string | Recorded Future link attributes. |
1242+
| RecordedFuture.DetectionRules.rules.content | string | Recorded Future link attributes. |
1243+
| RecordedFuture.DetectionRules.rules.file_name | string | Recorded Future link attributes. |
1244+
1245+
1246+
#### Base Command
1247+
1248+
`recordedfuture-collective-insight`
1249+
1250+
#### Input
1251+
#### Input
1252+
1253+
| **Argument Name** | **Description** | **Required** |
1254+
|--------------------|-----------------------------------------------------------------------------------------------------|--------------|
1255+
| entity_type | Value that can contain one of the enumerated list of values (ip, hash, domain, vulnerability, url). | Required |
1256+
| entity_name | Value of the IOC itself | Required |
1257+
| entity_source_type | Used to describe what log source the IOC came from | Optional |
1258+
| incident_name | Title of the incident related to the IOC | Optional |
1259+
| incident_id | ID of the incident related to the IOC | Optional |
1260+
| incident_type | Attack vector associated with the incident (C2, Phishing.. etc) | Optional |
1261+
| mitre_codes | List contains one or more MITRE codes associated with the IOC | Optional |
1262+
| malware | List contains all known malware associated with the IOCs | Optional |
1263+
1264+
#### Context Output
1265+
1266+
| **Path** | **Type** | **Description** |
1267+
|-----------------------------------------|----------|-----------------|
1268+
| RecordedFuture.CollectiveInsight.status | string | Request status |
1269+
11571270
## Breaking changes from the previous version of this integration - Recorded Future v2
11581271

11591272
Renamed the integration setting "Incident Sharing" to "Collective Insights", resetting any previous configuration to this setting.

Packs/RecordedFuture/Integrations/RecordedFuture/RecordedFuture.py

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import copy
66
import platform
7+
from typing import *
78

89
# flake8: noqa: F402,F405 lgtm
910

@@ -12,7 +13,7 @@
1213
# disable insecure warnings
1314
requests.packages.urllib3.disable_warnings() # type: ignore
1415

15-
__version__ = '2.4.3'
16+
__version__ = '2.5.0'
1617

1718

1819
# === === === === === === === === === === === === === === ===
@@ -282,9 +283,7 @@ def get_single_alert(self) -> dict:
282283
"""Get a single alert"""
283284
return self._call(url_suffix='/v2/alert/lookup')
284285

285-
def get_alerts(
286-
self,
287-
) -> Dict[str, Any]:
286+
def get_alerts(self) -> Dict[str, Any]:
288287
"""Get alerts."""
289288
return self._call(url_suffix='/v2/alert/search')
290289

@@ -320,6 +319,18 @@ def get_triage(self) -> Dict[str, Any]:
320319
"""SOAR triage lookup."""
321320
return self._call(url_suffix='/v2/lookup/triage')
322321

322+
def get_threat_map(self) -> Dict[str, Any]:
323+
return self._call(url_suffix='/v2/threat/actors')
324+
325+
def get_threat_links(self) -> Dict[str, Any]:
326+
return self._call(url_suffix='/v2/links/search')
327+
328+
def get_detection_rules(self) -> Dict[str, Any]:
329+
return self._call(url_suffix='/v2/detection_rules/search')
330+
331+
def submit_detection_to_collective_insight(self) -> Dict[str, Any]:
332+
return self._call(url_suffix='/v2/collective-insights/detections')
333+
323334

324335
# === === === === === === === === === === === === === === ===
325336
# === === === === === === ACTIONS === === === === === === ===
@@ -441,13 +452,28 @@ def triage_command(self) -> List[CommandResults]:
441452
response = self.client.get_triage()
442453
return self._process_result_actions(response=response)
443454

455+
def threat_actors_command(self) -> List[CommandResults]:
456+
response = self.client.get_threat_map()
457+
return self._process_result_actions(response=response)
458+
459+
def threat_links_command(self) -> List[CommandResults]:
460+
response = self.client.get_threat_links()
461+
return self._process_result_actions(response=response)
462+
463+
def detection_rules_command(self) -> List[CommandResults]:
464+
response = self.client.get_detection_rules()
465+
return self._process_result_actions(response=response)
466+
467+
def collective_insight_command(self) -> List[CommandResults]:
468+
response = self.client.submit_detection_to_collective_insight()
469+
return self._process_result_actions(response=response)
444470

445471
# === === === === === === === === === === === === === === ===
446472
# === === === === === === === MAIN === === === === === === ==
447473
# === === === === === === === === === === === === === === ===
448474

449475

450-
def main() -> None:
476+
def main() -> None: # pragma: no cover
451477
"""Main method used to run actions."""
452478
try:
453479
demisto_params = demisto.params()
@@ -525,6 +551,15 @@ def main() -> None:
525551
elif command == 'recordedfuture-threat-assessment':
526552
return_results(actions.triage_command())
527553

554+
elif command == 'recordedfuture-threat-map':
555+
return_results(actions.threat_actors_command())
556+
elif command == 'recordedfuture-threat-links':
557+
return_results(actions.threat_links_command())
558+
elif command == 'recordedfuture-detection-rules':
559+
return_results(actions.detection_rules_command())
560+
elif command == 'recordedfuture-collective-insight':
561+
return_results(actions.collective_insight_command())
562+
528563
except Exception as e:
529564
return_error(message=f'Failed to execute {demisto.command()} command: {str(e)}')
530565

0 commit comments

Comments
 (0)