csle-attack-profiler 0.9.4__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 csle-attack-profiler might be problematic. Click here for more details.
- csle_attack_profiler/__init__.py +1 -0
- csle_attack_profiler/__version__.py +1 -0
- csle_attack_profiler/attack_profiler.py +204 -0
- csle_attack_profiler/hmm_profiling.py +448 -0
- csle_attack_profiler-0.9.4.dist-info/METADATA +409 -0
- csle_attack_profiler-0.9.4.dist-info/RECORD +8 -0
- csle_attack_profiler-0.9.4.dist-info/WHEEL +5 -0
- csle_attack_profiler-0.9.4.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from . __version__ import __version__
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '0.9.4'
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
from csle_common.dao.emulation_action.attacker.emulation_attacker_action \
|
|
2
|
+
import EmulationAttackerAction
|
|
3
|
+
from csle_common.dao.emulation_action.attacker.emulation_attacker_action_id \
|
|
4
|
+
import EmulationAttackerActionId
|
|
5
|
+
from csle_attack_profiler.dao.tactics import Tactics
|
|
6
|
+
from csle_attack_profiler.dao.attack_mapping import EmulationAttackerMapping
|
|
7
|
+
from csle_attack_profiler.dao.attack_graph import AttackGraph
|
|
8
|
+
from mitreattack.stix20 import MitreAttackData
|
|
9
|
+
from typing import List, Dict, Union
|
|
10
|
+
import os
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class AttackProfiler:
|
|
14
|
+
"""
|
|
15
|
+
Class representing the attack profile based on the MITRE ATT&CK framework for Enterprise.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
def __init__(self, techniques_tactics: Dict[str, List[str]], mitigations: Dict[str, List[str]],
|
|
19
|
+
data_sources: Dict[str, List[str]], subtechniques: Dict[str, str],
|
|
20
|
+
action_id: EmulationAttackerActionId) -> None:
|
|
21
|
+
"""
|
|
22
|
+
Class constructor
|
|
23
|
+
|
|
24
|
+
:params techniques_tactics: the techniques and tactics used by the attacker action.
|
|
25
|
+
The key is the technique and the value is the tactics
|
|
26
|
+
:params mitigations: the mitigations used by the attacker action. The key is the technique and the
|
|
27
|
+
value is the mitigations
|
|
28
|
+
:params data_sources: the data sources used by the attacker action. The key is the technqiue and the value is
|
|
29
|
+
the data sources
|
|
30
|
+
:params sub_techniques: the sub-techniques used by the attacker action. The key is the technique and
|
|
31
|
+
the value is the sub-techniques
|
|
32
|
+
:params action_id: the id of the attacker action
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
self.techniques_tactics = techniques_tactics
|
|
36
|
+
self.mitigations = mitigations
|
|
37
|
+
self.data_sources = data_sources
|
|
38
|
+
self.subtechniques = subtechniques
|
|
39
|
+
self.action_id = action_id
|
|
40
|
+
|
|
41
|
+
@staticmethod
|
|
42
|
+
def get_attack_profile(attacker_action: EmulationAttackerAction) -> 'AttackProfiler':
|
|
43
|
+
"""
|
|
44
|
+
Returns the attack profile of the actions
|
|
45
|
+
|
|
46
|
+
:params attacker_action: the attacker action
|
|
47
|
+
:return: the attack profile of the action
|
|
48
|
+
"""
|
|
49
|
+
current_dir = os.path.dirname(__file__)
|
|
50
|
+
path = os.path.join(current_dir, "./dao/enterprise-attack.json")
|
|
51
|
+
mitre_attack_data = MitreAttackData(path)
|
|
52
|
+
|
|
53
|
+
# Retrieve the id from the attacker action
|
|
54
|
+
attacker_id = attacker_action.id
|
|
55
|
+
# Get the defined tactics and techniques for the attack
|
|
56
|
+
attack_mapping = EmulationAttackerMapping.get_attack_info(attacker_id)
|
|
57
|
+
if attack_mapping is None:
|
|
58
|
+
return AttackProfiler({}, {}, {}, {}, EmulationAttackerActionId.CONTINUE)
|
|
59
|
+
|
|
60
|
+
attack_techniques_vals = [technique.value for technique in attack_mapping['techniques']]
|
|
61
|
+
|
|
62
|
+
attacker_action_id = attacker_action.id
|
|
63
|
+
techniques_tactics = {}
|
|
64
|
+
mitigations = {}
|
|
65
|
+
data_sources = {}
|
|
66
|
+
sub_techniques = {}
|
|
67
|
+
# Loop over the techniques associated with the attack
|
|
68
|
+
for technique_name in attack_techniques_vals:
|
|
69
|
+
# Get technique from MitreAttackData, stix_id maps to technique in the library.
|
|
70
|
+
try:
|
|
71
|
+
obj = mitre_attack_data.get_objects_by_name(technique_name, "attack-pattern")
|
|
72
|
+
except Exception as e:
|
|
73
|
+
os.system("echo 'Error in getting technique: {}'".format(e))
|
|
74
|
+
continue
|
|
75
|
+
technique = obj[0]
|
|
76
|
+
stix_id = technique.id
|
|
77
|
+
|
|
78
|
+
# Collect the tactics and add it to the dictionary
|
|
79
|
+
tactics = [phase['phase_name'] for phase in technique.kill_chain_phases]
|
|
80
|
+
techniques_tactics[technique_name] = tactics
|
|
81
|
+
|
|
82
|
+
# Add the data sources to the dictionary
|
|
83
|
+
if hasattr(technique, 'x_mitre_data_sources'):
|
|
84
|
+
data_sources[technique_name] = technique.x_mitre_data_sources
|
|
85
|
+
# Fetch the mitigations from the technique and add it to the dictionary
|
|
86
|
+
try:
|
|
87
|
+
mitigations_object = mitre_attack_data.get_mitigations_mitigating_technique(stix_id)
|
|
88
|
+
mitigations_list = [mitig['object']['name'] for mitig in mitigations_object]
|
|
89
|
+
mitigations[technique_name] = mitigations_list
|
|
90
|
+
except Exception as e:
|
|
91
|
+
os.system("echo 'Error in getting mitigations: {}'".format(e))
|
|
92
|
+
continue
|
|
93
|
+
|
|
94
|
+
# Add the sub-technique to the dictionary
|
|
95
|
+
if 'subtechniques' in attack_mapping:
|
|
96
|
+
sub_techniques_mapping = [sub_technique.value for sub_technique in attack_mapping['subtechniques']]
|
|
97
|
+
for st in sub_techniques_mapping:
|
|
98
|
+
try:
|
|
99
|
+
sub_technique_obj = mitre_attack_data.get_objects_by_name(st, "attack-pattern")
|
|
100
|
+
parent_technique_obj = mitre_attack_data.get_parent_technique_of_subtechnique(
|
|
101
|
+
sub_technique_obj[0].id)
|
|
102
|
+
sub_techniques[parent_technique_obj[0]['object'].name] = st
|
|
103
|
+
except Exception as e:
|
|
104
|
+
os.system("echo 'Error in getting sub-techniques: {}'".format(e))
|
|
105
|
+
continue
|
|
106
|
+
|
|
107
|
+
return AttackProfiler(techniques_tactics, mitigations, data_sources, sub_techniques, attacker_action_id)
|
|
108
|
+
|
|
109
|
+
@staticmethod
|
|
110
|
+
def get_attack_profile_sequence(attacker_actions: List[EmulationAttackerAction],
|
|
111
|
+
attack_graph: Union[AttackGraph, None] = None) -> List['AttackProfiler']:
|
|
112
|
+
"""
|
|
113
|
+
Returns the attack profile of the actions in a sequence
|
|
114
|
+
|
|
115
|
+
:params attacker_action: a list of attacker actions
|
|
116
|
+
|
|
117
|
+
:return: a list of attack profiles of the actions
|
|
118
|
+
"""
|
|
119
|
+
|
|
120
|
+
attack_profiles = []
|
|
121
|
+
for action in attacker_actions:
|
|
122
|
+
attack_profiles.append(AttackProfiler.get_attack_profile(action))
|
|
123
|
+
|
|
124
|
+
# IF attack graph is provided
|
|
125
|
+
if attack_graph:
|
|
126
|
+
|
|
127
|
+
node = attack_graph.get_root_node()
|
|
128
|
+
for profile in attack_profiles:
|
|
129
|
+
# Get the mappings of the techniques and tactics
|
|
130
|
+
techniques_tactics = profile.techniques_tactics
|
|
131
|
+
techniques_to_keep = []
|
|
132
|
+
children = attack_graph.get_children(node[0], node[2])
|
|
133
|
+
possible_nodes = []
|
|
134
|
+
# First we check the techniques in node we are currently at
|
|
135
|
+
for technique in techniques_tactics:
|
|
136
|
+
# If the node.name is in the techniques_tactics, add it to the techniques_to_keep
|
|
137
|
+
if node[0].value in techniques_tactics[technique]:
|
|
138
|
+
techniques_to_keep.append(technique)
|
|
139
|
+
if node not in possible_nodes:
|
|
140
|
+
possible_nodes.append(node)
|
|
141
|
+
if children is None:
|
|
142
|
+
continue
|
|
143
|
+
for child in children:
|
|
144
|
+
# Child is a list of tuples, where the first element is the node name,
|
|
145
|
+
# and the second element is the node id
|
|
146
|
+
for technique in techniques_tactics:
|
|
147
|
+
if child[0].value in techniques_tactics[technique]:
|
|
148
|
+
|
|
149
|
+
techniques_to_keep.append(technique)
|
|
150
|
+
# If the child is not in the possible_children, add it to the list.
|
|
151
|
+
if attack_graph.get_node(child[0], child[1]) not in possible_nodes:
|
|
152
|
+
p_node = attack_graph.get_node(child[0], child[1])
|
|
153
|
+
if p_node is not None:
|
|
154
|
+
possible_nodes.append(p_node)
|
|
155
|
+
|
|
156
|
+
# If the possible node is just one node, move to that node
|
|
157
|
+
if len(possible_nodes) == 1:
|
|
158
|
+
node = possible_nodes[0]
|
|
159
|
+
if not techniques_to_keep:
|
|
160
|
+
continue
|
|
161
|
+
# Remove the techniques and associated tactics, data sources,
|
|
162
|
+
# mitigations and sub-techniques that are not in the techniques_to_keep
|
|
163
|
+
techniques_to_remove = set(profile.techniques_tactics.keys()) - set(techniques_to_keep)
|
|
164
|
+
for technique in techniques_to_remove:
|
|
165
|
+
try:
|
|
166
|
+
del profile.techniques_tactics[technique]
|
|
167
|
+
del profile.mitigations[technique]
|
|
168
|
+
del profile.data_sources[technique]
|
|
169
|
+
del profile.subtechniques[technique]
|
|
170
|
+
except Exception as e:
|
|
171
|
+
os.system("echo 'Error in removing techniques: {}'".format(e))
|
|
172
|
+
continue
|
|
173
|
+
|
|
174
|
+
# ELSE Baseline conditions
|
|
175
|
+
else:
|
|
176
|
+
initial_access = False
|
|
177
|
+
for profile in attack_profiles:
|
|
178
|
+
techniques_tactics = profile.techniques_tactics
|
|
179
|
+
techniques_to_remove = set()
|
|
180
|
+
# Loop over the mappings of the techniques to tactics
|
|
181
|
+
for technique in techniques_tactics:
|
|
182
|
+
if Tactics.DISCOVERY.value in techniques_tactics[technique] and not initial_access:
|
|
183
|
+
techniques_to_remove.add(technique)
|
|
184
|
+
elif Tactics.RECONNAISSANCE.value in techniques_tactics[technique] and initial_access:
|
|
185
|
+
techniques_to_remove.add(technique)
|
|
186
|
+
if Tactics.INITIAL_ACCESS.value in techniques_tactics[technique] and not initial_access:
|
|
187
|
+
initial_access = True
|
|
188
|
+
elif Tactics.INITIAL_ACCESS.value in techniques_tactics[technique] and initial_access:
|
|
189
|
+
techniques_to_remove.add(technique)
|
|
190
|
+
elif Tactics.LATERAL_MOVEMENT.value in techniques_tactics[technique] and not initial_access:
|
|
191
|
+
techniques_to_remove.add(technique)
|
|
192
|
+
|
|
193
|
+
# Remove the techniques and associated tactics, data sources, mitigations and sub-techniques
|
|
194
|
+
for technique in techniques_to_remove:
|
|
195
|
+
try:
|
|
196
|
+
del profile.techniques_tactics[technique]
|
|
197
|
+
del profile.mitigations[technique]
|
|
198
|
+
del profile.data_sources[technique]
|
|
199
|
+
del profile.subtechniques[technique]
|
|
200
|
+
except Exception as e:
|
|
201
|
+
os.system("echo 'Error in removing techniques: {}'".format(e))
|
|
202
|
+
continue
|
|
203
|
+
|
|
204
|
+
return attack_profiles
|
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
from typing import List, Union, Tuple, Any
|
|
2
|
+
import numpy as np
|
|
3
|
+
import sys
|
|
4
|
+
from csle_common.dao.system_identification.emulation_statistics import EmulationStatistics
|
|
5
|
+
from csle_common.dao.emulation_action.attacker.emulation_attacker_action_id import EmulationAttackerActionId
|
|
6
|
+
from csle_common.dao.emulation_action.attacker.emulation_attacker_action_type import EmulationAttackerActionType
|
|
7
|
+
from csle_common.dao.emulation_action.attacker.emulation_attacker_action_outcome import EmulationAttackerActionOutcome
|
|
8
|
+
from csle_common.dao.emulation_action.attacker.emulation_attacker_action import EmulationAttackerAction
|
|
9
|
+
from csle_attack_profiler.attack_profiler import AttackProfiler
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class HMMProfiler:
|
|
13
|
+
"""
|
|
14
|
+
The HMMProfiler class is used to profile a sequence of observations based on a Hidden Markov Model (HMM).
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
def __init__(self, statistics: List[EmulationStatistics], model_name: Union[str, None] = None) -> None:
|
|
18
|
+
"""
|
|
19
|
+
Class constructor
|
|
20
|
+
|
|
21
|
+
:param statistics: The list of EmulationStatistics objects
|
|
22
|
+
:param model_name: The name of the model
|
|
23
|
+
:return: None
|
|
24
|
+
"""
|
|
25
|
+
self.statistics = statistics
|
|
26
|
+
self.transition_matrix: List[List[float]] = []
|
|
27
|
+
self.emission_matrix: List[List[float]] = []
|
|
28
|
+
self.hidden_states: List[str] = []
|
|
29
|
+
self.emission_matrix_observations: List[int] = []
|
|
30
|
+
self.start_state_probs: List[float] = []
|
|
31
|
+
self.model_name = None
|
|
32
|
+
|
|
33
|
+
def create_model(self, transition_matrix: List[List[float]],
|
|
34
|
+
hidden_states: List[str], metric: str,
|
|
35
|
+
save_model: bool = False, location: str = ".") -> None:
|
|
36
|
+
"""
|
|
37
|
+
Creates the HMM model based on the given transition matrix, states and metrics.
|
|
38
|
+
If save = True, matrices are saved to given location
|
|
39
|
+
|
|
40
|
+
:param transition_matrix: The transition matrix
|
|
41
|
+
:param states: The list of states of the HMM (format: 'A:attack_name' or
|
|
42
|
+
'no_intrusion' based on emulation statistics file)
|
|
43
|
+
:param metrics: The list of metrics to profile
|
|
44
|
+
:param save: Whether to save the matrices to a file
|
|
45
|
+
:param location: The location to save the matrices, if save = True, e.g "./resources",
|
|
46
|
+
default is current directory
|
|
47
|
+
:return: None
|
|
48
|
+
"""
|
|
49
|
+
emission_matrix, emission_matrix_observations = self.get_matrices_of_observation(self.statistics,
|
|
50
|
+
metric, hidden_states)
|
|
51
|
+
self.emission_matrix = emission_matrix
|
|
52
|
+
self.emission_matrix_observations = emission_matrix_observations
|
|
53
|
+
self.transition_matrix = transition_matrix
|
|
54
|
+
self.start_state_probs = self.calculate_initial_states(self.transition_matrix)
|
|
55
|
+
self.hidden_states = hidden_states
|
|
56
|
+
if save_model and location:
|
|
57
|
+
np.save(f'{location}/transition_matrix.npy', transition_matrix)
|
|
58
|
+
np.save(f'{location}/hidden_states.npy', hidden_states)
|
|
59
|
+
np.save(f'{location}/start_state_probs.npy', self.start_state_probs)
|
|
60
|
+
np.save(f'{location}/emission_matrix_{metric}.npy', emission_matrix)
|
|
61
|
+
np.save(f'{location}/emission_matrix_observations_{metric}.npy', emission_matrix_observations)
|
|
62
|
+
|
|
63
|
+
def load_model(self, location: str, metric: str) -> None:
|
|
64
|
+
"""
|
|
65
|
+
Loads the HMM model from the given location.
|
|
66
|
+
|
|
67
|
+
:param location: The location of the model files, default is current directory
|
|
68
|
+
:return: None
|
|
69
|
+
"""
|
|
70
|
+
self.transition_matrix = np.load(f'{location}/transition_matrix.npy')
|
|
71
|
+
self.hidden_states = np.load(f'{location}/hidden_states.npy')
|
|
72
|
+
self.start_state_probs = np.load(f'{location}/start_state_probs.npy')
|
|
73
|
+
self.emission_matrix = np.load(f'{location}/emission_matrix_{metric}.npy')
|
|
74
|
+
self.emission_matrix_observations = np.load(f'{location}/emission_matrix_observations_{metric}.npy')
|
|
75
|
+
|
|
76
|
+
def profile_sequence(self, sequence: List[int]) -> List[str]:
|
|
77
|
+
"""
|
|
78
|
+
Profiles a sequence of observations based on the HMM model.
|
|
79
|
+
|
|
80
|
+
:param sequence: The sequence of observations
|
|
81
|
+
:return: The most likely sequence of states
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
path = HMMProfiler.viterbi(self.hidden_states, self.start_state_probs,
|
|
85
|
+
self.transition_matrix, self.emission_matrix,
|
|
86
|
+
sequence, self.emission_matrix_observations)
|
|
87
|
+
profiled_sequence = []
|
|
88
|
+
for i in range(len(path)):
|
|
89
|
+
profiled_sequence.append(self.hidden_states[int(path[i])])
|
|
90
|
+
|
|
91
|
+
return profiled_sequence
|
|
92
|
+
|
|
93
|
+
def get_matrices_of_observation(self, statistics: List[EmulationStatistics],
|
|
94
|
+
metric: str, states: List[str]) -> Tuple[List[List[float]], List[int]]:
|
|
95
|
+
"""
|
|
96
|
+
Creates the emission matrix for a given metric based on the statistics from the EmulationStatistics objects.
|
|
97
|
+
|
|
98
|
+
:param statistics: The list of EmulationStatistics objects
|
|
99
|
+
:param metric: The metric to get the emission matrix for
|
|
100
|
+
:param states: The list of states
|
|
101
|
+
:return: The emission matrix, the list of observations, the list of states
|
|
102
|
+
"""
|
|
103
|
+
emission_matrix = []
|
|
104
|
+
attack_observations = {}
|
|
105
|
+
attack_observations_total_counts = {}
|
|
106
|
+
all_keys = set()
|
|
107
|
+
|
|
108
|
+
for stats in statistics:
|
|
109
|
+
for condition, metric_distribution in stats.conditionals_counts.items():
|
|
110
|
+
action = condition.split('_')
|
|
111
|
+
if action[0] == 'no':
|
|
112
|
+
action[0] = 'no_intrusion'
|
|
113
|
+
if action[0] not in attack_observations:
|
|
114
|
+
# We are not intrested in the observations from 'intrusion' or 'A:Continue'
|
|
115
|
+
if action[0] == 'intrusion' or action[0] == 'A:Continue':
|
|
116
|
+
continue
|
|
117
|
+
else:
|
|
118
|
+
# Add the observations of the attack to the dictionary
|
|
119
|
+
if metric in metric_distribution:
|
|
120
|
+
attack_observations[action[0]] = metric_distribution[metric]
|
|
121
|
+
# Sum the total counts of the observations
|
|
122
|
+
attack_observations_total_counts[action[0]] = sum(attack_observations[action[0]].values())
|
|
123
|
+
# Aggregate the counts from the metric distribution
|
|
124
|
+
else:
|
|
125
|
+
counts_observation = metric_distribution[metric]
|
|
126
|
+
for element in counts_observation:
|
|
127
|
+
if element in attack_observations[action[0]]:
|
|
128
|
+
# Aggregate the counts if the element is already in the dictionary
|
|
129
|
+
attack_observations[action[0]][element] += counts_observation[element]
|
|
130
|
+
else:
|
|
131
|
+
attack_observations[action[0]][element] = counts_observation[element]
|
|
132
|
+
# Sum the total counts of the observations
|
|
133
|
+
attack_observations_total_counts[action[0]] += sum(attack_observations[action[0]].values())
|
|
134
|
+
|
|
135
|
+
# Store all possible values for the observation
|
|
136
|
+
if action[0] in attack_observations:
|
|
137
|
+
all_keys.update(attack_observations[action[0]])
|
|
138
|
+
|
|
139
|
+
# Normalize the counts
|
|
140
|
+
for attack, _ in attack_observations.items():
|
|
141
|
+
attack_observations_total_counts[attack] = sum(attack_observations[attack].values())
|
|
142
|
+
for key in all_keys:
|
|
143
|
+
int_key = int(key)
|
|
144
|
+
if key in attack_observations[attack]:
|
|
145
|
+
count = attack_observations[attack].pop(key, 0)
|
|
146
|
+
attack_observations[attack][int_key] = count / attack_observations_total_counts[attack]
|
|
147
|
+
else:
|
|
148
|
+
attack_observations[attack][int_key] = 0
|
|
149
|
+
# Sort the dictionary by key
|
|
150
|
+
attack_observations[attack] = dict(sorted(attack_observations[attack].items()))
|
|
151
|
+
|
|
152
|
+
# Take any attack as the reference to get the keys
|
|
153
|
+
emission_matrix_observations = []
|
|
154
|
+
emission_matrix_states = []
|
|
155
|
+
# Create the emission matrix
|
|
156
|
+
for state in states:
|
|
157
|
+
if state in attack_observations:
|
|
158
|
+
# Normalize the and then append
|
|
159
|
+
emission_matrix.append(list(attack_observations[state].values()))
|
|
160
|
+
# Get the keys of all observations
|
|
161
|
+
emission_matrix_observations = list(attack_observations[state].keys())
|
|
162
|
+
emission_matrix_states.append(state)
|
|
163
|
+
else:
|
|
164
|
+
# LaPlace smoothing for missing observations
|
|
165
|
+
num_keys = len(all_keys)
|
|
166
|
+
laplace_probability = 1 / (num_keys + 2)
|
|
167
|
+
laplace_sum = laplace_probability * num_keys
|
|
168
|
+
laplace_probability_adj = laplace_probability / laplace_sum
|
|
169
|
+
emission_matrix.append([laplace_probability_adj] * num_keys)
|
|
170
|
+
emission_matrix_states.append(state)
|
|
171
|
+
|
|
172
|
+
# Check if the sum of the probabilities is 1
|
|
173
|
+
for i in range(len(emission_matrix)):
|
|
174
|
+
sum_prob = round(sum(emission_matrix[i]), 10)
|
|
175
|
+
if sum_prob != 1:
|
|
176
|
+
print(f'Sum of probabilities for state {emission_matrix_states[i]} is {sum_prob}')
|
|
177
|
+
|
|
178
|
+
return (emission_matrix, emission_matrix_observations)
|
|
179
|
+
|
|
180
|
+
def convert_states_to_profiles(self, states: List[str]) -> List[Union[AttackProfiler, str]]:
|
|
181
|
+
"""
|
|
182
|
+
Converts a list of states to a list of AttackProfiles.
|
|
183
|
+
|
|
184
|
+
:param states: The list of states to convert
|
|
185
|
+
:return: The list of EmulationAttackerActionId
|
|
186
|
+
"""
|
|
187
|
+
|
|
188
|
+
new_states: List[Union[AttackProfiler, str]] = []
|
|
189
|
+
for state in states:
|
|
190
|
+
if state == 'A:Continue':
|
|
191
|
+
action = EmulationAttackerAction(id=EmulationAttackerActionId.CONTINUE, name="Continue", cmds=[],
|
|
192
|
+
type=None, descr="CONTINUE", ips=[], index=0, action_outcome='')
|
|
193
|
+
p = AttackProfiler.get_attack_profile(action)
|
|
194
|
+
new_states.append(p)
|
|
195
|
+
elif state == 'A:CVE-2015-1427 exploit':
|
|
196
|
+
action = EmulationAttackerAction(
|
|
197
|
+
id=EmulationAttackerActionId.CVE_2015_1427_EXPLOIT, name="CVE-2015-1427 exploit", cmds=None,
|
|
198
|
+
type=EmulationAttackerActionType.EXPLOIT,
|
|
199
|
+
descr="Uses the CVE-2015-1427 vulnerability to "
|
|
200
|
+
"get remote code execution and then sets up a SSH backdoor"
|
|
201
|
+
"to upgrade the channel", index=None, ips=[],
|
|
202
|
+
action_outcome=EmulationAttackerActionOutcome.SHELL_ACCESS)
|
|
203
|
+
p = AttackProfiler.get_attack_profile(action)
|
|
204
|
+
new_states.append(p)
|
|
205
|
+
elif state == 'A:DVWA SQL Injection Exploit':
|
|
206
|
+
action = EmulationAttackerAction(
|
|
207
|
+
id=EmulationAttackerActionId.DVWA_SQL_INJECTION, name="DVWA SQL Injection Exploit",
|
|
208
|
+
cmds=None, type=EmulationAttackerActionType.EXPLOIT,
|
|
209
|
+
descr="Uses the DVWA SQL Injection exploit to extract secret passwords",
|
|
210
|
+
index=None, ips=[], action_outcome=EmulationAttackerActionOutcome.SHELL_ACCESS)
|
|
211
|
+
p = AttackProfiler.get_attack_profile(action)
|
|
212
|
+
new_states.append(p)
|
|
213
|
+
elif state == 'A:Install tools':
|
|
214
|
+
action = EmulationAttackerAction(
|
|
215
|
+
id=EmulationAttackerActionId.INSTALL_TOOLS, name="Install tools", cmds=None,
|
|
216
|
+
type=EmulationAttackerActionType.POST_EXPLOIT,
|
|
217
|
+
descr="If taken root on remote machine, installs pentest tools, e.g. nmap",
|
|
218
|
+
index=None, ips=[], action_outcome=EmulationAttackerActionOutcome.PIVOTING)
|
|
219
|
+
p = AttackProfiler.get_attack_profile(action)
|
|
220
|
+
new_states.append(p)
|
|
221
|
+
elif state == 'A:Network service login':
|
|
222
|
+
action = EmulationAttackerAction(
|
|
223
|
+
id=EmulationAttackerActionId.NETWORK_SERVICE_LOGIN, name="Network service login",
|
|
224
|
+
cmds=[], type=EmulationAttackerActionType.POST_EXPLOIT,
|
|
225
|
+
descr="Uses known credentials to login to network services on a server",
|
|
226
|
+
index=None, ips=None, action_outcome=EmulationAttackerActionOutcome.LOGIN)
|
|
227
|
+
p = AttackProfiler.get_attack_profile(action)
|
|
228
|
+
new_states.append(p)
|
|
229
|
+
elif state == 'A:Ping Scan':
|
|
230
|
+
action = EmulationAttackerAction(
|
|
231
|
+
id=EmulationAttackerActionId.PING_SCAN_HOST, name="Ping Scan",
|
|
232
|
+
cmds=None, type=EmulationAttackerActionType.RECON,
|
|
233
|
+
descr="A host discovery scan, it is quick because it only checks of hosts "
|
|
234
|
+
"are up with Ping, without scanning the ports.", ips=None, index=None,
|
|
235
|
+
action_outcome=EmulationAttackerActionOutcome.INFORMATION_GATHERING, backdoor=False)
|
|
236
|
+
p = AttackProfiler.get_attack_profile(action)
|
|
237
|
+
new_states.append(p)
|
|
238
|
+
elif state == 'A:Sambacry Explolit':
|
|
239
|
+
action = EmulationAttackerAction(
|
|
240
|
+
id=EmulationAttackerActionId.SAMBACRY_EXPLOIT, name="Sambacry Explolit", cmds=None,
|
|
241
|
+
type=EmulationAttackerActionType.EXPLOIT,
|
|
242
|
+
descr="Uses the sambacry shell to get remote code execution and then"
|
|
243
|
+
"sets up a SSH backdoor to upgrade the channel",
|
|
244
|
+
index=None, ips=[], action_outcome=EmulationAttackerActionOutcome.SHELL_ACCESS)
|
|
245
|
+
p = AttackProfiler.get_attack_profile(action)
|
|
246
|
+
new_states.append(p)
|
|
247
|
+
elif state == 'A:ShellShock Explolit':
|
|
248
|
+
action = EmulationAttackerAction(
|
|
249
|
+
id=EmulationAttackerActionId.SHELLSHOCK_EXPLOIT, name="ShellShock Explolit",
|
|
250
|
+
cmds=None, type=EmulationAttackerActionType.EXPLOIT,
|
|
251
|
+
descr="Uses the Shellshock exploit and curl to do remote code execution and create a backdoor",
|
|
252
|
+
index=None, ips=[], action_outcome=EmulationAttackerActionOutcome.SHELL_ACCESS)
|
|
253
|
+
p = AttackProfiler.get_attack_profile(action)
|
|
254
|
+
new_states.append(p)
|
|
255
|
+
elif state == 'A:SSH dictionary attack for username=pw':
|
|
256
|
+
action = EmulationAttackerAction(
|
|
257
|
+
id=EmulationAttackerActionId.SSH_SAME_USER_PASS_DICTIONARY_HOST,
|
|
258
|
+
name="SSH dictionary attack for username=pw", cmds=None,
|
|
259
|
+
type=EmulationAttackerActionType.EXPLOIT, index=None,
|
|
260
|
+
descr="A dictionary attack that tries common passwords and usernames for SSH"
|
|
261
|
+
"where username=password", ips=None,
|
|
262
|
+
action_outcome=EmulationAttackerActionOutcome.SHELL_ACCESS)
|
|
263
|
+
p = AttackProfiler.get_attack_profile(action)
|
|
264
|
+
new_states.append(p)
|
|
265
|
+
elif state == 'A:FTP dictionary attack for username=pw':
|
|
266
|
+
action = EmulationAttackerAction(
|
|
267
|
+
id=EmulationAttackerActionId.FTP_SAME_USER_PASS_DICTIONARY_HOST,
|
|
268
|
+
name="FTP dictionary attack for username=pw", cmds=None, type=EmulationAttackerActionType.EXPLOIT,
|
|
269
|
+
index=None, descr="A dictionary attack that tries common passwords and"
|
|
270
|
+
"usernames for FTP where username=password", ips=None,
|
|
271
|
+
action_outcome=EmulationAttackerActionOutcome.SHELL_ACCESS)
|
|
272
|
+
p = AttackProfiler.get_attack_profile(action)
|
|
273
|
+
new_states.append(p)
|
|
274
|
+
elif state == 'A:Telnet dictionary attack for username=pw':
|
|
275
|
+
action = EmulationAttackerAction(
|
|
276
|
+
id=EmulationAttackerActionId.TELNET_SAME_USER_PASS_DICTIONARY_HOST,
|
|
277
|
+
name="Telnet dictionary attack for username=pw", cmds=None,
|
|
278
|
+
type=EmulationAttackerActionType.EXPLOIT, index=None,
|
|
279
|
+
descr="A dictionary attack that tries common passwords and usernames for"
|
|
280
|
+
"Telnet where username=password", ips=None,
|
|
281
|
+
action_outcome=EmulationAttackerActionOutcome.SHELL_ACCESS)
|
|
282
|
+
p = AttackProfiler.get_attack_profile(action)
|
|
283
|
+
new_states.append(p)
|
|
284
|
+
elif state == 'A:CVE-2010-0426 exploit':
|
|
285
|
+
action = EmulationAttackerAction(
|
|
286
|
+
id=EmulationAttackerActionId.CVE_2010_0426_PRIV_ESC,
|
|
287
|
+
name="CVE-2010-0426 exploit", cmds=None, type=EmulationAttackerActionType.PRIVILEGE_ESCALATION,
|
|
288
|
+
descr="Uses the CVE-2010-0426 vulnerability to perform privilege escalation to get root access",
|
|
289
|
+
index=None, ips=[], action_outcome=EmulationAttackerActionOutcome.PRIVILEGE_ESCALATION_ROOT)
|
|
290
|
+
p = AttackProfiler.get_attack_profile(action)
|
|
291
|
+
new_states.append(p)
|
|
292
|
+
elif state == 'A:TCP SYN (Stealth) Scan':
|
|
293
|
+
action = EmulationAttackerAction(
|
|
294
|
+
id=EmulationAttackerActionId.TCP_SYN_STEALTH_SCAN_HOST, name="TCP SYN (Stealth) Scan",
|
|
295
|
+
cmds=None, type=EmulationAttackerActionType.RECON,
|
|
296
|
+
descr="A stealthy and fast TCP SYN scan to detect open TCP ports on the subnet", ips=None,
|
|
297
|
+
index=None, action_outcome=EmulationAttackerActionOutcome.INFORMATION_GATHERING, backdoor=False)
|
|
298
|
+
p = AttackProfiler.get_attack_profile(action)
|
|
299
|
+
new_states.append(p)
|
|
300
|
+
elif state == 'ssh backdoor':
|
|
301
|
+
action = EmulationAttackerAction(
|
|
302
|
+
id=EmulationAttackerActionId.SSH_BACKDOOR, name="Install SSH backdoor",
|
|
303
|
+
cmds=None, type=EmulationAttackerActionType.POST_EXPLOIT,
|
|
304
|
+
descr="If taken root on remote machine, installs a ssh backdoor useful for"
|
|
305
|
+
"upgrading telnetor weaker channels", index=None, ips=[],
|
|
306
|
+
action_outcome=EmulationAttackerActionOutcome.PIVOTING, alt_cmds=None, backdoor=True)
|
|
307
|
+
p = AttackProfiler.get_attack_profile(action)
|
|
308
|
+
new_states.append(p)
|
|
309
|
+
else:
|
|
310
|
+
new_states.append(state)
|
|
311
|
+
|
|
312
|
+
return new_states
|
|
313
|
+
|
|
314
|
+
def calculate_initial_states(self, transition_matrix: List[List[float]]) -> List[float]:
|
|
315
|
+
"""
|
|
316
|
+
Calculates the initial states probabilities based on the transition matrix.
|
|
317
|
+
|
|
318
|
+
1 / (# of states)
|
|
319
|
+
|
|
320
|
+
:param transition_matrix: The transition matrix
|
|
321
|
+
:return: The start states probabilities
|
|
322
|
+
"""
|
|
323
|
+
start_states = []
|
|
324
|
+
total_states = len(transition_matrix)
|
|
325
|
+
for _ in range(total_states):
|
|
326
|
+
start_states.append(1 / total_states)
|
|
327
|
+
|
|
328
|
+
return start_states
|
|
329
|
+
|
|
330
|
+
@staticmethod
|
|
331
|
+
def viterbi(hidden_states: List[EmulationAttackerActionId], init_probs: List[float],
|
|
332
|
+
trans_matrix: List[List[float]], emission_matrix: List[List[float]],
|
|
333
|
+
obs: List[int], emissions_list: List[int]) -> List[float]:
|
|
334
|
+
"""
|
|
335
|
+
Viterbi algorithm for Hidden Markov Models (HMM).
|
|
336
|
+
|
|
337
|
+
:param hidden_states: The hidden states
|
|
338
|
+
:param init_probs: The initial probabilities of the hidden states
|
|
339
|
+
:param trans_matrix: The transition matrix
|
|
340
|
+
:param emission_matrix: The emission matrix
|
|
341
|
+
:param obs: The observation sequence
|
|
342
|
+
:param emissions_list: The list of possible observations
|
|
343
|
+
:return: The most likely sequence of hidden states
|
|
344
|
+
"""
|
|
345
|
+
# Convert the emissions list to a numpy array, to use the where function
|
|
346
|
+
emissions_list_typed: np.ndarray[int, Any] = np.array(emissions_list)
|
|
347
|
+
|
|
348
|
+
# Check that the sum equals 1
|
|
349
|
+
for i in range(len(emission_matrix)):
|
|
350
|
+
if round(sum(emission_matrix[i]), 10) != 1:
|
|
351
|
+
print(f'Sum of probabilities for state {hidden_states[i]} is not 1')
|
|
352
|
+
print(f'Sum of probabilities: {sum(emission_matrix[i])}')
|
|
353
|
+
|
|
354
|
+
# The number of hidden states
|
|
355
|
+
S = len(hidden_states)
|
|
356
|
+
# The number of observations
|
|
357
|
+
T = len(obs)
|
|
358
|
+
|
|
359
|
+
# The Viterbi matrix (prob) T x S matrix of zeroes
|
|
360
|
+
prob = np.zeros((T, S))
|
|
361
|
+
# The backpointer matrix (prev)
|
|
362
|
+
prev = np.empty((T, S))
|
|
363
|
+
# Initialization
|
|
364
|
+
for i in range(S):
|
|
365
|
+
# Fetch the index of the observation in the emission_matrix
|
|
366
|
+
index, = np.where(emissions_list_typed == obs[0])
|
|
367
|
+
if index[0].size > 0:
|
|
368
|
+
prob[0][i] = init_probs[i] * emission_matrix[i][index[0]]
|
|
369
|
+
else:
|
|
370
|
+
print(f'Observation {obs[0]} not found in the emission matrix')
|
|
371
|
+
sys.exit(1)
|
|
372
|
+
|
|
373
|
+
# Recursion
|
|
374
|
+
for t in range(1, T):
|
|
375
|
+
index, = np.where(emissions_list_typed == obs[t])
|
|
376
|
+
for i in range(S):
|
|
377
|
+
max_prob = -1
|
|
378
|
+
max_state = -1
|
|
379
|
+
for j in range(S):
|
|
380
|
+
new_prob = prob[t - 1][j] * trans_matrix[j][i] * emission_matrix[i][index[0]]
|
|
381
|
+
if new_prob > max_prob:
|
|
382
|
+
max_prob = new_prob
|
|
383
|
+
max_state = j
|
|
384
|
+
prob[t][i] = max_prob
|
|
385
|
+
prev[t][i] = max_state
|
|
386
|
+
|
|
387
|
+
path = np.zeros(T)
|
|
388
|
+
path[T - 1] = np.argmax(prob[T - 1])
|
|
389
|
+
for t in range(T - 2, -1, -1):
|
|
390
|
+
path[t] = prev[t + 1][int(path[t + 1])]
|
|
391
|
+
# Convert the path to a list
|
|
392
|
+
typed_path: List[float] = path.tolist()
|
|
393
|
+
|
|
394
|
+
return typed_path
|
|
395
|
+
|
|
396
|
+
def generate_sequence(self, intrusion_length: int, initial_state_index: int,
|
|
397
|
+
seed: Union[int, None] = None) -> Tuple[List[str], List[int]]:
|
|
398
|
+
"""
|
|
399
|
+
Generates a sequence of states and corresponding observations based on the given emission matrix,
|
|
400
|
+
and transition matrix. First, a sequence of observation from 'no intrusion' is generated
|
|
401
|
+
based on the geometric distribution of the initial state. Then, a sequence observations and states are
|
|
402
|
+
generated based on emission matrix and transition matrix. The length of this intrusion
|
|
403
|
+
sequence is given by the intrusion_length parameter.
|
|
404
|
+
|
|
405
|
+
:param intrusion_length: The length of the intrusion
|
|
406
|
+
:param initial_state_index: The index of the initial state
|
|
407
|
+
:param seed: The seed for the random number generator
|
|
408
|
+
return: The sequence of states and observations
|
|
409
|
+
"""
|
|
410
|
+
|
|
411
|
+
P_obs = self.emission_matrix
|
|
412
|
+
P_states = self.transition_matrix
|
|
413
|
+
states = self.hidden_states
|
|
414
|
+
observations = self.emission_matrix_observations
|
|
415
|
+
|
|
416
|
+
if seed:
|
|
417
|
+
np.random.seed(seed)
|
|
418
|
+
obs_len = len(observations)
|
|
419
|
+
states_len = len(states)
|
|
420
|
+
# Return the geometric distribution of the initial state
|
|
421
|
+
dist = np.random.geometric(p=P_states[initial_state_index][0], size=1000)
|
|
422
|
+
T_i = round(sum(dist) / len(dist))
|
|
423
|
+
|
|
424
|
+
state_seq = [states[initial_state_index]] * T_i
|
|
425
|
+
obs_seq = []
|
|
426
|
+
for i in range(T_i):
|
|
427
|
+
o_i = np.random.choice(obs_len, p=P_obs[initial_state_index])
|
|
428
|
+
obs_seq.append(observations[o_i])
|
|
429
|
+
|
|
430
|
+
recon_states_sum = np.sum(P_states[initial_state_index][1:])
|
|
431
|
+
recon_states = P_states[initial_state_index][1:] / recon_states_sum
|
|
432
|
+
|
|
433
|
+
intrusion_start_state = np.random.choice(states_len - 1, p=recon_states) + 1
|
|
434
|
+
intrusion_start_observation = np.random.choice(obs_len, p=P_obs[intrusion_start_state])
|
|
435
|
+
state_seq.append(states[intrusion_start_state])
|
|
436
|
+
obs_seq.append(observations[intrusion_start_observation])
|
|
437
|
+
|
|
438
|
+
s_i = intrusion_start_state
|
|
439
|
+
if intrusion_length == 1:
|
|
440
|
+
return state_seq, obs_seq
|
|
441
|
+
for i in range(intrusion_length - 1):
|
|
442
|
+
# si ~ Ps(si | si-1)
|
|
443
|
+
s_i = np.random.choice(states_len, p=P_states[s_i])
|
|
444
|
+
# oi ~ Po(oi | si)
|
|
445
|
+
o_i = np.random.choice(obs_len, p=P_obs[s_i])
|
|
446
|
+
state_seq.append(states[s_i])
|
|
447
|
+
obs_seq.append(observations[o_i])
|
|
448
|
+
return state_seq, obs_seq
|
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: csle-attack-profiler
|
|
3
|
+
Version: 0.9.4
|
|
4
|
+
Summary: Library with MITRE attack profiler for CSLE
|
|
5
|
+
Author: Bength Pappila
|
|
6
|
+
Author-email: brpa@kth.se
|
|
7
|
+
Maintainer-email: Kim Hammar <kimham@kth.se>
|
|
8
|
+
License: ## creative commons
|
|
9
|
+
|
|
10
|
+
# Attribution-ShareAlike 4.0 International
|
|
11
|
+
|
|
12
|
+
Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
|
|
13
|
+
|
|
14
|
+
### Using Creative Commons Public Licenses
|
|
15
|
+
|
|
16
|
+
Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
|
|
17
|
+
|
|
18
|
+
* __Considerations for licensors:__ Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. [More considerations for licensors](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensors).
|
|
19
|
+
|
|
20
|
+
* __Considerations for the public:__ By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. [More considerations for the public](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensees).
|
|
21
|
+
|
|
22
|
+
## Creative Commons Attribution-ShareAlike 4.0 International Public License
|
|
23
|
+
|
|
24
|
+
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
|
|
25
|
+
|
|
26
|
+
### Section 1 – Definitions.
|
|
27
|
+
|
|
28
|
+
a. __Adapted Material__ means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
|
|
29
|
+
|
|
30
|
+
b. __Adapter's License__ means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
|
|
31
|
+
|
|
32
|
+
c. __BY-SA Compatible License__ means a license listed at [creativecommons.org/compatiblelicenses](http://creativecommons.org/compatiblelicenses), approved by Creative Commons as essentially the equivalent of this Public License.
|
|
33
|
+
|
|
34
|
+
d. __Copyright and Similar Rights__ means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
|
|
35
|
+
|
|
36
|
+
e. __Effective Technological Measures__ means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
|
|
37
|
+
|
|
38
|
+
f. __Exceptions and Limitations__ means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
|
|
39
|
+
|
|
40
|
+
g. __License Elements__ means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike.
|
|
41
|
+
|
|
42
|
+
h. __Licensed Material__ means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
|
|
43
|
+
|
|
44
|
+
i. __Licensed Rights__ means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
|
|
45
|
+
|
|
46
|
+
j. __Licensor__ means the individual(s) or entity(ies) granting rights under this Public License.
|
|
47
|
+
|
|
48
|
+
k. __Share__ means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
|
|
49
|
+
|
|
50
|
+
l. __Sui Generis Database Rights__ means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
|
|
51
|
+
|
|
52
|
+
m. __You__ means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
|
|
53
|
+
|
|
54
|
+
### Section 2 – Scope.
|
|
55
|
+
|
|
56
|
+
a. ___License grant.___
|
|
57
|
+
|
|
58
|
+
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
|
|
59
|
+
|
|
60
|
+
A. reproduce and Share the Licensed Material, in whole or in part; and
|
|
61
|
+
|
|
62
|
+
B. produce, reproduce, and Share Adapted Material.
|
|
63
|
+
|
|
64
|
+
2. __Exceptions and Limitations.__ For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
|
|
65
|
+
|
|
66
|
+
3. __Term.__ The term of this Public License is specified in Section 6(a).
|
|
67
|
+
|
|
68
|
+
4. __Media and formats; technical modifications allowed.__ The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
|
|
69
|
+
|
|
70
|
+
5. __Downstream recipients.__
|
|
71
|
+
|
|
72
|
+
A. __Offer from the Licensor – Licensed Material.__ Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
|
|
73
|
+
|
|
74
|
+
B. __Additional offer from the Licensor – Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply.
|
|
75
|
+
|
|
76
|
+
C. __No downstream restrictions.__ You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
|
|
77
|
+
|
|
78
|
+
6. __No endorsement.__ Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
|
|
79
|
+
|
|
80
|
+
b. ___Other rights.___
|
|
81
|
+
|
|
82
|
+
1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
|
|
83
|
+
|
|
84
|
+
2. Patent and trademark rights are not licensed under this Public License.
|
|
85
|
+
|
|
86
|
+
3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.
|
|
87
|
+
|
|
88
|
+
### Section 3 – License Conditions.
|
|
89
|
+
|
|
90
|
+
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
|
|
91
|
+
|
|
92
|
+
a. ___Attribution.___
|
|
93
|
+
|
|
94
|
+
1. If You Share the Licensed Material (including in modified form), You must:
|
|
95
|
+
|
|
96
|
+
A. retain the following if it is supplied by the Licensor with the Licensed Material:
|
|
97
|
+
|
|
98
|
+
i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
|
|
99
|
+
|
|
100
|
+
ii. a copyright notice;
|
|
101
|
+
|
|
102
|
+
iii. a notice that refers to this Public License;
|
|
103
|
+
|
|
104
|
+
iv. a notice that refers to the disclaimer of warranties;
|
|
105
|
+
|
|
106
|
+
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
|
|
107
|
+
|
|
108
|
+
B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
|
|
109
|
+
|
|
110
|
+
C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
|
|
111
|
+
|
|
112
|
+
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
|
|
113
|
+
|
|
114
|
+
3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
|
|
115
|
+
|
|
116
|
+
b. ___ShareAlike.___
|
|
117
|
+
|
|
118
|
+
In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.
|
|
119
|
+
|
|
120
|
+
1. The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License.
|
|
121
|
+
|
|
122
|
+
2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.
|
|
123
|
+
|
|
124
|
+
3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply.
|
|
125
|
+
|
|
126
|
+
### Section 4 – Sui Generis Database Rights.
|
|
127
|
+
|
|
128
|
+
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
|
|
129
|
+
|
|
130
|
+
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database;
|
|
131
|
+
|
|
132
|
+
b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and
|
|
133
|
+
|
|
134
|
+
c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
|
|
135
|
+
|
|
136
|
+
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
|
|
137
|
+
|
|
138
|
+
### Section 5 – Disclaimer of Warranties and Limitation of Liability.
|
|
139
|
+
|
|
140
|
+
a. __Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.__
|
|
141
|
+
|
|
142
|
+
b. __To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.__
|
|
143
|
+
|
|
144
|
+
c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
|
|
145
|
+
|
|
146
|
+
### Section 6 – Term and Termination.
|
|
147
|
+
|
|
148
|
+
a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
|
|
149
|
+
|
|
150
|
+
b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
|
|
151
|
+
|
|
152
|
+
1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
|
|
153
|
+
|
|
154
|
+
2. upon express reinstatement by the Licensor.
|
|
155
|
+
|
|
156
|
+
For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
|
|
157
|
+
|
|
158
|
+
c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
|
|
159
|
+
|
|
160
|
+
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
|
|
161
|
+
|
|
162
|
+
### Section 7 – Other Terms and Conditions.
|
|
163
|
+
|
|
164
|
+
a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
|
|
165
|
+
|
|
166
|
+
b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.t stated herein are separate from and independent of the terms and conditions of this Public License.
|
|
167
|
+
|
|
168
|
+
### Section 8 – Interpretation.
|
|
169
|
+
|
|
170
|
+
a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
|
|
171
|
+
|
|
172
|
+
b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
|
|
173
|
+
|
|
174
|
+
c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
|
|
175
|
+
|
|
176
|
+
d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at [creativecommons.org/policies](http://creativecommons.org/policies), Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
|
|
180
|
+
|
|
181
|
+
Creative Commons may be contacted at creativecommons.org
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## Disclaimer
|
|
185
|
+
|
|
186
|
+
All code and software in this repository is for Educational purpose ONLY. Do not use it without permission. The usual
|
|
187
|
+
disclaimer applies, especially the fact that me (Kim Hammar) is not liable for any damages caused by direct or indirect
|
|
188
|
+
use of the information or functionality provided by these programs. The author or any Internet provider bears NO
|
|
189
|
+
responsibility for content or misuse of these programs or any derivatives thereof. By using these programs you accept
|
|
190
|
+
the fact that any damage (dataloss, system crash, system compromise, etc.)
|
|
191
|
+
caused by the use of these programs is not Kim Hammar's responsibility.
|
|
192
|
+
Project-URL: Homepage, https://limmen.dev/csle
|
|
193
|
+
Project-URL: Source, https://github.com/Limmen/csle
|
|
194
|
+
Keywords: Reinforcement-Learning,Cyber-Security,Markov-Games,Markov-Decision-Processes
|
|
195
|
+
Platform: unix
|
|
196
|
+
Platform: linux
|
|
197
|
+
Classifier: Programming Language :: Python :: 3
|
|
198
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
199
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
200
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
201
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
202
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
203
|
+
Classifier: Intended Audience :: Science/Research
|
|
204
|
+
Requires-Python: >=3.8
|
|
205
|
+
Description-Content-Type: text/markdown
|
|
206
|
+
Requires-Dist: mitreattack-python==2.0.14
|
|
207
|
+
Requires-Dist: csle-base==0.9.4
|
|
208
|
+
Requires-Dist: csle-common==0.9.4
|
|
209
|
+
Provides-Extra: test
|
|
210
|
+
Requires-Dist: pytest>=6.0; extra == "test"
|
|
211
|
+
Requires-Dist: pytest-cov>=2.0; extra == "test"
|
|
212
|
+
Requires-Dist: pytest-mock>=3.6.0; extra == "test"
|
|
213
|
+
Requires-Dist: pytest-grpc>=0.8.0; extra == "test"
|
|
214
|
+
Requires-Dist: grpcio>=1.69.0; extra == "test"
|
|
215
|
+
Requires-Dist: grpcio-tools>=1.69.0; extra == "test"
|
|
216
|
+
Requires-Dist: mypy>=1.7.0; extra == "test"
|
|
217
|
+
Requires-Dist: mypy-extensions>=1.0.0; extra == "test"
|
|
218
|
+
Requires-Dist: mypy-protobuf>=3.5.0; extra == "test"
|
|
219
|
+
Requires-Dist: types-PyYAML>=6.0.12.11; extra == "test"
|
|
220
|
+
Requires-Dist: types-paramiko>=3.2.0.0; extra == "test"
|
|
221
|
+
Requires-Dist: types-protobuf>=5.29.1.20250208; extra == "test"
|
|
222
|
+
Requires-Dist: types-requests>=2.31.0.1; extra == "test"
|
|
223
|
+
Requires-Dist: types-urllib3>=1.26.25.13; extra == "test"
|
|
224
|
+
Requires-Dist: flake8>=6.1.0; extra == "test"
|
|
225
|
+
Requires-Dist: flake8-rst-docstrings>=0.3.0; extra == "test"
|
|
226
|
+
Requires-Dist: tox>=4.24.1; extra == "test"
|
|
227
|
+
Requires-Dist: sphinx>=5.3.0; extra == "test"
|
|
228
|
+
Requires-Dist: sphinxcontrib-napoleon>=0.7; extra == "test"
|
|
229
|
+
Requires-Dist: sphinx-rtd-theme>=1.1.1; extra == "test"
|
|
230
|
+
Requires-Dist: twine>=6.1.0; extra == "test"
|
|
231
|
+
Requires-Dist: build>=0.10.0; extra == "test"
|
|
232
|
+
|
|
233
|
+
# `csle-attack-profiler`
|
|
234
|
+
|
|
235
|
+
Scripts and programs to profile attacks, attack sequences, and a probabilistic HMM profiler
|
|
236
|
+
using data from the csle platform, profiling attacks to MITRE ATT&CK techniques, and tactics.
|
|
237
|
+
|
|
238
|
+
[![PyPI version]] 0.5.1
|
|
239
|
+
![PyPI - Downloads] (https://pypi.org/project/csle-attack-profiler/)
|
|
240
|
+
|
|
241
|
+
## Requirements
|
|
242
|
+
|
|
243
|
+
- Python 3.8+
|
|
244
|
+
- `csle-common`
|
|
245
|
+
- `csle-base`
|
|
246
|
+
- `mitreattack-python`
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
## Development Requirement`
|
|
250
|
+
|
|
251
|
+
- Python 3.8+
|
|
252
|
+
- `flake8` (for linting)
|
|
253
|
+
- `flake8-rst-docstrings` (for linting docstrings)
|
|
254
|
+
- `tox` (for automated testing)
|
|
255
|
+
- `pytest` (for unit tests)
|
|
256
|
+
- `pytest-cov` (for unit test coverage)
|
|
257
|
+
- `mypy` (for static typing)
|
|
258
|
+
- `mypy-extensions` (for static typing)
|
|
259
|
+
- `mypy-protobuf` (for static typing)
|
|
260
|
+
- `types-PyYaml` (for static typing)
|
|
261
|
+
- `types-paramiko` (for static typing)
|
|
262
|
+
- `types-protobuf` (for static typing)
|
|
263
|
+
- `types-requests` (for static typing)
|
|
264
|
+
- `types-urllib3` (for static typing)
|
|
265
|
+
- `sphinx` (for API documentation)
|
|
266
|
+
- `sphinxcontrib-napoleon` (for API documentation)
|
|
267
|
+
- `sphinx-rtd-theme` (for API documentation)
|
|
268
|
+
- `pytest-mock` (for mocking tests)
|
|
269
|
+
- `pytest-grpc` (for grpc tests)
|
|
270
|
+
|
|
271
|
+
## Installation
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
# install from pip
|
|
275
|
+
pip install csle-attack-profiler==<version>
|
|
276
|
+
# local install from source
|
|
277
|
+
$ pip install -e csle-attack-profiler
|
|
278
|
+
# or (equivalently):
|
|
279
|
+
make install
|
|
280
|
+
# force upgrade deps
|
|
281
|
+
$ pip install -e csle-attack-profiler --upgrade
|
|
282
|
+
# git clone and install from source
|
|
283
|
+
git clone https://github.com/Limmen/csle
|
|
284
|
+
cd csle/simulation-system/libs/csle-attack-profiler
|
|
285
|
+
pip3 install -e .
|
|
286
|
+
# Install development dependencies
|
|
287
|
+
$ pip install -r requirements_dev.txt
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Development tools
|
|
291
|
+
|
|
292
|
+
Install all development tools at once:
|
|
293
|
+
```bash
|
|
294
|
+
make install_dev
|
|
295
|
+
```
|
|
296
|
+
or
|
|
297
|
+
```bash
|
|
298
|
+
pip install -r requirements_dev.txt
|
|
299
|
+
```
|
|
300
|
+
## API documentation
|
|
301
|
+
|
|
302
|
+
This section contains instructions for generating API documentation using `sphinx`.
|
|
303
|
+
|
|
304
|
+
### Latest Documentation
|
|
305
|
+
|
|
306
|
+
The latest documentation is available at [https://limmen.dev/csle/docs/csle-attack-profiler](https://limmen.dev/csle/docs/csle-attack-profiler)
|
|
307
|
+
|
|
308
|
+
### Generate API Documentation
|
|
309
|
+
|
|
310
|
+
First make sure that the `CSLE_HOME` environment variable is set:
|
|
311
|
+
```bash
|
|
312
|
+
echo $CSLE_HOME
|
|
313
|
+
```
|
|
314
|
+
Then generate the documentation with the commands:
|
|
315
|
+
```bash
|
|
316
|
+
cd docs
|
|
317
|
+
sphinx-apidoc -f -o source/ ../src/csle_attack_profiler/
|
|
318
|
+
make html
|
|
319
|
+
```
|
|
320
|
+
To update the official documentation at [https://limmen.dev/csle](https://limmen.dev/csle),
|
|
321
|
+
copy the generated HTML files to the documentation folder:
|
|
322
|
+
```bash
|
|
323
|
+
cp -r build/html ../../../../docs/_docs/csle-attack-profiler
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
To run all documentation commands at once, use the command:
|
|
327
|
+
```bash
|
|
328
|
+
make docs
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
## Static code analysis
|
|
332
|
+
|
|
333
|
+
To run the Python linter, execute the following command:
|
|
334
|
+
```
|
|
335
|
+
flake8 .
|
|
336
|
+
# or (equivalently):
|
|
337
|
+
make lint
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
To run the mypy type checker, execute the following command:
|
|
341
|
+
```
|
|
342
|
+
mypy .
|
|
343
|
+
# or (equivalently):
|
|
344
|
+
make types
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
## Unit tests
|
|
348
|
+
|
|
349
|
+
To run the unit tests, execute the following command:
|
|
350
|
+
```
|
|
351
|
+
pytest
|
|
352
|
+
# or (equivalently):
|
|
353
|
+
make unit_tests
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
To run tests of a specific test suite, execute the following command:
|
|
357
|
+
```
|
|
358
|
+
pytest -k "ClassName"
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
To generate a coverage report, execute the following command:
|
|
362
|
+
```
|
|
363
|
+
pytest --cov=csle_attack_profiler
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
## Run tests and code analysis in different python environments
|
|
367
|
+
|
|
368
|
+
To run tests and code analysis in different python environments, execute the following command:
|
|
369
|
+
|
|
370
|
+
```bash
|
|
371
|
+
tox
|
|
372
|
+
# or (equivalently):
|
|
373
|
+
make tests
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
## Create a new release and publish to PyPi
|
|
377
|
+
|
|
378
|
+
First build the package by executing:
|
|
379
|
+
```bash
|
|
380
|
+
python -m build
|
|
381
|
+
# or (equivalently)
|
|
382
|
+
make build
|
|
383
|
+
```
|
|
384
|
+
After running the command above, the built package is available at `./dist`.
|
|
385
|
+
|
|
386
|
+
Push the built package to PyPi by running:
|
|
387
|
+
```bash
|
|
388
|
+
python -m twine upload dist/*
|
|
389
|
+
# or (equivalently)
|
|
390
|
+
make push
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
To run all commands for the release at once, execute:
|
|
394
|
+
```bash
|
|
395
|
+
make release
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
## Author & Maintainer
|
|
399
|
+
|
|
400
|
+
Bength Pappila <brpa@kth.se>
|
|
401
|
+
|
|
402
|
+
## Copyright and license
|
|
403
|
+
|
|
404
|
+
[LICENSE](LICENSE.md)
|
|
405
|
+
|
|
406
|
+
Creative Commons
|
|
407
|
+
|
|
408
|
+
(C) 2024, Bength Pappila
|
|
409
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
csle_attack_profiler/__init__.py,sha256=C7_gE0lIQJ8Wh2jgU8C8P_xyvq76bKTf0gm8bGYhMBk,37
|
|
2
|
+
csle_attack_profiler/__version__.py,sha256=PrvpsFpxFfV-9CkerqH8w9aj7jp44ZzlQ22FXf5IOIk,22
|
|
3
|
+
csle_attack_profiler/attack_profiler.py,sha256=bYqSeItJkhswronvIRFPyvf1rtvUKEWPPF4K2t1JVqE,10535
|
|
4
|
+
csle_attack_profiler/hmm_profiling.py,sha256=cHE2wImgBJ3xwW33S0JcTwsiccstijR9uRMeBPXIT18,24167
|
|
5
|
+
csle_attack_profiler-0.9.4.dist-info/METADATA,sha256=s-B-_-PYsvG8fPylVkp_d_yvVYiTkRHLz6TpG-qvmo4,26732
|
|
6
|
+
csle_attack_profiler-0.9.4.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
|
|
7
|
+
csle_attack_profiler-0.9.4.dist-info/top_level.txt,sha256=OuI4zvPo3MQYLQ7Dqm32oM0V8rNdwHe9tjtngx2KVtA,21
|
|
8
|
+
csle_attack_profiler-0.9.4.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
csle_attack_profiler
|