Skip to content

Commit cbcba2d

Browse files
authored
Merge pull request #651 from mitre-attack/ics-matrix
ICS Platform Matrix
2 parents 6d65d07 + 7b71c44 commit cbcba2d

2 files changed

Lines changed: 70 additions & 21 deletions

File tree

‎modules/matrices/matrices.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ def generate_platform_matrices(matrix, notes, side_menu_data=None):
6161
data["notes"].append(notes.get(matrix_id))
6262

6363
data["platforms"] = [
64-
{"name": platform, "path": matrices_config.platform_to_path[platform]} for platform in matrix["platforms"]
64+
{"name": platform, "path": matrices_config.platform_to_path[matrix["matrix"]][platform]}
65+
for platform in matrix["platforms"]
6566
]
6667
data["navigator_link"] = site_config.navigator_link
6768

@@ -139,7 +140,8 @@ def get_sub_matrices(matrix):
139140
domain_ms = ms[matrix["matrix"]]
140141
# get relevant techniques
141142
techniques = util.stixhelpers.get_techniques(domain_ms, matrix["matrix"])
142-
platform_techniques = util.buildhelpers.filter_techniques_by_platform(techniques, matrix["platforms"])
143+
filter_platforms = matrix.get("filter_platforms", matrix["platforms"])
144+
platform_techniques = util.buildhelpers.filter_techniques_by_platform(techniques, filter_platforms)
143145
platform_techniques = util.buildhelpers.filter_out_subtechniques(platform_techniques)
144146
platform_techniques = util.buildhelpers.filter_deprecated_revoked(platform_techniques)
145147
# get relevant tactics
@@ -194,7 +196,7 @@ def transform_technique(technique, tactic_id):
194196
obj["subtechniques"] = list(filter(lambda st: len(st) > 0, obj["subtechniques"]))
195197
# Filter subtechniques by platform
196198
obj["subtechniques"] = util.buildhelpers.filter_techniques_by_platform(
197-
obj["subtechniques"], matrix["platforms"]
199+
obj["subtechniques"], filter_platforms
198200
)
199201
# remove deprecated and revoked
200202
obj["subtechniques"] = util.buildhelpers.filter_deprecated_revoked(obj["subtechniques"])
@@ -224,9 +226,7 @@ def techniques_in_tactic(tactic_id):
224226
logger.warning(f"Tactic not found or missing shortname: {tactic_id}")
225227
return []
226228
# filter platform techniques to those inside of this tactic
227-
techniques = list(
228-
filter(lambda technique: shortname in phase_names(technique), platform_techniques)
229-
)
229+
techniques = list(filter(lambda technique: shortname in phase_names(technique), platform_techniques))
230230
# transform into format required by matrix macro
231231
return list(map(lambda t: transform_technique(t, tactic_id), techniques))
232232

‎modules/matrices/matrices_config.py‎

Lines changed: 64 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,48 @@
209209
"type": "local",
210210
"path": "ics",
211211
"matrix": "ics-attack",
212-
"platforms": [],
212+
"platforms": ["Embedded", "Windows", "Linux", "Network Devices"],
213+
# Keep platform links while showing all ICS techniques in the domain matrix.
214+
"filter_platforms": [],
213215
"descr": "Below are the tactics and techniques representing the MITRE ATT&CK<sup>&reg;</sup> Matrix for ICS.",
214-
"subtypes": [],
216+
"subtypes": [
217+
{
218+
"name": "Embedded",
219+
"type": "local",
220+
"matrix": "ics-attack",
221+
"path": "ics/embedded",
222+
"platforms": ["Embedded"],
223+
"descr": "Below are the tactics and techniques representing the MITRE ATT&CK<sup>&reg;</sup> Embedded platform for ICS.",
224+
"subtypes": [],
225+
},
226+
{
227+
"name": "Windows",
228+
"type": "local",
229+
"matrix": "ics-attack",
230+
"path": "ics/windows",
231+
"platforms": ["Windows"],
232+
"descr": "Below are the tactics and techniques representing the MITRE ATT&CK<sup>&reg;</sup> Windows platform for ICS.",
233+
"subtypes": [],
234+
},
235+
{
236+
"name": "Linux",
237+
"type": "local",
238+
"matrix": "ics-attack",
239+
"path": "ics/linux",
240+
"platforms": ["Linux"],
241+
"descr": "Below are the tactics and techniques representing the MITRE ATT&CK<sup>&reg;</sup> Linux platform for ICS.",
242+
"subtypes": [],
243+
},
244+
{
245+
"name": "Network Devices",
246+
"type": "local",
247+
"matrix": "ics-attack",
248+
"path": "ics/network-devices",
249+
"platforms": ["Network Devices"],
250+
"descr": "Below are the tactics and techniques representing the MITRE ATT&CK<sup>&reg;</sup> Network Devices platform for ICS.",
251+
"subtypes": [],
252+
},
253+
],
215254
},
216255
]
217256

@@ -224,17 +263,27 @@
224263
]
225264

226265
platform_to_path = {
227-
"PRE": "enterprise/pre",
228-
"Windows": "enterprise/windows",
229-
"macOS": "enterprise/macos",
230-
"Linux": "enterprise/linux",
231-
"Office Suite": "enterprise/cloud/officesuite",
232-
"Identity Provider": "enterprise/cloud/identityprovider",
233-
"SaaS": "enterprise/cloud/saas",
234-
"IaaS": "enterprise/cloud/iaas",
235-
"Network Devices": "enterprise/network-devices",
236-
"Containers": "enterprise/containers",
237-
"ESXi": "enterprise/esxi",
238-
"Android": "mobile/android",
239-
"iOS": "mobile/ios",
266+
"enterprise-attack": {
267+
"PRE": "enterprise/pre",
268+
"Windows": "enterprise/windows",
269+
"macOS": "enterprise/macos",
270+
"Linux": "enterprise/linux",
271+
"Office Suite": "enterprise/cloud/officesuite",
272+
"Identity Provider": "enterprise/cloud/identityprovider",
273+
"SaaS": "enterprise/cloud/saas",
274+
"IaaS": "enterprise/cloud/iaas",
275+
"Network Devices": "enterprise/network-devices",
276+
"Containers": "enterprise/containers",
277+
"ESXi": "enterprise/esxi",
278+
},
279+
"mobile-attack": {
280+
"Android": "mobile/android",
281+
"iOS": "mobile/ios",
282+
},
283+
"ics-attack": {
284+
"Embedded": "ics/embedded",
285+
"Windows": "ics/windows",
286+
"Linux": "ics/linux",
287+
"Network Devices": "ics/network-devices",
288+
},
240289
}

0 commit comments

Comments
 (0)