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: layers/README.md
+14-26Lines changed: 14 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ This folder contains modules and scripts for working with ATT&CK Navigator layer
7
7
|:-------|:------------|
8
8
|[filter](core/filter.py)| Implements a basic [filter object](https://github.com/mitre-attack/attack-navigator/blob/develop/layers/LAYERFORMATv3.md#filter-object-properties). |
9
9
|[gradient](core/gradient.py)| Implements a basic [gradient object](https://github.com/mitre-attack/attack-navigator/blob/develop/layers/LAYERFORMATv3.md#gradient-object-properties). |
10
-
|[layer](core/layer.py)| Provides an interface for interacting with core module's layer representation. A further breakdown can be found in the corresponding section below. |
10
+
|[layer](core/layer.py)| Provides an interface for interacting with core module's layer representation. A further breakdown can be found in the corresponding [section](#Layer) below. |
11
11
|[layout](core/layout.py)| Implements a basic [layout object](https://github.com/mitre-attack/attack-navigator/blob/develop/layers/LAYERFORMATv3.md#layout-object-properties). |
12
12
|[legenditem](core/legenditem.py)| Implements a basic [legenditem object](https://github.com/mitre-attack/attack-navigator/blob/develop/layers/LAYERFORMATv3.md#legenditem-object-properties). |
13
13
|[metadata](core/metadata.py)| Implements a basic [metadata object](https://github.com/mitre-attack/attack-navigator/blob/develop/layers/LAYERFORMATv3.md#metadata-object-properties). |
@@ -16,17 +16,17 @@ This folder contains modules and scripts for working with ATT&CK Navigator layer
16
16
#### Manipulator Scripts
17
17
| script | description |
18
18
|:-------|:------------|
19
-
|[layerops](manipulators/layerops.py)| Provides a means by which to combine multiple ATT&CK layer objects in customized ways. A further breakdown can be found in the corresponding section below. |
19
+
|[layerops](manipulators/layerops.py)| Provides a means by which to combine multiple ATT&CK layer objects in customized ways. A further breakdown can be found in the corresponding [section](#layerops.py) below. |
20
20
21
21
#### Exporter Scripts
22
22
| script | description |
23
23
|:-------|:------------|
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 below. |
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
25
##### Utility Modules
26
26
| script | description |
27
27
|:-------|:------------|
28
-
|[excel_templates](exporters/excel_templates.py)| Provides a means by which to convert a matrix into a base excel template. |
29
-
|[matrix_gen](exporters/matrix_gen.py)| Provides a means by which to generate a matrix from raw data, either cached or from the ATT&CK TAXII server. |
28
+
|[excel_templates](exporters/excel_templates.py)| Provides a means by which to convert a matrix into a clean excel matrix template. |
29
+
|[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 collection. |
30
30
31
31
## Layer
32
32
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.
@@ -133,20 +133,14 @@ out_layer6.to_file("C:\demo_layer6.json") # Save combined co
133
133
## to_excel.py
134
134
to_excel.py provides the ToExcel class, which is a way to export an existing layer file as an Excel
135
135
spreadsheet. The ToExcel class has an optional parameter for the initialization function, that
136
-
tells the exporter to build the output matrix based on live data from cti-taxii.mitre.org. It
137
-
can also use cached subtechniques data. If neither of these is used, it will default to pulling from the
138
-
ATT&CK cti repo. If matrix template lacks elements included in a layer's technique listing, those
139
-
elements will not be visible in the output file.
136
+
tells the exporter what data source to use when building the output matrix. Valid options include using live data from cti-taxii.mitre.org, using data from the Mitre cti repository, or using a local collection.
140
137
141
138
##### ToExcel()
142
139
```python
143
-
x = ToExcel(domain='enterprise', server=False, local=None)
140
+
x = ToExcel(domain='enterprise', source='taxii', local=None)
144
141
```
145
142
The ToExcel constructor takes domain, server, and local arguments during instantiation. The domain can
146
-
be either 'enterprise' or 'mobile', and can be pulled from a layer file as `layer.domain`. The server
147
-
argument tells the matrix generation tool to use the `cti-taxii` server when building the matrix. The
148
-
local argument tells the matrix generation tool the path to a local stix repository to use when
149
-
constructing the matrix.
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 `repo` and `local` options indicate that it should use the repository and a local collection 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 collection.
150
144
151
145
##### .to_file() Method
152
146
```python
@@ -160,21 +154,15 @@ The to_xlsx method exports the layer file referenced as `layer`, as an excel fil
0 commit comments