Skip to content

Commit 54ac41d

Browse files
authored
Revert "Group-IB hot fix integration (#30470)"
This reverts commit f43de9f.
1 parent f43de9f commit 54ac41d

File tree

15 files changed

+833
-1931
lines changed

15 files changed

+833
-1931
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"autorun": true,
3+
"color": "#8052f3",
4+
"days": 0,
5+
"daysR": 0,
6+
"default": false,
7+
"detached": false,
8+
"disabled": false,
9+
"extractSettings": {
10+
"fieldCliNameToExtractSettings": {
11+
"alertcategory": {
12+
"extractAsIsIndicatorTypeId": "",
13+
"extractIndicatorTypesIDs": [],
14+
"isExtractingAllIndicatorTypes": false
15+
},
16+
"gibphishingdomain": {
17+
"extractAsIsIndicatorTypeId": "domainRepUnified",
18+
"extractIndicatorTypesIDs": [],
19+
"isExtractingAllIndicatorTypes": false
20+
},
21+
"gibrelatedindicatorsdata": {
22+
"extractAsIsIndicatorTypeId": "",
23+
"extractIndicatorTypesIDs": [],
24+
"isExtractingAllIndicatorTypes": true
25+
}
26+
},
27+
"mode": "Specific"
28+
},
29+
"hours": 0,
30+
"hoursR": 0,
31+
"id": "GIB Brand Protection Domain",
32+
"layout": "GIB Brand Protection Domain Layout",
33+
"locked": false,
34+
"name": "GIB Brand Protection Domain",
35+
"onChangeRepAlg": 2,
36+
"playbookId": "Incident Postprocessing - Group-IB Threat Intelligence & Attribution",
37+
"readonly": false,
38+
"reputationCalc": 2,
39+
"system": false,
40+
"version": -1,
41+
"weeks": 0,
42+
"weeksR": 0,
43+
"fromVersion": "6.0.0"
44+
}

Packs/GroupIB_ThreatIntelligenceAttribution/Integrations/GroupIBTIA/GroupIBTIA.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2+
import demistomock as demisto
3+
from CommonServerPython import *
4+
from CommonServerUserPython import *
5+
16
""" IMPORTS """
27

38
import json
@@ -35,9 +40,6 @@
3540
"add_fields": ["events.cnc.ipv4.asn", "events.cnc.ipv4.countryName", "events.cnc.ipv4.region"],
3641
"add_fields_types": ["asn", "geocountry", "geolocation"]
3742
},
38-
{
39-
"main_field": "events.client.ipv4.ip",
40-
}
4143
]
4244
},
4345
"compromised/card": {
@@ -435,7 +437,7 @@ class Client(BaseClient):
435437
"""
436438

437439
def _create_update_generator(self, collection_name: str, max_requests: int,
438-
date_from: str | None = None, seq_update: int | str = None,
440+
date_from: Optional[str] = None, seq_update: Union[int, str] = None,
439441
limit: int = 200) -> Generator:
440442
"""
441443
Creates generator of lists with feeds class objects for an update session
@@ -837,7 +839,7 @@ def calculate_dbot_score(type_):
837839
return Common.DBotScore(
838840
indicator=value,
839841
indicator_type=type_,
840-
integration_name="GIB TI&A",
842+
integration_name="GIB TI",
841843
score=score
842844
)
843845

@@ -1030,13 +1032,16 @@ def fetch_incidents_command(client: Client, last_run: dict, first_fetch_time: st
10301032
:return: next_run will be last_run in the next fetch-incidents; incidents and indicators will be created in Demisto.
10311033
"""
10321034
incidents = []
1033-
next_run: dict[str, dict[str, int | Any]] = {"last_fetch": {}}
1035+
next_run: dict[str, dict[str, Union[int, Any]]] = {"last_fetch": {}}
10341036
for collection_name in incident_collections:
10351037
last_fetch = last_run.get("last_fetch", {}).get(collection_name)
10361038

10371039
portions = client.create_poll_generator(collection_name=collection_name, max_requests=requests_count,
10381040
last_fetch=last_fetch, first_fetch_time=first_fetch_time)
10391041
for portion, last_fetch in portions:
1042+
last_test = last_fetch
1043+
for last in last_test:
1044+
set(last)
10401045
for feed in portion:
10411046
mapping = MAPPING.get(collection_name, {})
10421047
if collection_name == "compromised/breached":
@@ -1081,7 +1086,7 @@ def fetch_incidents_command(client: Client, last_run: dict, first_fetch_time: st
10811086
return next_run, incidents
10821087

10831088

1084-
def get_available_collections_command(client: Client, args):
1089+
def get_available_collections_command(client: Client):
10851090
"""
10861091
Returns list of available collections to context and War Room.
10871092

0 commit comments

Comments
 (0)