-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MITRE ATT&CK® Navigator JSON and link
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
--- | ||
{%- comment -%}capture the entries that have MITRE ids assigned {%- endcomment -%} | ||
{%- assign techniques = '' | split: '' -%} | ||
{%- for gtfobin in site.gtfobins -%} | ||
{%- capture name -%}{%- include get_gtfobin_name.html path=gtfobin.path -%}{%- endcapture -%} | ||
{%- for function_item in gtfobin.functions -%} | ||
{%- assign function_name = function_item[0] -%} | ||
{%- assign function = function_item[1] -%} | ||
{%- for example in function -%} | ||
{%- if example.mitre -%} | ||
{%- capture item -%}{{ example.mitre }},{{ name }},{{ function_name }},{{ gtfobin.url | absolute_url }}{%- endcapture -%} | ||
{%- assign item = item | split: ',' -%} | ||
{%- assign techniques = techniques | push: item -%} | ||
{%- endif -%} | ||
{%- endfor -%} | ||
{%- endfor -%} | ||
{%- endfor -%} | ||
{ | ||
"name": {{ site.title | jsonify }}, | ||
"versions": { | ||
"attack": "15", | ||
"navigator": "5.0.1", | ||
"layer": "4.5" | ||
}, | ||
"links": [ | ||
{ | ||
"label": "GTFOBins", | ||
"url": {{ '/' | absolute_url | jsonify }} | ||
} | ||
], | ||
"layout": { | ||
"expandedSubtechniques": "annotated" | ||
}, | ||
"domain": "enterprise-attack", | ||
"filters": { | ||
"platforms": [ | ||
"Linux", | ||
"macOS" | ||
] | ||
}, | ||
"techniques": [ | ||
{%- assign techniques = techniques | group_by_exp: "item", "item[0]" -%} | ||
{%- for group in techniques -%} | ||
{%- assign technique = group.name -%} | ||
{%- assign gtfobins = '' | split: '' -%} | ||
{%- for item in group.items -%} | ||
{%- capture fields -%},{{ item[1] }},{{ item[2] }},{{ item[3] }}{%- endcapture -%} | ||
{%- assign gtfobins = gtfobins | push: fields -%} | ||
{%- endfor -%} | ||
{ | ||
"techniqueID": {{ technique | jsonify }}, | ||
"links": [ | ||
{%- assign gtfobins = gtfobins | uniq -%} | ||
{%- for gtfobin in gtfobins -%} | ||
{%- assign fields = gtfobin | split: ',' -%} | ||
{ | ||
"label": {{ fields[1] | jsonify }}, | ||
"url": {{ fields[3] | append: '#' | append: fields[2] | jsonify }} | ||
} | ||
{%- unless forloop.last -%},{%- endunless -%} | ||
{%- endfor -%} | ||
] | ||
} | ||
{%- unless forloop.last -%},{%- endunless -%} | ||
{%- endfor -%} | ||
] | ||
} |