Created
April 20, 2023 11:53
-
-
Save botlabsDev/9b8ca3643ad5334c67bcd64e0abd0b6d to your computer and use it in GitHub Desktop.
Microsoft threat actory taxonomy to misp format converter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import uuid | |
from pprint import pprint | |
import requests | |
# https://learn.microsoft.com/en-us/microsoft-365/security/intelligence/microsoft-threat-actor-naming?view=o365-worldwide | |
# https://www.microsoft.com/en-us/security/blog/2023/04/18/microsoft-shifts-to-a-new-threat-actor-naming-taxonomy/ | |
def main(): | |
URL = "https://raw.githubusercontent.com/microsoft/mstic/master/PublicFeeds/ThreatActorNaming/MicrosoftMapping.json" | |
r = requests.get(URL) | |
r.raise_for_status() | |
lcluster = [] | |
for entry in r.json(): | |
cluster = { | |
'value': entry["New name"], | |
'meta': { | |
'sector': entry["Origin/Threat"], | |
'synonyms': [entry["Previous name"]] + entry["Other names"], | |
'refs': [ | |
'https://learn.microsoft.com/en-us/microsoft-365/security/intelligence/microsoft-threat-actor-naming?view=o365-worldwide' | |
], | |
}, | |
'uuid': str(uuid.uuid5(uuid.UUID("76beed5f-7251-457e-8c2a-b45f7b589d3d"), f"{entry['New name']}")), | |
} | |
lcluster.append(cluster) | |
pprint(sorted(lcluster, key=lambda x: x["value"])) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment