Created
March 31, 2020 17:44
-
-
Save mgraeber-rc/344977ee3738bc4a45211b006fa44bbb to your computer and use it in GitHub Desktop.
Making the new sub-technique JSON a little more readable for me
This file contains 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
Invoke-WebRequest -Uri https://attack.mitre.org/docs/subtechniques/subtechniques-crosswalk.json | | |
Select-Object -ExpandProperty Content | | |
ConvertFrom-Json | | |
ForEach-Object { | |
$OldTID = Get-Member -InputObject $_ -MemberType NoteProperty -Name T* | | |
Select-Object -ExpandProperty Name; | |
[PSCustomObject] @{ OldTID = $OldTID; NewTID = $_.$OldTID[0].id; Explanation = $_.$OldTID[0].explanation } } | | |
Sort-Object NewTID, OldTID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment