From c77db77a1c6cdfd59850b24f0097f9b233c3e748 Mon Sep 17 00:00:00 2001
From: Shay Nehmad <shay.nehmad@guardicore.com>
Date: Sun, 15 Mar 2020 17:40:34 +0200
Subject: [PATCH] Initial commit - trying to improve the MITRE UI according to
 comments

---
 .../attack/technique_reports/__init__.py      |  9 ++++++++
 .../report-components/AttackReport.js         | 12 +++++-----
 .../src/styles/report/ReportAttackMatrix.scss | 23 ++++++++++++++-----
 .../cc/ui/src/styles/report/ReportPage.scss   |  1 +
 4 files changed, 33 insertions(+), 12 deletions(-)

diff --git a/monkey/monkey_island/cc/services/attack/technique_reports/__init__.py b/monkey/monkey_island/cc/services/attack/technique_reports/__init__.py
index b9a2fd795..9c2c2f6c9 100644
--- a/monkey/monkey_island/cc/services/attack/technique_reports/__init__.py
+++ b/monkey/monkey_island/cc/services/attack/technique_reports/__init__.py
@@ -52,6 +52,15 @@ class AttackTechnique(object, metaclass=abc.ABCMeta):
         """
         pass
 
+    @classmethod
+    def technique_mitigation(cls):
+        """
+        Gets the mitigation of a certain attack technique.
+        :return: Mitigation string
+        """
+        pass
+        # TODO Get mitigation from ATT&CK DB https://github.com/mitre/cti/blob/master/USAGE.md
+
     @classmethod
     def technique_status(cls):
         """
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 39886fee6..d0d445e1e 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
@@ -79,16 +79,16 @@ class AttackReport extends React.Component {
   renderLegend() {
     return (<div id='header' className='row justify-content-between attack-legend'>
       <Col xs={4}>
-        <FontAwesomeIcon icon={faCircle} className='icon-default'/>
-        <span> - Not scanned</span>
+        <FontAwesomeIcon icon={faCircle} className='technique-not-attempted'/>
+        <span> - Not attempted</span>
       </Col>
       <Col xs={4}>
-        <FontAwesomeIcon icon={faCircle} className='icon-info'/>
-        <span> - Scanned</span>
+        <FontAwesomeIcon icon={faCircle} className='technique-attempted'/>
+        <span> - Tried (but failed)</span>
       </Col>
       <Col xs={4}>
-        <FontAwesomeIcon icon={faCircle} className='icon-danger'/>
-        <span> - Used</span>
+        <FontAwesomeIcon icon={faCircle} className='technique-used'/>
+        <span> - Successfully used</span>
       </Col>
     </div>)
   }
diff --git a/monkey/monkey_island/cc/ui/src/styles/report/ReportAttackMatrix.scss b/monkey/monkey_island/cc/ui/src/styles/report/ReportAttackMatrix.scss
index 779db71dc..e285e2524 100644
--- a/monkey/monkey_island/cc/ui/src/styles/report/ReportAttackMatrix.scss
+++ b/monkey/monkey_island/cc/ui/src/styles/report/ReportAttackMatrix.scss
@@ -1,21 +1,21 @@
 // colors
-$light-grey: #e0ddde;
-$light-blue: #ade3eb;
-$light-red: #d9acac;
+$not-attempted: #e0ddde;
+$attempted: #ffe28d;
+$used: #ff8585;
 $black: #3a3a3a;
 
 .attack-matrix .status-0 {
-  background-color: $light-grey !important;
+  background-color: $not-attempted !important;
   color: $black;
 }
 
 .attack-matrix .status-1 {
-  background-color: $light-blue !important;
+  background-color: $attempted !important;
   color: $black;
 }
 
 .attack-matrix .status-2 {
-  background-color: $light-red !important;
+  background-color: $used !important;
   color: $black;
 }
 
@@ -29,3 +29,14 @@ $black: #3a3a3a;
   border-bottom: 1px solid #0000000f;
 }
 
+.technique-not-attempted {
+  color: $not-attempted;
+}
+
+.technique-attempted {
+  color: $attempted;
+}
+
+.technique-used {
+  color: $used;
+}
diff --git a/monkey/monkey_island/cc/ui/src/styles/report/ReportPage.scss b/monkey/monkey_island/cc/ui/src/styles/report/ReportPage.scss
index 36a3c005c..4b1bd60c9 100644
--- a/monkey/monkey_island/cc/ui/src/styles/report/ReportPage.scss
+++ b/monkey/monkey_island/cc/ui/src/styles/report/ReportPage.scss
@@ -4,6 +4,7 @@
   top: 0;
   z-index: 1000000;
   background-color: #ffffff;
+  font-size: large;
 }
 
 .report-nav > li > a{