You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 11, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,8 @@
1
+
# v1.6 - 5 October 2020
2
+
## Improvements
3
+
- Added [layer to SVG](https://github.com/mitre-attack/attack-scripts/tree/master/layers#to_svgpy) converter. See issue [#1](https://github.com/mitre-attack/attack-scripts/issues/1).
4
+
- Added option to filter mappings by tactic in [technique_mappings_to_csv](technique_mappings_to_csv.py). See pull request [#46](https://github.com/mitre-attack/attack-scripts/pull/46).
5
+
1
6
# v1.5.2 - 2 September 2020
2
7
## Improvements
3
8
- Clarified documentation on creation of virtual environments for Windows compatibility.
Copy file name to clipboardExpand all lines: layers/README.md
+74-2Lines changed: 74 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,11 +22,18 @@ This folder contains modules and scripts for working with ATT&CK Navigator layer
22
22
| script | description |
23
23
|:-------|:------------|
24
24
|[to_excel](exporters/to_excel.py)| Provides a means by which to export an ATT&CK Layer to an excel file. A further breakdown can be found in the corresponding [section](#to_excel.py) below. |
25
+
|[to_svg](exporters/to_svg.py)| Provides a means by which to export an ATT&CK layer to an svg image file. A further breakdown can be found in the corresponding [section](#to_svg.py) below. This file also contains the `SVGConfig` object that can be used to configure the SVG export.|
25
26
##### Utility Modules
26
27
| script | description |
27
28
|:-------|:------------|
28
29
|[excel_templates](exporters/excel_templates.py)| Provides a means by which to convert a matrix into a clean excel matrix template. |
29
30
|[matrix_gen](exporters/matrix_gen.py)| Provides a means by which to generate a matrix from raw data, either from the ATT&CK TAXII server or from a local STIX Bundle. |
31
+
|[svg_templates](exporters/svg_templates.py)| Provides a means by which to convert a layer file into a marked up svg file. |
32
+
|[svg_objects](exporters/svg_objects.py)| Provides raw templates and supporting functionality for generating svg objects. |
33
+
##### Command Line Tools
34
+
| script | description |
35
+
|:-------|:------------|
36
+
|[layerExporter_cli.py](layerExporter_cli.py)| A commandline utility to export Layer files to excel or svg formats using the exporter tools. Run with `-h` for usage. |
30
37
31
38
## Layer
32
39
The Layer class provides format validation and read/write capabilities to aid in working with ATT&CK Navigator Layers in python. It is the primary interface through which other Layer-related classes defined in the core module should be used. The Layer class API and a usage example are below.
@@ -140,9 +147,9 @@ tells the exporter what data source to use when building the output matrix. Vali
140
147
x = ToExcel(domain='enterprise', source='taxii', local=None)
141
148
```
142
149
The ToExcel constructor takes domain, server, and local arguments during instantiation. The domain can
143
-
be either `enterprise` or `mobile`, and can be pulled directly from a layer file as `layer.domain`. The source argument tells the matrix generation tool which data source to use when building the matrix. `taxii` indicates that the tool should utilize the `cti-taxii` server when building the matrix, while the `local` option indicates that it should use a local bundle respectively. The local argument is only required if the source is set to `local`, in which case it should be a path to a local stix bundle.
150
+
be either `enterprise` or `mobile`, and can be pulled directly from a layer file as `layer.domain`. The source argument tells the matrix generation tool which data source to use when building the matrix. `taxii` indicates that the tool should utilize the official ATT&CK Taxii Server (`cti-taxii`) when building the matrix, while the `local` option indicates that it should use a local bundle respectively. The local argument is only required if the source is set to `local`, in which case it should be a path to a local stix bundle.
to_svg.py provides the ToSvg class, which is a way to export an existing layer file as an SVG image file. The ToSvg class, like the ToExcel class, has an optional parameter for the initialization function, that
176
+
tells the exporter what data source to use when building the output matrix. Valid options include using live data from cti-taxii.mitre.org or using a local STIX bundle.
177
+
178
+
##### ToSvg()
179
+
```python
180
+
x = ToSvg(domain='enterprise', source='taxii', local=None, config=None)
181
+
```
182
+
The ToSvg constructor, just like the ToExcel constructor, takes domain, server, and local arguments during instantiation. The domain can be either `enterprise` or `mobile`, and can be pulled directly from a layer file as `layer.domain`. The source argument tells the matrix generation tool which data source to use when building the matrix. `taxii` indicates that the tool should utilize the `cti-taxii` server when building the matrix, while the `local` option indicates that it should use a local bundle respectively. The local argument is only required if the source is set to `local`, in which case it should be a path to a local stix bundle. The `config` parameter is an optional SVGConfig object that can be used to configure the export as desired. If not provided, the configuration for the export will be set to default values.
183
+
184
+
##### SVGConfig()
185
+
```python
186
+
y = SVGConfig(width=8.5, height=11, headerHeight=1, unit="in", showSubtechniques="expanded",
The SVGConfig object is used to configure how an SVG export behaves. The defaults for each of the available values can be found in the declaration above, and a brief explanation for each field is included in the table below. The config object should be provided to the ToSvg object during instantiation, but if values need to be updated on the fly, the currently loaded configuration can be interacted with at `ToSvg().config`. The configuration can also be populated from a json file using the `.load_from_file(filename="path/to/file.json")` method, or stored to one using the `.save_to_file(filename="path/to/file.json)` method.
0 commit comments