mal-toolbox 0.3.3__tar.gz → 0.3.4__tar.gz
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.
- {mal_toolbox-0.3.3/mal_toolbox.egg-info → mal_toolbox-0.3.4}/PKG-INFO +1 -1
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4/mal_toolbox.egg-info}/PKG-INFO +1 -1
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/maltoolbox/__init__.py +2 -2
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/maltoolbox/attackgraph/query.py +16 -3
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/maltoolbox/language/languagegraph.py +3 -1
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/pyproject.toml +1 -1
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/AUTHORS +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/LICENSE +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/README.md +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/mal_toolbox.egg-info/SOURCES.txt +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/mal_toolbox.egg-info/dependency_links.txt +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/mal_toolbox.egg-info/entry_points.txt +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/mal_toolbox.egg-info/requires.txt +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/mal_toolbox.egg-info/top_level.txt +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/maltoolbox/__main__.py +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/maltoolbox/attackgraph/__init__.py +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/maltoolbox/attackgraph/analyzers/__init__.py +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/maltoolbox/attackgraph/analyzers/apriori.py +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/maltoolbox/attackgraph/attacker.py +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/maltoolbox/attackgraph/attackgraph.py +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/maltoolbox/attackgraph/node.py +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/maltoolbox/exceptions.py +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/maltoolbox/file_utils.py +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/maltoolbox/ingestors/__init__.py +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/maltoolbox/ingestors/neo4j.py +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/maltoolbox/language/__init__.py +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/maltoolbox/language/compiler/__init__.py +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/maltoolbox/language/compiler/mal_lexer.py +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/maltoolbox/language/compiler/mal_parser.py +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/maltoolbox/model.py +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/maltoolbox/translators/__init__.py +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/maltoolbox/translators/securicad.py +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/maltoolbox/translators/updater.py +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/setup.cfg +0 -0
- {mal_toolbox-0.3.3 → mal_toolbox-0.3.4}/tests/test_model.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: mal-toolbox
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: A collection of tools used to create MAL models and attack graphs.
|
|
5
5
|
Author-email: Andrei Buhaiu <buhaiu@kth.se>, Joakim Loxdal <loxdal@kth.se>, Nikolaos Kakouros <nkak@kth.se>, Jakob Nyberg <jaknyb@kth.se>, Giuseppe Nebbione <nebbione@kth.se>
|
|
6
6
|
License: Apache Software License
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: mal-toolbox
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: A collection of tools used to create MAL models and attack graphs.
|
|
5
5
|
Author-email: Andrei Buhaiu <buhaiu@kth.se>, Joakim Loxdal <loxdal@kth.se>, Nikolaos Kakouros <nkak@kth.se>, Jakob Nyberg <jaknyb@kth.se>, Giuseppe Nebbione <nebbione@kth.se>
|
|
6
6
|
License: Apache Software License
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
# MAL Toolbox v0.3.
|
|
2
|
+
# MAL Toolbox v0.3.4
|
|
3
3
|
# Copyright 2024, Andrei Buhaiu.
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -21,7 +21,7 @@ MAL-Toolbox Framework
|
|
|
21
21
|
"""
|
|
22
22
|
|
|
23
23
|
__title__ = "maltoolbox"
|
|
24
|
-
__version__ = "0.3.
|
|
24
|
+
__version__ = "0.3.4"
|
|
25
25
|
__authors__ = [
|
|
26
26
|
"Andrei Buhaiu",
|
|
27
27
|
"Giuseppe Nebbione",
|
|
@@ -46,13 +46,26 @@ def is_node_traversable_by_attacker(
|
|
|
46
46
|
|
|
47
47
|
match(node.type):
|
|
48
48
|
case 'or':
|
|
49
|
+
for parent in node.parents:
|
|
50
|
+
if parent.is_compromised_by(attacker):
|
|
51
|
+
logger.debug(
|
|
52
|
+
'"%s"(%d) is traversable because it is viable, and '
|
|
53
|
+
'of type "or", and its parent "%s(%d)" has already '
|
|
54
|
+
'been compromised.',
|
|
55
|
+
node.full_name,
|
|
56
|
+
node.id,
|
|
57
|
+
parent.full_name,
|
|
58
|
+
parent.id
|
|
59
|
+
)
|
|
60
|
+
return True
|
|
49
61
|
logger.debug(
|
|
50
|
-
'"%s"(%d) is traversable because it is
|
|
51
|
-
'of type "or"
|
|
62
|
+
'"%s"(%d) is not traversable because while it is '
|
|
63
|
+
'viable, and of type "or", none of its parents '
|
|
64
|
+
'have been compromised.',
|
|
52
65
|
node.full_name,
|
|
53
66
|
node.id
|
|
54
67
|
)
|
|
55
|
-
return
|
|
68
|
+
return False
|
|
56
69
|
|
|
57
70
|
case 'and':
|
|
58
71
|
for parent in node.parents:
|
|
@@ -34,8 +34,8 @@ def disaggregate_attack_step_full_name(
|
|
|
34
34
|
|
|
35
35
|
@dataclass
|
|
36
36
|
class Detector:
|
|
37
|
-
context: Context
|
|
38
37
|
name: Optional[str]
|
|
38
|
+
context: Context
|
|
39
39
|
type: Optional[str]
|
|
40
40
|
tprate: Optional[dict]
|
|
41
41
|
|
|
@@ -61,6 +61,8 @@ class Context(dict):
|
|
|
61
61
|
def __str__(self) -> str:
|
|
62
62
|
return str({label: asset.name for label, asset in self._context_dict.items()})
|
|
63
63
|
|
|
64
|
+
def __repr__(self) -> str:
|
|
65
|
+
return f"Context({str(self)}))"
|
|
64
66
|
|
|
65
67
|
@dataclass
|
|
66
68
|
class LanguageGraphAsset:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|