From 111b762f23f65b7f09906e6e6e850cb8f8f42fd6 Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Mon, 25 Nov 2019 11:28:47 +0200 Subject: [PATCH] Report attack matrix headers now link to attack technique type description on mitre --- monkey/monkey_island/cc/services/attack/attack_schema.py | 8 ++++++++ .../ui/src/components/report-components/AttackReport.js | 2 +- .../attack/{Matrix.js => ReportMatrix.js} | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) rename monkey/monkey_island/cc/ui/src/components/report-components/attack/{Matrix.js => ReportMatrix.js} (96%) diff --git a/monkey/monkey_island/cc/services/attack/attack_schema.py b/monkey/monkey_island/cc/services/attack/attack_schema.py index 0bbbb5743..c7ff05f49 100644 --- a/monkey/monkey_island/cc/services/attack/attack_schema.py +++ b/monkey/monkey_island/cc/services/attack/attack_schema.py @@ -5,6 +5,7 @@ SCHEMA = { "execution": { "title": "Execution", "type": "object", + "link": "https://attack.mitre.org/tactics/TA0002/", "properties": { "T1059": { "title": "T1059 Command line interface", @@ -62,6 +63,7 @@ SCHEMA = { "defence_evasion": { "title": "Defence evasion", "type": "object", + "link": "https://attack.mitre.org/tactics/TA0005/", "properties": { "T1197": { "title": "T1197 BITS jobs", @@ -92,6 +94,7 @@ SCHEMA = { "credential_access": { "title": "Credential access", "type": "object", + "link": "https://attack.mitre.org/tactics/TA0006/", "properties": { "T1110": { "title": "T1110 Brute force", @@ -129,6 +132,7 @@ SCHEMA = { "discovery": { "title": "Discovery", "type": "object", + "link": "https://attack.mitre.org/tactics/TA0007/", "properties": { "T1018": { "title": "T1018 Remote System Discovery", @@ -163,6 +167,7 @@ SCHEMA = { "lateral_movement": { "title": "Lateral movement", "type": "object", + "link": "https://attack.mitre.org/tactics/TA0008/", "properties": { "T1210": { "title": "T1210 Exploitation of Remote services", @@ -203,6 +208,7 @@ SCHEMA = { "collection": { "title": "Collection", "type": "object", + "link": "https://attack.mitre.org/tactics/TA0009/", "properties": { "T1005": { "title": "T1005 Data from local system", @@ -218,6 +224,7 @@ SCHEMA = { "command_and_control": { "title": "Command and Control", "type": "object", + "link": "https://attack.mitre.org/tactics/TA0011/", "properties": { "T1090": { "title": "T1090 Connection proxy", @@ -248,6 +255,7 @@ SCHEMA = { "exfiltration": { "title": "Exfiltration", "type": "object", + "link": "https://attack.mitre.org/tactics/TA0010/", "properties": { "T1041": { "title": "T1041 Exfiltration Over Command and Control Channel", diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/AttackReport.js b/monkey/monkey_island/cc/ui/src/components/report-components/AttackReport.js index b57405fe0..be2ff34f5 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/AttackReport.js +++ b/monkey/monkey_island/cc/ui/src/components/report-components/AttackReport.js @@ -7,7 +7,7 @@ import '../../styles/report/AttackReport.scss' import AuthComponent from '../AuthComponent'; import {ScanStatus} from '../attack/techniques/Helpers'; import Collapse from '@kunukn/react-collapse'; -import Matrix from './attack/Matrix'; +import Matrix from './attack/ReportMatrix'; import T1210 from '../attack/techniques/T1210'; import T1197 from '../attack/techniques/T1197'; diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/attack/Matrix.js b/monkey/monkey_island/cc/ui/src/components/report-components/attack/ReportMatrix.js similarity index 96% rename from monkey/monkey_island/cc/ui/src/components/report-components/attack/Matrix.js rename to monkey/monkey_island/cc/ui/src/components/report-components/attack/ReportMatrix.js index 86fc641d8..cf1ca9140 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/attack/Matrix.js +++ b/monkey/monkey_island/cc/ui/src/components/report-components/attack/ReportMatrix.js @@ -19,7 +19,7 @@ class MatrixComponent extends React.Component { } let tech_type = this.state.schema.properties[type_key]; columns.push({ - Header: tech_type.title, + Header: () => ({tech_type.title}), id: type_key, accessor: x => MatrixComponent.renderTechnique(x[tech_type.title]), style: {'whiteSpace': 'unset'}