assemblyline-v4-service 4.4.0.15__py3-none-any.whl → 4.4.0.17__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of assemblyline-v4-service might be problematic. Click here for more details.
- assemblyline_v4_service/VERSION +1 -1
- assemblyline_v4_service/common/dynamic_service_helper.py +4 -7
- assemblyline_v4_service/common/ontology_helper.py +2 -1
- assemblyline_v4_service/common/result.py +13 -13
- assemblyline_v4_service/updater/updater.py +3 -3
- {assemblyline_v4_service-4.4.0.15.dist-info → assemblyline_v4_service-4.4.0.17.dist-info}/METADATA +1 -1
- {assemblyline_v4_service-4.4.0.15.dist-info → assemblyline_v4_service-4.4.0.17.dist-info}/RECORD +10 -10
- {assemblyline_v4_service-4.4.0.15.dist-info → assemblyline_v4_service-4.4.0.17.dist-info}/LICENCE.md +0 -0
- {assemblyline_v4_service-4.4.0.15.dist-info → assemblyline_v4_service-4.4.0.17.dist-info}/WHEEL +0 -0
- {assemblyline_v4_service-4.4.0.15.dist-info → assemblyline_v4_service-4.4.0.17.dist-info}/top_level.txt +0 -0
assemblyline_v4_service/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.4.0.
|
|
1
|
+
4.4.0.17
|
|
@@ -1913,7 +1913,10 @@ class OntologyResults:
|
|
|
1913
1913
|
:return: None
|
|
1914
1914
|
"""
|
|
1915
1915
|
if self._validate_process(process):
|
|
1916
|
-
|
|
1916
|
+
if isinstance(process.objectid.guid, str):
|
|
1917
|
+
self._guid_process_map[process.objectid.guid.upper()] = process
|
|
1918
|
+
else:
|
|
1919
|
+
self._guid_process_map[process.objectid.guid] = process
|
|
1917
1920
|
self.set_parent_details(process)
|
|
1918
1921
|
self.set_child_details(process)
|
|
1919
1922
|
self.processes.append(process)
|
|
@@ -3279,12 +3282,6 @@ def convert_sysmon_processes(
|
|
|
3279
3282
|
else:
|
|
3280
3283
|
process["start_time"] = MIN_TIME
|
|
3281
3284
|
process["end_time"] = t
|
|
3282
|
-
elif name == "utctime" and event_id in [10]:
|
|
3283
|
-
if "." in text:
|
|
3284
|
-
text = text[:text.index(".")]
|
|
3285
|
-
t = str(datetime.strptime(text, LOCAL_FMT))
|
|
3286
|
-
process["start_time"] = t
|
|
3287
|
-
process["time_observed"] = t
|
|
3288
3285
|
elif name == "utctime":
|
|
3289
3286
|
if "." in text:
|
|
3290
3287
|
text = text[:text.index(".")]
|
|
@@ -174,7 +174,8 @@ class OntologyHelper:
|
|
|
174
174
|
# Include Ontological data
|
|
175
175
|
ontology_suffix = f"{request.sha256}.ontology"
|
|
176
176
|
ontology_path = os.path.join(working_dir, ontology_suffix)
|
|
177
|
-
open(ontology_path, 'w')
|
|
177
|
+
with open(ontology_path, 'w') as f:
|
|
178
|
+
f.write(json.dumps(ontology))
|
|
178
179
|
attachment_name = f'{request.task.service_name}_{ontology_suffix}'.lower()
|
|
179
180
|
request.add_supplementary(path=ontology_path, name=attachment_name,
|
|
180
181
|
description=f"Result Ontology from {request.task.service_name}",
|
|
@@ -72,7 +72,7 @@ class Heuristic:
|
|
|
72
72
|
signature: Optional[str] = None,
|
|
73
73
|
attack_ids: Optional[List[str]] = None,
|
|
74
74
|
signatures: Optional[Dict[str, int]] = None,
|
|
75
|
-
frequency:
|
|
75
|
+
frequency: int = 1,
|
|
76
76
|
score_map: Optional[Dict[str, int]] = None):
|
|
77
77
|
|
|
78
78
|
# Lazy load heuristics
|
|
@@ -205,7 +205,7 @@ class Heuristic:
|
|
|
205
205
|
|
|
206
206
|
|
|
207
207
|
class SectionBody:
|
|
208
|
-
def __init__(self, body_format
|
|
208
|
+
def __init__(self, body_format, body=None):
|
|
209
209
|
self._format = body_format
|
|
210
210
|
self._data = body
|
|
211
211
|
|
|
@@ -417,7 +417,7 @@ class MultiSectionBody(SectionBody):
|
|
|
417
417
|
def __init__(self) -> None:
|
|
418
418
|
super().__init__(BODY_FORMAT.MULTI, body=[])
|
|
419
419
|
|
|
420
|
-
def add_section_body(self, section_body: SectionBody) ->
|
|
420
|
+
def add_section_body(self, section_body: SectionBody) -> None:
|
|
421
421
|
self._data.append((section_body.format, section_body._data))
|
|
422
422
|
|
|
423
423
|
|
|
@@ -428,7 +428,7 @@ class DividerSectionBody(SectionBody):
|
|
|
428
428
|
|
|
429
429
|
class TimelineSectionBody(SectionBody):
|
|
430
430
|
def __init__(self):
|
|
431
|
-
|
|
431
|
+
super().__init__(BODY_FORMAT.TIMELINE, body=[])
|
|
432
432
|
|
|
433
433
|
def add_node(self, title: str, content: str, opposite_content: str,
|
|
434
434
|
icon: str = None, signatures: List[str] = [], score: int = 0) -> None:
|
|
@@ -442,7 +442,7 @@ class ResultSection:
|
|
|
442
442
|
title_text: Union[str, List],
|
|
443
443
|
body: Optional[Union[str, SectionBody]] = None,
|
|
444
444
|
classification: Optional[Classification] = None,
|
|
445
|
-
body_format
|
|
445
|
+
body_format=BODY_FORMAT.TEXT,
|
|
446
446
|
heuristic: Optional[Heuristic] = None,
|
|
447
447
|
tags: Optional[Dict[str, List[str]]] = None,
|
|
448
448
|
parent: Optional[Union[ResultSection, Result]] = None,
|
|
@@ -463,8 +463,8 @@ class ResultSection:
|
|
|
463
463
|
self._body_format = body.format
|
|
464
464
|
self._body = body.body
|
|
465
465
|
else:
|
|
466
|
-
self._body_format
|
|
467
|
-
self._body
|
|
466
|
+
self._body_format = body_format
|
|
467
|
+
self._body = body
|
|
468
468
|
self.classification: Classification = classification or SERVICE_ATTRIBUTES.default_result_classification
|
|
469
469
|
self.depth: int = 0
|
|
470
470
|
self._tags = tags or {}
|
|
@@ -577,10 +577,10 @@ class ResultSection:
|
|
|
577
577
|
|
|
578
578
|
return True
|
|
579
579
|
|
|
580
|
-
def set_body(self, body: Union[str, SectionBody], body_format
|
|
580
|
+
def set_body(self, body: Union[str, SectionBody], body_format=None) -> None:
|
|
581
581
|
if isinstance(body, SectionBody):
|
|
582
582
|
self._body = body.body
|
|
583
|
-
self._body_format = body.
|
|
583
|
+
self._body_format = body._format
|
|
584
584
|
else:
|
|
585
585
|
self._body = body
|
|
586
586
|
if body_format:
|
|
@@ -635,7 +635,7 @@ class TypeSpecificResultSection(ResultSection):
|
|
|
635
635
|
def add_lines(self, line_list: List[str]) -> None:
|
|
636
636
|
raise InvalidFunctionException("Do not use default add_lines method in a type specific section.")
|
|
637
637
|
|
|
638
|
-
def set_body(self, body: Union[str, SectionBody], body_format
|
|
638
|
+
def set_body(self, body: Union[str, SectionBody], body_format=BODY_FORMAT.TEXT) -> None:
|
|
639
639
|
raise InvalidFunctionException("Do not use default set_body method in a type specific section.")
|
|
640
640
|
|
|
641
641
|
|
|
@@ -757,7 +757,7 @@ class ResultMultiSection(TypeSpecificResultSection):
|
|
|
757
757
|
self.section_body: MultiSectionBody
|
|
758
758
|
super().__init__(title_text, MultiSectionBody(), **kwargs)
|
|
759
759
|
|
|
760
|
-
def add_section_part(self, section_part: SectionBody) ->
|
|
760
|
+
def add_section_part(self, section_part: SectionBody) -> None:
|
|
761
761
|
self.section_body.add_section_body(section_part)
|
|
762
762
|
|
|
763
763
|
|
|
@@ -820,8 +820,8 @@ class Result:
|
|
|
820
820
|
for section in self.sections:
|
|
821
821
|
self._flatten_sections(section)
|
|
822
822
|
|
|
823
|
-
for
|
|
824
|
-
heuristic =
|
|
823
|
+
for flattened_section in self._flattened_sections:
|
|
824
|
+
heuristic = flattened_section.get('heuristic')
|
|
825
825
|
if heuristic:
|
|
826
826
|
self._score += heuristic['score']
|
|
827
827
|
|
|
@@ -51,7 +51,7 @@ SOURCE_STATUS_KEY = 'status'
|
|
|
51
51
|
UI_SERVER = os.getenv('UI_SERVER', 'https://nginx')
|
|
52
52
|
UI_SERVER_ROOT_CA = os.environ.get('UI_SERVER_ROOT_CA', '/etc/assemblyline/ssl/al_root-ca.crt')
|
|
53
53
|
UPDATER_DIR = os.getenv('UPDATER_DIR', os.path.join(tempfile.gettempdir(), 'updater'))
|
|
54
|
-
UPDATER_API_ROLES = ['signature_import', 'signature_download', 'signature_view', 'safelist_manage', 'apikey_access']
|
|
54
|
+
UPDATER_API_ROLES = ['signature_import', 'signature_download', 'signature_view', 'safelist_manage', 'apikey_access', 'signature_manage']
|
|
55
55
|
STATUS_FILE = '/tmp/status'
|
|
56
56
|
|
|
57
57
|
classification = forge.get_classification()
|
|
@@ -602,8 +602,8 @@ class ServiceUpdater(ThreadedCoreBase):
|
|
|
602
602
|
uname = 'update_service_account'
|
|
603
603
|
user_data = self.datastore.user.get_if_exists(uname)
|
|
604
604
|
if user_data:
|
|
605
|
-
if user_data.roles:
|
|
606
|
-
# User exists and has roles, we're good to go
|
|
605
|
+
if user_data.roles and user_data.roles == UPDATER_API_ROLES:
|
|
606
|
+
# User exists and has the expected roles, we're good to go
|
|
607
607
|
return uname
|
|
608
608
|
|
|
609
609
|
# User exist but has no roles, let's update the user's roles
|
{assemblyline_v4_service-4.4.0.15.dist-info → assemblyline_v4_service-4.4.0.17.dist-info}/RECORD
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
assemblyline_v4_service/VERSION,sha256=
|
|
1
|
+
assemblyline_v4_service/VERSION,sha256=AMrDTIq1dFgJddwPkPRMdaVYZPxJe4666y64VwavE54,9
|
|
2
2
|
assemblyline_v4_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
assemblyline_v4_service/healthz.py,sha256=3QGBg0EZuXC6UN411HFwpLNEop9UvS9feFhvBUTP-k4,1576
|
|
4
4
|
assemblyline_v4_service/run_privileged_service.py,sha256=9uTfHetXR5G-EDKMDrgfWUOw34yr64-cj6Cm9eZaCbQ,14547
|
|
@@ -6,13 +6,13 @@ assemblyline_v4_service/run_service.py,sha256=RCqxdm-OAwJhl15BnKFkuavpQ5k6eTX3ZG
|
|
|
6
6
|
assemblyline_v4_service/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
assemblyline_v4_service/common/api.py,sha256=U908p3wlW9fEydx77GgI2E-6wW6T8Nc3R91nNOKU0H0,4453
|
|
8
8
|
assemblyline_v4_service/common/base.py,sha256=STzfZ9dwqvbgbKiFs-aLk05pdhyK6Psz4hZ3_fOmQYM,13039
|
|
9
|
-
assemblyline_v4_service/common/dynamic_service_helper.py,sha256=
|
|
9
|
+
assemblyline_v4_service/common/dynamic_service_helper.py,sha256=vgIAY9z4zCBJA2riG0nGKyLZ1bWhXSSoM01riDEu_cI,147464
|
|
10
10
|
assemblyline_v4_service/common/helper.py,sha256=Fgimk8DhnS23aijTGewA1HwvPoAM61UUbHlrGBnSzL0,3290
|
|
11
11
|
assemblyline_v4_service/common/icap.py,sha256=phT3CT5uII3Qm90Nzi4O-eDkQ2jmr3zHcVVra4sqYSc,5376
|
|
12
12
|
assemblyline_v4_service/common/keytool_parse.py,sha256=e829hrNNG5LFw1kjLsYVZsafCm2S3NpgM6jBc6JKawY,2219
|
|
13
|
-
assemblyline_v4_service/common/ontology_helper.py,sha256=
|
|
13
|
+
assemblyline_v4_service/common/ontology_helper.py,sha256=uiwc5cfPDAesEDYKk7etzCMTGQNVwhNrO3mWLdB2520,7793
|
|
14
14
|
assemblyline_v4_service/common/request.py,sha256=p8A9boDZ6KuVxl3EdhvaU1D_5K6_gAVoIbJYDz8TzjA,9711
|
|
15
|
-
assemblyline_v4_service/common/result.py,sha256=
|
|
15
|
+
assemblyline_v4_service/common/result.py,sha256=0_ybxAQ_0W0pYo35Kr2EUgBMujQeGsgHbbbdfiLud88,29651
|
|
16
16
|
assemblyline_v4_service/common/safelist_helper.py,sha256=QHTuG8q52o3U307AADPgrIgug7aYFK2uQE4-EtWG3yQ,3037
|
|
17
17
|
assemblyline_v4_service/common/section_reducer.py,sha256=JJOT7eFfBn4hFJKHY9UeVEbHS-E8FpmQ_dPZC-dWla0,1513
|
|
18
18
|
assemblyline_v4_service/common/tag_helper.py,sha256=om3TVPY_XDeFDqVW2iUA349xbljSAy5tv667jCiA7JI,4186
|
|
@@ -45,9 +45,9 @@ assemblyline_v4_service/updater/__main__.py,sha256=9Os-u8Tf7MD73JSrUSPmOaErTgfve
|
|
|
45
45
|
assemblyline_v4_service/updater/app.py,sha256=Ass5DZtOCr0tdoRbLo7Qn8Ujlw8T8mUDroAaHxx2oMo,3198
|
|
46
46
|
assemblyline_v4_service/updater/gunicorn_config.py,sha256=p3j2KPBeD5jvMw9O5i7vAtlRgPSVVxIG9AO0DfN82J8,1247
|
|
47
47
|
assemblyline_v4_service/updater/helper.py,sha256=JD0gX3KHY-wvsFjTbWkT83F0d5Up3OfubMPinuNzbTQ,9069
|
|
48
|
-
assemblyline_v4_service/updater/updater.py,sha256=
|
|
49
|
-
assemblyline_v4_service-4.4.0.
|
|
50
|
-
assemblyline_v4_service-4.4.0.
|
|
51
|
-
assemblyline_v4_service-4.4.0.
|
|
52
|
-
assemblyline_v4_service-4.4.0.
|
|
53
|
-
assemblyline_v4_service-4.4.0.
|
|
48
|
+
assemblyline_v4_service/updater/updater.py,sha256=vbMwxEXphJDeL3TG7sCEzgEgUMWWYa9tPIz-BW7Y4hQ,29237
|
|
49
|
+
assemblyline_v4_service-4.4.0.17.dist-info/LICENCE.md,sha256=NSkYo9EH8h5oOkzg4VhjAHF4339MqPP2cQ8msTPgl-c,1396
|
|
50
|
+
assemblyline_v4_service-4.4.0.17.dist-info/METADATA,sha256=FN1jwGpYC4E4dBGq_mvfMjiGGRBimiCWpXuYVWDfrCQ,9328
|
|
51
|
+
assemblyline_v4_service-4.4.0.17.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
|
52
|
+
assemblyline_v4_service-4.4.0.17.dist-info/top_level.txt,sha256=Ut5IqePObcxlJ8rv2--dOAzYbxzqlllfiV_51cbqjbA,24
|
|
53
|
+
assemblyline_v4_service-4.4.0.17.dist-info/RECORD,,
|
{assemblyline_v4_service-4.4.0.15.dist-info → assemblyline_v4_service-4.4.0.17.dist-info}/LICENCE.md
RENAMED
|
File without changes
|
{assemblyline_v4_service-4.4.0.15.dist-info → assemblyline_v4_service-4.4.0.17.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|