From 0f98a80c2b7b088dcf32410c228719c353c369b8 Mon Sep 17 00:00:00 2001
From: VakarisZ
Date: Tue, 26 Nov 2019 18:53:34 +0200
Subject: [PATCH] Font awesome v5 migration and added links to mitre
techniques. ZT diagram not yet working
---
.../cc/services/attack/attack_schema.py | 24 ++++++++++++++
.../cc/ui/src/components/Main.js | 13 ++++----
.../src/components/attack/MatrixComponent.js | 10 ++++--
.../map/preview-pane/InfMapPreviewPane.js | 1 -
.../map/preview-pane/PreviewPane.js | 5 +--
.../cc/ui/src/components/pages/MapPage.js | 13 ++++----
.../ui/src/components/pages/RunMonkeyPage.js | 11 ++++---
.../report-components/AttackReport.js | 31 ++++++++++++++-----
.../report-components/SecurityReport.js | 13 +++++---
.../attack/TechniqueDropdowns.js | 7 ++++-
.../zerotrust/EventsButton.js | 5 ++-
.../zerotrust/ExportEventsButton.js | 5 ++-
.../zerotrust/PillarLabel.js | 21 +++++++------
.../zerotrust/PrinciplesStatusTable.js | 2 +-
.../zerotrust/ReportLegend.js | 5 ++-
.../zerotrust/SinglePillarPrinciplesStatus.js | 5 ++-
.../zerotrust/StatusLabel.js | 13 +++++---
.../components/side-menu/VersionComponent.js | 6 ++--
18 files changed, 133 insertions(+), 57 deletions(-)
diff --git a/monkey/monkey_island/cc/services/attack/attack_schema.py b/monkey/monkey_island/cc/services/attack/attack_schema.py
index c7ff05f49..abef1fd09 100644
--- a/monkey/monkey_island/cc/services/attack/attack_schema.py
+++ b/monkey/monkey_island/cc/services/attack/attack_schema.py
@@ -12,6 +12,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": True,
+ "link": "https://attack.mitre.org/techniques/T1059",
"description": "Adversaries may use command-line interfaces to interact with systems "
"and execute other software during the course of an operation.",
},
@@ -20,6 +21,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": False,
+ "link": "https://attack.mitre.org/techniques/T1129",
"description": "The Windows module loader can be instructed to load DLLs from arbitrary "
"local paths and arbitrary Universal Naming Convention (UNC) network paths.",
"depends_on": ["T1078", "T1003"]
@@ -29,6 +31,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": False,
+ "link": "https://attack.mitre.org/techniques/T1106",
"description": "Adversary tools may directly use the Windows application "
"programming interface (API) to execute binaries.",
"depends_on": ["T1210"]
@@ -38,6 +41,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": True,
+ "link": "https://attack.mitre.org/techniques/T1086",
"description": "Adversaries can use PowerShell to perform a number of actions,"
" including discovery of information and execution of code.",
},
@@ -46,6 +50,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": True,
+ "link": "https://attack.mitre.org/techniques/T1064",
"description": "Adversaries may use scripts to aid in operations and "
"perform multiple actions that would otherwise be manual.",
},
@@ -54,6 +59,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": False,
+ "link": "https://attack.mitre.org/techniques/T1035",
"description": "Adversaries may execute a binary, command, or script via a method "
"that interacts with Windows services, such as the Service Control Manager.",
"depends_on": ["T1210"]
@@ -70,6 +76,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": True,
+ "link": "https://attack.mitre.org/techniques/T1197",
"description": "Adversaries may abuse BITS to download, execute, "
"and even clean up after running malicious code."
},
@@ -78,6 +85,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": True,
+ "link": "https://attack.mitre.org/techniques/T1107",
"description": "Adversaries may remove files over the course of an intrusion "
"to keep their footprint low or remove them at the end as part "
"of the post-intrusion cleanup process."
@@ -87,6 +95,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": True,
+ "link": "https://attack.mitre.org/techniques/T1222",
"description": "Adversaries may modify file permissions/attributes to evade intended DACLs."
}
}
@@ -101,6 +110,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": False,
+ "link": "https://attack.mitre.org/techniques/T1110",
"description": "Adversaries may use brute force techniques to attempt access to accounts "
"when passwords are unknown or when password hashes are obtained.",
"depends_on": ["T1210", "T1021"]
@@ -110,6 +120,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": False,
+ "link": "https://attack.mitre.org/techniques/T1003",
"description": "Mapped with T1078 Valid Accounts because both techniques require"
" same credential harvesting modules. "
"Credential dumping is the process of obtaining account login and password "
@@ -122,6 +133,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": False,
+ "link": "https://attack.mitre.org/techniques/T1145",
"description": "Adversaries may gather private keys from compromised systems for use in "
"authenticating to Remote Services like SSH or for use in decrypting "
"other collected files such as email.",
@@ -139,6 +151,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": True,
+ "link": "https://attack.mitre.org/techniques/T1018",
"description": "Adversaries will likely attempt to get a listing of other systems by IP address, "
"hostname, or other logical identifier on a network for lateral movement."
},
@@ -147,6 +160,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": False,
+ "link": "https://attack.mitre.org/techniques/T1082",
"depends_on": ["T1016", "T1005"],
"description": "An adversary may attempt to get detailed information about the "
"operating system and hardware, including version, patches, hotfixes, "
@@ -157,6 +171,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": False,
+ "link": "https://attack.mitre.org/techniques/T1016",
"depends_on": ["T1005", "T1082"],
"description": "Adversaries will likely look for details about the network configuration "
"and settings of systems they access or through information discovery"
@@ -174,6 +189,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": False,
+ "link": "https://attack.mitre.org/techniques/T1210",
"description": "Exploitation of a software vulnerability occurs when an adversary "
"takes advantage of a programming error in a program, service, or within the "
"operating system software or kernel itself to execute adversary-controlled code."
@@ -183,6 +199,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": False,
+ "link": "https://attack.mitre.org/techniques/T1075",
"description": "Pass the hash (PtH) is a method of authenticating as a user without "
"having access to the user's cleartext password."
},
@@ -191,6 +208,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": True,
+ "link": "https://attack.mitre.org/techniques/T1105",
"description": "Files may be copied from one system to another to stage "
"adversary tools or other files over the course of an operation."
},
@@ -199,6 +217,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": False,
+ "link": "https://attack.mitre.org/techniques/T1021",
"depends_on": ["T1110"],
"description": "An adversary may use Valid Accounts to log into a service"
" specifically designed to accept remote connections."
@@ -215,6 +234,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": False,
+ "link": "https://attack.mitre.org/techniques/T1005",
"depends_on": ["T1016", "T1082"],
"description": "Sensitive data can be collected from local system sources, such as the file system "
"or databases of information residing on the system prior to Exfiltration."
@@ -231,6 +251,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": True,
+ "link": "https://attack.mitre.org/techniques/T1090",
"description": "A connection proxy is used to direct network traffic between systems "
"or act as an intermediary for network communications."
},
@@ -239,6 +260,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": True,
+ "link": "https://attack.mitre.org/techniques/T1065",
"description": "Adversaries may conduct C2 communications over a non-standard "
"port to bypass proxies and firewalls that have been improperly configured."
},
@@ -247,6 +269,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": True,
+ "link": "https://attack.mitre.org/techniques/T1188",
"description": "To disguise the source of malicious traffic, "
"adversaries may chain together multiple proxies."
}
@@ -262,6 +285,7 @@ SCHEMA = {
"type": "bool",
"value": True,
"necessary": True,
+ "link": "https://attack.mitre.org/techniques/T1041",
"description": "Data exfiltration is performed over the Command and Control channel."
}
}
diff --git a/monkey/monkey_island/cc/ui/src/components/Main.js b/monkey/monkey_island/cc/ui/src/components/Main.js
index b2a9c9789..60a02068a 100644
--- a/monkey/monkey_island/cc/ui/src/components/Main.js
+++ b/monkey/monkey_island/cc/ui/src/components/Main.js
@@ -1,7 +1,8 @@
import React from 'react';
import {BrowserRouter as Router, NavLink, Redirect, Route} from 'react-router-dom';
import {Col, Grid, Row} from 'react-bootstrap';
-import {Icon} from 'react-fa';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
+import { faCheck, faUndo } from '@fortawesome/free-solid-svg-icons'
import RunServerPage from 'components/pages/RunServerPage';
import ConfigurePage from 'components/pages/ConfigurePage';
@@ -127,7 +128,7 @@ class AppComponent extends AuthComponent {
1.
Run Monkey Island Server
{this.state.completedSteps.run_server ?
-
+
: ''}
@@ -136,7 +137,7 @@ class AppComponent extends AuthComponent {
2.
Run Monkey
{this.state.completedSteps.run_monkey ?
-
+
: ''}
@@ -145,7 +146,7 @@ class AppComponent extends AuthComponent {
3.
Infection Map
{this.state.completedSteps.infection_done ?
-
+
: ''}
@@ -154,13 +155,13 @@ class AppComponent extends AuthComponent {
4.
Security Reports
{this.state.completedSteps.report_done ?
-
+
: ''}
-
+
Start Over
diff --git a/monkey/monkey_island/cc/ui/src/components/attack/MatrixComponent.js b/monkey/monkey_island/cc/ui/src/components/attack/MatrixComponent.js
index 4db2ba621..1934725de 100644
--- a/monkey/monkey_island/cc/ui/src/components/attack/MatrixComponent.js
+++ b/monkey/monkey_island/cc/ui/src/components/attack/MatrixComponent.js
@@ -7,6 +7,10 @@ import 'filepond/dist/filepond.min.css';
import '../../styles/Tooltip.scss';
import {Col} from 'react-bootstrap';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faCircle as faCircle } from '@fortawesome/free-solid-svg-icons';
+import { faCircle as faCircleThin } from '@fortawesome/free-regular-svg-icons';
+
class MatrixComponent extends AuthComponent {
constructor(props) {
super(props);
@@ -87,15 +91,15 @@ class MatrixComponent extends AuthComponent {
return (
-
+ - Dissabled
-
+ - Enabled
-
+ - Mandatory
)
diff --git a/monkey/monkey_island/cc/ui/src/components/map/preview-pane/InfMapPreviewPane.js b/monkey/monkey_island/cc/ui/src/components/map/preview-pane/InfMapPreviewPane.js
index 1bc0ce90d..a9fa7a6d6 100644
--- a/monkey/monkey_island/cc/ui/src/components/map/preview-pane/InfMapPreviewPane.js
+++ b/monkey/monkey_island/cc/ui/src/components/map/preview-pane/InfMapPreviewPane.js
@@ -1,5 +1,4 @@
import React from 'react';
-import {Icon} from 'react-fa';
import Toggle from 'react-toggle';
import {OverlayTrigger, Tooltip} from 'react-bootstrap';
import download from 'downloadjs'
diff --git a/monkey/monkey_island/cc/ui/src/components/map/preview-pane/PreviewPane.js b/monkey/monkey_island/cc/ui/src/components/map/preview-pane/PreviewPane.js
index 41c48f31f..a5d4d98fa 100644
--- a/monkey/monkey_island/cc/ui/src/components/map/preview-pane/PreviewPane.js
+++ b/monkey/monkey_island/cc/ui/src/components/map/preview-pane/PreviewPane.js
@@ -1,5 +1,6 @@
import React from 'react';
-import {Icon} from 'react-fa';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
+import { faHandPointLeft } from '@fortawesome/free-solid-svg-icons'
import Toggle from 'react-toggle';
import {OverlayTrigger, Tooltip} from 'react-bootstrap';
import download from 'downloadjs'
@@ -273,7 +274,7 @@ class PreviewPaneComponent extends AuthComponent {
{!info ?
-
+
Select an item on the map for a detailed look
:
diff --git a/monkey/monkey_island/cc/ui/src/components/pages/MapPage.js b/monkey/monkey_island/cc/ui/src/components/pages/MapPage.js
index d8a79cdca..278b4c791 100644
--- a/monkey/monkey_island/cc/ui/src/components/pages/MapPage.js
+++ b/monkey/monkey_island/cc/ui/src/components/pages/MapPage.js
@@ -1,7 +1,8 @@
import React from 'react';
import {Col, Modal} from 'react-bootstrap';
import {Link} from 'react-router-dom';
-import {Icon} from 'react-fa';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
+import { faStopCircle, faMinus } from '@fortawesome/free-solid-svg-icons'
import InfMapPreviewPaneComponent from 'components/map/preview-pane/InfMapPreviewPane';
import {ReactiveGraph} from 'components/reactive-graph/ReactiveGraph';
import {options, edgeGroupToColor} from 'components/map/MapOptions';
@@ -157,13 +158,13 @@ class MapPageComponent extends AuthComponent {
Legend:
- Exploit
+ Exploit |
- Scan
+ Scan |
- Tunnel
+ Tunnel |
- Island Communication
+ Island Communication
{this.renderTelemetryConsole()}
@@ -180,7 +181,7 @@ class MapPageComponent extends AuthComponent {
Telemetry
diff --git a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js
index 8c855a974..b302ba117 100644
--- a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js
+++ b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js
@@ -4,7 +4,8 @@ import {Button, Col, Well, Nav, NavItem, Collapse} from 'react-bootstrap';
import CopyToClipboard from 'react-copy-to-clipboard';
import GridLoader from 'react-spinners/GridLoader';
-import {Icon} from 'react-fa';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faClipboard, faCheck, faRefresh } from '@fortawesome/free-solid-svg-icons';
import {Link} from 'react-router-dom';
import AuthComponent from '../AuthComponent';
import AwsRunTable from '../run-monkey/AwsRunTable';
@@ -147,7 +148,7 @@ class RunMonkeyPageComponent extends AuthComponent {