You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code should print the sub techniques of the first listed technique (Abuse Elevation Control Mechanism, at the moment): print(next(iter(attack.techniques)).sub_techniques)
However, it prints ALL the subtechniques of the entire Mitre ATT&CK framework.
The following code gets ALL the subtechniques as well: next(iter(next(iter(attack.groups)).techniques)).sub_techniques
It looks like every technique has the whole set of subtechniques as its child, instead of the correct subtechniques.
The text was updated successfully, but these errors were encountered:
I think technique.py sub_techniques property should be changed to something like this:
def sub_techniques(self):
from .sub_technique import SubTechnique
sub_techniques_ = []
for attack_obj in self.attack_objects['objects']:
if attack_obj.get('x_mitre_is_subtechnique'):
if self.id in attack_obj['external_references'][0]['external_id']:
sub_techniques_.append(attack_obj)
return sub_techniques_
It partially works, but there should a be a nicer and cleaner way to do it.
The following code should print the sub techniques of the first listed technique (Abuse Elevation Control Mechanism, at the moment):
print(next(iter(attack.techniques)).sub_techniques)
However, it prints ALL the subtechniques of the entire Mitre ATT&CK framework.
The following code gets ALL the subtechniques as well:
next(iter(next(iter(attack.groups)).techniques)).sub_techniques
It looks like every technique has the whole set of subtechniques as its child, instead of the correct subtechniques.
The text was updated successfully, but these errors were encountered: