mirror of
https://github.com/DISARMFoundation/DISARMframeworks.git
synced 2025-05-11 11:15:24 -04:00
add subtechniques to stix2 generator
This commit is contained in:
parent
0549123900
commit
8937d50328
5 changed files with 85 additions and 24 deletions
|
@ -11,7 +11,7 @@ from stix2 import (Bundle, AttackPattern, ThreatActor, IntrusionSet, Relationshi
|
|||
from stix2.properties import (ReferenceProperty, ListProperty, StringProperty, TimestampProperty, BooleanProperty, IntegerProperty)
|
||||
|
||||
import helpers
|
||||
from objects import tactic, technique, matrix, bundle
|
||||
from objects import tactic, technique, matrix, bundle, relationship
|
||||
from helpers import xlsx, file
|
||||
|
||||
|
||||
|
@ -25,18 +25,19 @@ def generate_disarm_stix():
|
|||
|
||||
tactics = tactic.make_disarm_tactics(data)
|
||||
techniques = technique.make_disarm_techniques(data)
|
||||
subtechniques = technique.make_disarm_subtechniques(data)
|
||||
subtechnique_relationships = relationship.make_disarm_subtechnique_relationships(techniques, subtechniques)
|
||||
navigator_matrix = matrix.make_disarm_matrix(tactics)
|
||||
|
||||
stix_objects = []
|
||||
stix_objects.append(tactics)
|
||||
stix_objects.append(techniques)
|
||||
stix_objects.append(subtechniques)
|
||||
stix_objects.append(subtechnique_relationships)
|
||||
stix_objects.append(navigator_matrix)
|
||||
|
||||
stix_objects = [item for sublist in stix_objects for item in sublist]
|
||||
|
||||
# for i in stix_objects:
|
||||
# print(i)
|
||||
|
||||
disarm_bundle = bundle.make_stix_bundle(stix_objects)
|
||||
|
||||
helpers.file.clean_output_dir()
|
||||
|
@ -44,6 +45,5 @@ def generate_disarm_stix():
|
|||
helpers.file.write_bundle(disarm_bundle, "DISARM")
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
generate_disarm_stix()
|
Loading…
Add table
Add a link
Reference in a new issue