mirror of
https://github.com/mandiant/capa.git
synced 2025-12-23 15:37:37 -08:00
scripts: migrate-rules: parse ATT&CK from tag name
This commit is contained in:
@@ -89,13 +89,15 @@ def main(argv=None):
|
|||||||
|
|
||||||
rule.meta["namespace"] = row["proposed namespace"]
|
rule.meta["namespace"] = row["proposed namespace"]
|
||||||
|
|
||||||
rule.meta["att&ck"] = [
|
if row["ATT&CK"] != 'n/a' and row["ATT&CK"] != "":
|
||||||
row["ATT&CK"]
|
tag = row["ATT&CK"]
|
||||||
]
|
name, _, id = tag.rpartition(" ")
|
||||||
|
tag = "%s [%s]" % (name, id)
|
||||||
|
rule.meta["att&ck"] = [tag]
|
||||||
|
|
||||||
rule.meta["mbc"] = [
|
if row["MBC"] != 'n/a' and row["MBC"] != "":
|
||||||
row["MBC"]
|
tag = row["MBC"]
|
||||||
]
|
rule.meta["mbc"] = [tag]
|
||||||
|
|
||||||
for rule in rules.values():
|
for rule in rules.values():
|
||||||
namespace = rule.meta.get("namespace")
|
namespace = rule.meta.get("namespace")
|
||||||
|
|||||||
Reference in New Issue
Block a user