diff --git a/monkey_island/cc/ui/package.json b/monkey_island/cc/ui/package.json
index 681a98bb3..71f2decd4 100644
--- a/monkey_island/cc/ui/package.json
+++ b/monkey_island/cc/ui/package.json
@@ -80,6 +80,7 @@
"react-modal-dialog": "^4.0.7",
"react-redux": "^5.0.6",
"react-router-dom": "^4.2.2",
+ "react-table": "^6.7.4",
"react-toggle": "^4.0.1",
"redux": "^3.7.2"
}
diff --git a/monkey_island/cc/ui/src/components/Main.js b/monkey_island/cc/ui/src/components/Main.js
index a4d41f2af..dd143ea3a 100644
--- a/monkey_island/cc/ui/src/components/Main.js
+++ b/monkey_island/cc/ui/src/components/Main.js
@@ -16,6 +16,7 @@ require('normalize.css/normalize.css');
require('react-data-components/css/table-twbs.css');
require('styles/App.css');
require('react-toggle/style.css');
+require('react-table/react-table.css');
let logoImage = require('../images/monkey-logo.png');
let guardicoreLogoImage = require('../images/guardicore-logo.png');
diff --git a/monkey_island/cc/ui/src/components/pages/ReportPage.js b/monkey_island/cc/ui/src/components/pages/ReportPage.js
index 633fadc12..c568aa13b 100644
--- a/monkey_island/cc/ui/src/components/pages/ReportPage.js
+++ b/monkey_island/cc/ui/src/components/pages/ReportPage.js
@@ -1,19 +1,119 @@
import React from 'react';
import {Col} from 'react-bootstrap';
+import BreachedServers from 'components/report-components/BreachedServers';
+import ScannedServers from 'components/report-components/ScannedServers';
+
+const list_item = {
+ label: 'machine 1',
+ ip_addresses: ['1.2.3.4', '5.6.7.8'],
+ accessible_from_nodes: ['machine 2', 'machine 3'],
+ services: ['tcp-80', 'tcp-443']
+};
class ReportPageComponent extends React.Component {
constructor(props) {
super(props);
+
+ this.state = {
+ report: {}
+ };
+ }
+
+ componentDidMount() {
+ fetch('/api/report')
+ .then(res => res.json())
+ .then(res => {
+ this.setState({
+ report: res
+ });
+ });
}
render() {
+ if (Object.keys(this.state.report).length === 0) {
+ return (
);
+ }
return (
4. Security Report
-
- Under construction
-
+
+
+ Overview
+
+
+ {/* TODO: Replace 01/02/2017 21:45, 23:12 with data */}
+ The monkey run was started on 01/02/2017 21:45. After 23:12 minutes, all monkeys finished propagation attempts.
+
+
+ From the attacker's point of view, the network looks like this:
+ {/* TODO: Add map */}
+
+
+
* Imagine Map here :) *
+
+
+ {/* TODO: Replace 3 with data */}
+ During this simulated attack the Monkey uncovered
3 issues, detailed below. The security issues uncovered included:
+
+ {/* TODO: Replace lis with data */}
+ - Weak user/passwords combinations
+ - Machines not patched for the ‘Shellshock’ bug
+
+
+
+ In addition, the monkey uncovered the following possible set of issues:
+
+ {/* TODO: Replace lis with data */}
+ - Machines from another segment accessed the Monkey Island
+ - Network tunnels were created successfully
+
+
+
+ A full report of the Monkeys activities follows.
+
+
+
+
+ Network Overview
+
+
+ {/* TODO: Replace 6,2 with data */}
+ During the current run, the Monkey discovered 6 machines and successfully breached 2 of them.
+ In addition, it attempted to exploit the rest, any security software installed in the network should have picked up the attack attempts and logged them.
+
+
+ Detailed recommendations in the next part of the
report.
+
Breached Servers
+
+
+
+
Scanned Servers
+
+ {/* TODO: Add table of scanned servers */}
+
+
+
+
+ Recommendations
+
+
+
+
Issue #1
+
+ The machine Monkey-SMB with the following IP addresses 192.168.0.1 10.0.0.18 was vulnerable to a SmbExploiter attack.
+ The attack succeeded because weak/stolen password was used over SMB protocol.
+
+
+
+
Issue #2
+
+ The network can probably be segmented. A monkey instance on Monkey-SMB in the 192.168.0.0/24 network could directly access the Monkey Island C&C server in the 172.168.0.0/24 network.
+
+
+
+ {/* TODO: Entire part */}
+
);
diff --git a/monkey_island/cc/ui/src/components/report-components/BreachedServers.js b/monkey_island/cc/ui/src/components/report-components/BreachedServers.js
new file mode 100644
index 000000000..0a7d3ed93
--- /dev/null
+++ b/monkey_island/cc/ui/src/components/report-components/BreachedServers.js
@@ -0,0 +1,40 @@
+import React from 'react';
+import ReactTable from 'react-table'
+
+let renderArray = function(val) {
+ if (val.length === 0) {
+ return '';
+ }
+ return val.reduce((total, new_str) => total + ', ' + new_str);
+};
+
+const columns = [
+ { Header: 'Machine', accessor: 'label'},
+ { Header: 'IP Addresses', id: 'ip_addresses', accessor: x => renderArray(x.ip_addresses)},
+ { Header: 'Exploits', id: 'exploits', accessor: x => renderArray(x.exploits)}
+];
+
+const pageSize = 10;
+
+class BreachedServersComponent extends React.Component {
+ constructor(props) {
+ super(props);
+ }
+
+ render() {
+ let defaultPageSize = this.props.data.length > pageSize ? pageSize : this.props.data.length;
+ let showPagination = this.props.data.length > pageSize;
+ return (
+
+
+
+ );
+ }
+}
+
+export default BreachedServersComponent;
diff --git a/monkey_island/cc/ui/src/components/report-components/ScannedServers.js b/monkey_island/cc/ui/src/components/report-components/ScannedServers.js
new file mode 100644
index 000000000..9ae1b5135
--- /dev/null
+++ b/monkey_island/cc/ui/src/components/report-components/ScannedServers.js
@@ -0,0 +1,41 @@
+import React from 'react';
+import ReactTable from 'react-table'
+
+let renderArray = function(val) {
+ if (val.length === 0) {
+ return '';
+ }
+ return val.reduce((total, new_str) => total + ', ' + new_str);
+};
+
+const columns = [
+ { Header: 'Machine', accessor: 'label'},
+ { Header: 'IP Addresses', id: 'ip_addresses', accessor: x => renderArray(x.ip_addresses)},
+ { Header: 'Accessible From', id: 'accessible_from_nodes', accessor: x => renderArray(x.accessible_from_nodes)},
+ { Header: 'Services', id: 'services', accessor: x => renderArray(x.services)}
+];
+
+const pageSize = 10;
+
+class ScannedServersComponent extends React.Component {
+ constructor(props) {
+ super(props);
+ }
+
+ render() {
+ let defaultPageSize = this.props.data.length > pageSize ? pageSize : this.props.data.length;
+ let showPagination = this.props.data.length > pageSize;
+ return (
+
+
+
+ );
+ }
+}
+
+export default ScannedServersComponent;
diff --git a/monkey_island/cc/ui/src/styles/App.css b/monkey_island/cc/ui/src/styles/App.css
index 9ecf08cbb..fd8fbd22c 100644
--- a/monkey_island/cc/ui/src/styles/App.css
+++ b/monkey_island/cc/ui/src/styles/App.css
@@ -46,13 +46,22 @@ body {
ul {
list-style: none;
- padding-left: 0;
+ padding-left: 0px;
+ }
+
+ ul.report {
+ list-style: disc;
+ padding-left: 40px;
}
li {
overflow: auto;
}
+ li.report {
+ overflow: visible;
+ }
+
li .number {
color: #666;
display: inline-block;