Files
atomic-red-team/atomic_red_team/atomic_doc_template.md.erb
T

67 lines
2.0 KiB
Plaintext
Raw Normal View History

2018-05-10 13:26:34 -06:00
# <%= technique['identifier'] %> - <%= technique['name'] -%>
2018-05-10 14:10:42 -06:00
2018-05-10 14:10:12 -06:00
## [Description from ATT&CK](https://attack.mitre.org/wiki/Technique/<%= technique['identifier'] %>)
2018-05-10 14:13:35 -06:00
<blockquote><%= technique['description'] %></blockquote>
2018-05-10 13:26:34 -06:00
2018-05-10 14:11:34 -06:00
## Atomic Tests
2018-05-10 13:26:34 -06:00
<% atomic_yaml['atomic_tests'].each_with_index do |test, test_number| -%>
2018-05-10 13:32:31 -06:00
<% title = "Atomic Test ##{test_number+1} - #{test['name']}" %>
2018-05-10 13:45:18 -06:00
- [<%= title %>](#<%= title.downcase.gsub(/ /, '-').gsub(/[`~!@#$%^&*()+=<>?,.\/:;"'|{}\[\]\\–—]/, '') %>)
2018-05-10 13:52:48 -06:00
<% end %>
2018-05-10 13:32:31 -06:00
<% atomic_yaml['atomic_tests'].each_with_index do |test, test_number| -%>
2018-05-10 13:53:31 -06:00
<br/>
2018-05-10 13:54:12 -06:00
2018-05-10 13:32:31 -06:00
## Atomic Test #<%= test_number+1 %> - <%= test['name'] %>
2018-05-10 13:26:34 -06:00
<%= test['description'] -%>
**Supported Platforms:** <%= test['supported_platforms'].collect do |p|
case p
when 'macos'
'macOS'
when 'centos'
'CentOS'
else
p.capitalize
end
end.join(', ') %>
2018-05-10 13:26:34 -06:00
<% if test['input_arguments'].to_a.count > 0 %>
#### Inputs
| Name | Description | Type | Default Value |
|------|-------------|------|---------------|
2018-05-10 13:26:34 -06:00
<% test['input_arguments'].each do |arg_name, arg_options| -%>
| <%= arg_name %> | <%= arg_options['description'] %> | <%= arg_options['type'] %> | <%= arg_options['default'] %>|
2018-05-10 13:26:34 -06:00
<% end -%>
<% end -%>
<%- if test['executor']['name'] == 'manual' -%>
#### Run it with these steps! <%- if test['executor']['elevation_required'] -%> Elevation Required (e.g. root or admin) <%- end -%>
2019-09-03 09:20:59 -06:00
2018-05-10 13:26:34 -06:00
<%= test['executor']['steps'] %>
<%- else -%>
#### Run it with `<%= test['executor']['name'] %>`! <%- if test['executor']['elevation_required'] -%> Elevation Required (e.g. root or admin) <%- end -%>
2019-09-03 07:35:52 -06:00
2018-05-10 13:26:34 -06:00
```
2018-05-21 20:54:00 +02:00
<%= test['executor']['command'].to_s.strip %>
2018-05-10 13:26:34 -06:00
```
<%- end -%>
<%- if test['executor']['prereq_command'] != nil -%>
#### Commands to Check Prerequisites:
```
<%= test['executor']['prereq_command'].to_s.strip %>
```
<%- end -%>
<%- if test['executor']['cleanup_command'] != nil -%>
#### Cleanup Commands:
```
<%= test['executor']['cleanup_command'].to_s.strip %>
```
<%- end -%>
2018-05-10 13:53:31 -06:00
<br/>
<%- end -%>