INNER CODE UNIT · Python

parse_subtechniques

mitre-attack/attack-scripts · scripts/diff_stix.py:198

                def parse_subtechniques(data_store, new=False):
                    # parse dataStore sub-technique-of relationships
                    if new: 
                        for technique in list(data_store.query(attackTypeToStixFilter["technique"])):
                            self.new_id_to_technique[technique["id"]] = technique
                        self.new_subtechnique_of_rels += list(data_store.query([
                            Filter("type", "=", "relationship"),
                            Filter("relationship_type", "=", "subtechnique-of")
                        ]))
                    else:
                        for technique in list(data_store.query(attackTypeToStixFilter["technique"])):
                            self.old_id_to_technique[technique["id"]] = technique
                        self.old_subtechnique_of_rels += list(data_store.query([
                            Filter("type", "=", "relationship"),
                            Filter("relationship_type", "=", "subtechnique-of")
                        ]))

                # load data from directory according to domain

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…