forked from p34709852/monkey
Merge remote-tracking branch 'upstream/develop' into zt_performance_fixes
This commit is contained in:
commit
eb226f070f
|
@ -66,6 +66,22 @@ SCHEMA = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"persistence": {
|
||||||
|
"title": "Persistence",
|
||||||
|
"type": "object",
|
||||||
|
"link": "https://attack.mitre.org/tactics/TA0003/",
|
||||||
|
"properties": {
|
||||||
|
"T1136": {
|
||||||
|
"title": "Create account",
|
||||||
|
"type": "bool",
|
||||||
|
"value": True,
|
||||||
|
"necessary": False,
|
||||||
|
"link": "https://attack.mitre.org/techniques/T1136",
|
||||||
|
"description": "Adversaries with a sufficient level of access "
|
||||||
|
"may create a local system, domain, or cloud tenant account."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"defence_evasion": {
|
"defence_evasion": {
|
||||||
"title": "Defence evasion",
|
"title": "Defence evasion",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -289,22 +305,6 @@ SCHEMA = {
|
||||||
"description": "Data exfiltration is performed over the Command and Control channel."
|
"description": "Data exfiltration is performed over the Command and Control channel."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"persistence": {
|
|
||||||
"title": "Persistence",
|
|
||||||
"type": "object",
|
|
||||||
"link": "https://attack.mitre.org/tactics/TA0003/",
|
|
||||||
"properties": {
|
|
||||||
"T1136": {
|
|
||||||
"title": "Create account",
|
|
||||||
"type": "bool",
|
|
||||||
"value": True,
|
|
||||||
"necessary": False,
|
|
||||||
"link": "https://attack.mitre.org/techniques/T1136",
|
|
||||||
"description": "Adversaries with a sufficient level of access "
|
|
||||||
"may create a local system, domain, or cloud tenant account."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,5 +34,5 @@ class T1136(AttackTechnique):
|
||||||
'result': ': '.join([pba['name'], pba['result'][0]])
|
'result': ': '.join([pba['name'], pba['result'][0]])
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
data.update(T1136.get_message_and_status(status))
|
data.update(T1136.get_base_data_by_status(status))
|
||||||
return data
|
return data
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactTable from 'react-table';
|
import ReactTable from 'react-table';
|
||||||
import {renderMachineFromSystemData, ScanStatus} from './Helpers'
|
import {renderMachineFromSystemData, ScanStatus} from './Helpers';
|
||||||
|
import MitigationsComponent from "./MitigationsComponent";
|
||||||
|
|
||||||
class T1136 extends React.Component {
|
class T1136 extends React.Component {
|
||||||
|
|
||||||
|
@ -35,6 +36,7 @@ class T1136 extends React.Component {
|
||||||
showPagination={false}
|
showPagination={false}
|
||||||
defaultPageSize={this.props.data.info.length}
|
defaultPageSize={this.props.data.info.length}
|
||||||
/> : ''}
|
/> : ''}
|
||||||
|
<MitigationsComponent mitigations={this.props.data.mitigations}/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -407,18 +407,23 @@ class ReportPageComponent extends AuthComponent {
|
||||||
<div style={{position: 'relative', height: '80vh'}}>
|
<div style={{position: 'relative', height: '80vh'}}>
|
||||||
<ReactiveGraph graph={this.state.graph} options={getOptions(this.state.nodeStateList)}/>
|
<ReactiveGraph graph={this.state.graph} options={getOptions(this.state.nodeStateList)}/>
|
||||||
</div>
|
</div>
|
||||||
<div style={{marginBottom: '20px'}}>
|
|
||||||
<BreachedServers data={this.state.report.glance.exploited}/>
|
|
||||||
</div>
|
|
||||||
<div style={{marginBottom: '20px'}}>
|
|
||||||
<PostBreach data={this.state.report.glance.scanned}/>
|
|
||||||
</div>
|
|
||||||
<div style={{marginBottom: '20px'}}>
|
<div style={{marginBottom: '20px'}}>
|
||||||
<ScannedServers data={this.state.report.glance.scanned}/>
|
<ScannedServers data={this.state.report.glance.scanned}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div style={{marginBottom: '20px'}}>
|
||||||
|
<BreachedServers data={this.state.report.glance.exploited}/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style={{marginBottom: '20px'}}>
|
||||||
|
<PostBreach data={this.state.report.glance.scanned}/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style={{position: 'relative', height: '80vh'}}>
|
<div style={{position: 'relative', height: '80vh'}}>
|
||||||
{this.generateReportPthMap()}
|
{this.generateReportPthMap()}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style={{marginBottom: '20px'}}>
|
<div style={{marginBottom: '20px'}}>
|
||||||
<StolenPasswords data={this.state.report.glance.stolen_creds.concat(this.state.report.glance.ssh_keys)}/>
|
<StolenPasswords data={this.state.report.glance.stolen_creds.concat(this.state.report.glance.ssh_keys)}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactTable from 'react-table'
|
import ReactTable from 'react-table';
|
||||||
|
import Pluralize from 'pluralize';
|
||||||
|
|
||||||
let renderArray = function (val) {
|
let renderArray = function (val) {
|
||||||
return <div>{val.map(x => <div>{x}</div>)}</div>;
|
return <div>{val.map(x => <div>{x}</div>)}</div>;
|
||||||
|
@ -34,14 +35,20 @@ class BreachedServersComponent extends React.Component {
|
||||||
let defaultPageSize = this.props.data.length > pageSize ? pageSize : this.props.data.length;
|
let defaultPageSize = this.props.data.length > pageSize ? pageSize : this.props.data.length;
|
||||||
let showPagination = this.props.data.length > pageSize;
|
let showPagination = this.props.data.length > pageSize;
|
||||||
return (
|
return (
|
||||||
<div className="data-table-container">
|
<>
|
||||||
<ReactTable
|
<p>
|
||||||
columns={columns}
|
The Monkey successfully breached <span
|
||||||
data={this.props.data}
|
className="label label-danger">{this.props.data.length}</span> {Pluralize('machine', this.props.data.length)}:
|
||||||
showPagination={showPagination}
|
</p>
|
||||||
defaultPageSize={defaultPageSize}
|
<div className="data-table-container">
|
||||||
/>
|
<ReactTable
|
||||||
</div>
|
columns={columns}
|
||||||
|
data={this.props.data}
|
||||||
|
showPagination={showPagination}
|
||||||
|
defaultPageSize={defaultPageSize}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactTable from 'react-table'
|
import ReactTable from 'react-table';
|
||||||
|
import Pluralize from 'pluralize';
|
||||||
|
|
||||||
let renderArray = function (val) {
|
let renderArray = function (val) {
|
||||||
return <span>{val.map(x => <span key={x}> {x}</span>)}</span>;
|
return <span>{val.map(x => <span key={x}> {x}</span>)}</span>;
|
||||||
|
@ -62,19 +63,26 @@ class PostBreachComponent extends React.Component {
|
||||||
});
|
});
|
||||||
let defaultPageSize = pbaMachines.length > pageSize ? pageSize : pbaMachines.length;
|
let defaultPageSize = pbaMachines.length > pageSize ? pageSize : pbaMachines.length;
|
||||||
let showPagination = pbaMachines > pageSize;
|
let showPagination = pbaMachines > pageSize;
|
||||||
|
const pbaCount = pbaMachines.reduce((accumulated, pbaMachine) => accumulated+pbaMachine["pba_results"].length, 0);
|
||||||
return (
|
return (
|
||||||
<div className="data-table-container">
|
<>
|
||||||
<ReactTable
|
<p>
|
||||||
columns={columns}
|
The Monkey performed <span
|
||||||
data={pbaMachines}
|
className="label label-danger">{pbaCount}</span> post-breach {Pluralize('action', pbaCount)} on <span
|
||||||
showPagination={showPagination}
|
className="label label-warning">{pbaMachines.length}</span> {Pluralize('machine', pbaMachines.length)}:
|
||||||
defaultPageSize={defaultPageSize}
|
</p>
|
||||||
SubComponent={row => {
|
<div className="data-table-container">
|
||||||
return renderDetails(row.original.pba_results);
|
<ReactTable
|
||||||
}}
|
columns={columns}
|
||||||
/>
|
data={pbaMachines}
|
||||||
</div>
|
showPagination={showPagination}
|
||||||
|
defaultPageSize={defaultPageSize}
|
||||||
|
SubComponent={row => {
|
||||||
|
return renderDetails(row.original.pba_results);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactTable from 'react-table'
|
import ReactTable from 'react-table';
|
||||||
|
import Pluralize from 'pluralize';
|
||||||
|
|
||||||
let renderArray = function (val) {
|
let renderArray = function (val) {
|
||||||
return <div>{val.map(x => <div>{x}</div>)}</div>;
|
return <div>{val.map(x => <div>{x}</div>)}</div>;
|
||||||
|
@ -32,17 +33,33 @@ class ScannedServersComponent extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
||||||
let defaultPageSize = this.props.data.length > pageSize ? pageSize : this.props.data.length;
|
let defaultPageSize = this.props.data.length > pageSize ? pageSize : this.props.data.length;
|
||||||
let showPagination = this.props.data.length > pageSize;
|
let showPagination = this.props.data.length > pageSize;
|
||||||
|
|
||||||
|
const scannedMachinesCount = this.props.data.length;
|
||||||
|
const reducerFromScannedServerToServicesAmount = (accumulated, scannedServer) => accumulated + scannedServer["services"].length;
|
||||||
|
const scannedServicesAmount = this.props.data.reduce(reducerFromScannedServerToServicesAmount, 0);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="data-table-container">
|
<>
|
||||||
<ReactTable
|
<p>
|
||||||
columns={columns}
|
The Monkey discovered
|
||||||
data={this.props.data}
|
<span className="label label-danger">{scannedServicesAmount}</span>
|
||||||
showPagination={showPagination}
|
open {Pluralize('service', scannedServicesAmount)}
|
||||||
defaultPageSize={defaultPageSize}
|
on
|
||||||
/>
|
<span className="label label-warning">{scannedMachinesCount}</span>
|
||||||
</div>
|
{Pluralize('machine', scannedMachinesCount)}:
|
||||||
|
</p>
|
||||||
|
<div className="data-table-container">
|
||||||
|
<ReactTable
|
||||||
|
columns={columns}
|
||||||
|
data={this.props.data}
|
||||||
|
showPagination={showPagination}
|
||||||
|
defaultPageSize={defaultPageSize}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue