UI: Add credential collectors to the json schema

This commit is contained in:
Ilija Lazoroski 2022-07-01 11:42:46 +02:00
parent 3339a2a957
commit c254a94fc0
4 changed files with 56 additions and 12 deletions

View File

@ -9,14 +9,14 @@ export default function UiSchema(props) {
classNames: 'config-template-no-header',
'ui:widget': AdvancedMultiSelect,
brute_force_classes: {
classNames: 'config-template-no-header',
classNames: 'config-template-no-header'
}
},
vulnerability: {
classNames: 'config-template-no-header',
'ui:widget': AdvancedMultiSelect,
vulnerability_classes: {
classNames: 'config-template-no-header',
//'ui:widget': AdvancedMultiSelect
classNames: 'config-template-no-header'
}
}
},
@ -27,6 +27,15 @@ export default function UiSchema(props) {
}
}
}
},
credential_collectors: {
collectors: {
classNames: 'config-template-no-header',
'ui:widget': AdvancedMultiSelect,
credential_collectors_classes :{
classNames: 'config-template-no-header'
}
}
}
};
return UiSchema[props.selectedSection]

View File

@ -52,7 +52,7 @@ class AdvancedMultiSelect extends React.Component {
}
onChange = (strValues) => {
console.log("Values");
console.log('Values');
console.log(this.props);
console.log(this.state);
console.log(strValues);
@ -196,7 +196,7 @@ class AdvancedMultiSelect extends React.Component {
id,
multiple,
required,
schema,
schema
} = this.props;
return (

View File

@ -2,13 +2,15 @@ import {customPBAConfigurationSchema} from './definitions/custom_pbas.js';
import {pluginConfigurationSchema} from './definitions/plugins.js';
import {propagationConfigurationSchema} from './definitions/propagation.js';
import {bruteForceExploiters, vulnerabilityExploiters} from './definitions/exploiter_classes.js';
import {credentialCollectors} from './definitions/credential_collectors.js';
export const SCHEMA = {
'title': 'Monkey',
'type': 'object',
'definitions': {
'brute_force_classes': bruteForceExploiters,
'vulnerability_classes': vulnerabilityExploiters
'vulnerability_classes': vulnerabilityExploiters,
'credential_collectors_classes': credentialCollectors
},
'properties': {
'propagation': propagationConfigurationSchema,
@ -37,13 +39,21 @@ export const SCHEMA = {
]
},
'credential_collectors': {
'title': 'Credential collectors',
'properties': {
'collectors': {
'title': 'Credential collectors',
'type': 'array',
'items': pluginConfigurationSchema,
'uniqueItems': true,
'items': {
'$ref': '#/definitions/credential_collectors_classes'
},
'default': [
{'name': 'MimikatzCollector', 'safe': true, 'options':{}},
{'name': 'SSHCollector', 'safe': true, 'options':{}}
'MimikatzCollector',
'SSHCollector'
]
}
}
},
'advanced': {
'title': 'Advanced',

View File

@ -0,0 +1,25 @@
export const credentialCollectors = {
'title': 'Credential Collectors',
'description': 'Click on a credential collector to find out what it collects.',
'type': 'string',
'pluginDefs': {
'MimikatzCollector':{'name': 'MimikatzCollector', 'options': {}},
'SSHCollector':{'name': 'SSHCollector', 'options': {}}
},
'anyOf': [
{
'type': 'string',
'enum': ['MimikatzCollector'],
'title': 'Mimikatz Credentials Collector',
'safe': true,
'info': 'Collects credentials from Windows credential manager.'
},
{
'type': 'string',
'enum': ['SSHCollector'],
'title': 'SSH Credentials Collector',
'safe': true,
'info': 'Searches users\' home directories and collects SSH keypairs.'
}
]
}