Skip to content

Instantly share code, notes, and snippets.

@mgraeber-rc
Created March 31, 2020 17:44
Show Gist options
  • Save mgraeber-rc/344977ee3738bc4a45211b006fa44bbb to your computer and use it in GitHub Desktop.
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
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