forked from p15670423/monkey
Consider non-threat issues when calculating threat count
This commit is contained in:
parent
6babcd099a
commit
5f66a99f30
|
@ -46,6 +46,8 @@ class ReportPageComponent extends AuthComponent {
|
||||||
ZEROLOGON_PASSWORD_RESTORE_FAILED: 16
|
ZEROLOGON_PASSWORD_RESTORE_FAILED: 16
|
||||||
};
|
};
|
||||||
|
|
||||||
|
NotThreats = [this.Issue.ZEROLOGON_PASSWORD_RESTORE_FAILED];
|
||||||
|
|
||||||
Warning =
|
Warning =
|
||||||
{
|
{
|
||||||
CROSS_SEGMENT: 0,
|
CROSS_SEGMENT: 0,
|
||||||
|
@ -253,9 +255,8 @@ class ReportPageComponent extends AuthComponent {
|
||||||
<div>
|
<div>
|
||||||
During this simulated attack the Monkey uncovered <span
|
During this simulated attack the Monkey uncovered <span
|
||||||
className='badge badge-warning'>
|
className='badge badge-warning'>
|
||||||
{this.state.report.overview.issues.filter(function (x) {
|
{this.getThreatCount()}
|
||||||
return x === true;
|
</span>:
|
||||||
}).length} threats</span>:
|
|
||||||
<ul>
|
<ul>
|
||||||
{this.state.report.overview.issues[this.Issue.STOLEN_SSH_KEYS] &&
|
{this.state.report.overview.issues[this.Issue.STOLEN_SSH_KEYS] &&
|
||||||
<li>Stolen SSH keys are used to exploit other machines.</li>}
|
<li>Stolen SSH keys are used to exploit other machines.</li>}
|
||||||
|
@ -415,6 +416,23 @@ class ReportPageComponent extends AuthComponent {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getThreatCount() {
|
||||||
|
let threatCount = this.state.report.overview.issues.filter(function (x) {
|
||||||
|
return x === true;
|
||||||
|
}).length
|
||||||
|
|
||||||
|
this.NotThreats.forEach(x => {
|
||||||
|
if (this.state.report.overview.issues[x] === true) {
|
||||||
|
threatCount -= 1;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (threatCount === 1)
|
||||||
|
return "1 threat"
|
||||||
|
else
|
||||||
|
return threatCount + " threats"
|
||||||
|
}
|
||||||
|
|
||||||
generateZerologonOverview() {
|
generateZerologonOverview() {
|
||||||
let zerologonOverview = [];
|
let zerologonOverview = [];
|
||||||
if (this.state.report.overview.issues[this.Issue.ZEROLOGON]) {
|
if (this.state.report.overview.issues[this.Issue.ZEROLOGON]) {
|
||||||
|
|
Loading…
Reference in New Issue