forked from p15670423/monkey
UI: Add StolenCredentialsIssue to issues
This commit is contained in:
parent
35ed7f60c4
commit
5c765f85c2
|
@ -44,7 +44,6 @@ import {
|
||||||
zerologonOverviewWithFailedPassResetWarning
|
zerologonOverviewWithFailedPassResetWarning
|
||||||
} from './security/issues/ZerologonIssue';
|
} from './security/issues/ZerologonIssue';
|
||||||
import {powershellIssueOverview, powershellIssueReport} from './security/issues/PowershellIssue';
|
import {powershellIssueOverview, powershellIssueReport} from './security/issues/PowershellIssue';
|
||||||
import {getCredentialsSecrets} from './credentialParsing';
|
|
||||||
import UsedCredentials from './security/UsedCredentials';
|
import UsedCredentials from './security/UsedCredentials';
|
||||||
|
|
||||||
|
|
||||||
|
@ -591,7 +590,7 @@ class ReportPageComponent extends AuthComponent {
|
||||||
let overview_issues = [];
|
let overview_issues = [];
|
||||||
|
|
||||||
for(let i=0; i < issues.length; i++) {
|
for(let i=0; i < issues.length; i++) {
|
||||||
if (this.isStolenCredentialsIssue(issues[i])) {
|
if (this.shouldAddStolenCredentialsIssue()) {
|
||||||
overview_issues.push('stolen_creds');
|
overview_issues.push('stolen_creds');
|
||||||
} else {
|
} else {
|
||||||
overview_issues.push(issues[i])
|
overview_issues.push(issues[i])
|
||||||
|
@ -602,14 +601,8 @@ class ReportPageComponent extends AuthComponent {
|
||||||
return newReport;
|
return newReport;
|
||||||
}
|
}
|
||||||
|
|
||||||
isStolenCredentialsIssue(issue) {
|
shouldAddStolenCredentialsIssue() {
|
||||||
return ( Object.prototype.hasOwnProperty.call(issue, 'credential_type') &&
|
return ( this.state.stolenCredentials.length > 0 )
|
||||||
(getCredentialsSecrets(this.state.stolenCredentials, 'password').includes(issue.password) ||
|
|
||||||
getCredentialsSecrets(this.state.configuredCredentials, 'nt_hash').includes(issue.password) ||
|
|
||||||
getCredentialsSecrets(this.state.configuredCredentials, 'lm_hash').includes(issue.password)) &&
|
|
||||||
(issue.credential_type === 'PASSWORD' ||
|
|
||||||
issue.credential_type === 'NT_HASH' ||
|
|
||||||
issue.credential_type === 'LM_HASH'))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue