forked from p15670423/monkey
UI: Add credential collectors to the json schema
This commit is contained in:
parent
3339a2a957
commit
c254a94fc0
|
@ -9,14 +9,14 @@ export default function UiSchema(props) {
|
||||||
classNames: 'config-template-no-header',
|
classNames: 'config-template-no-header',
|
||||||
'ui:widget': AdvancedMultiSelect,
|
'ui:widget': AdvancedMultiSelect,
|
||||||
brute_force_classes: {
|
brute_force_classes: {
|
||||||
classNames: 'config-template-no-header',
|
classNames: 'config-template-no-header'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
vulnerability: {
|
vulnerability: {
|
||||||
classNames: 'config-template-no-header',
|
classNames: 'config-template-no-header',
|
||||||
|
'ui:widget': AdvancedMultiSelect,
|
||||||
vulnerability_classes: {
|
vulnerability_classes: {
|
||||||
classNames: 'config-template-no-header',
|
classNames: 'config-template-no-header'
|
||||||
//'ui:widget': AdvancedMultiSelect
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -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]
|
return UiSchema[props.selectedSection]
|
||||||
|
|
|
@ -52,7 +52,7 @@ class AdvancedMultiSelect extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
onChange = (strValues) => {
|
onChange = (strValues) => {
|
||||||
console.log("Values");
|
console.log('Values');
|
||||||
console.log(this.props);
|
console.log(this.props);
|
||||||
console.log(this.state);
|
console.log(this.state);
|
||||||
console.log(strValues);
|
console.log(strValues);
|
||||||
|
@ -196,7 +196,7 @@ class AdvancedMultiSelect extends React.Component {
|
||||||
id,
|
id,
|
||||||
multiple,
|
multiple,
|
||||||
required,
|
required,
|
||||||
schema,
|
schema
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -2,13 +2,15 @@ import {customPBAConfigurationSchema} from './definitions/custom_pbas.js';
|
||||||
import {pluginConfigurationSchema} from './definitions/plugins.js';
|
import {pluginConfigurationSchema} from './definitions/plugins.js';
|
||||||
import {propagationConfigurationSchema} from './definitions/propagation.js';
|
import {propagationConfigurationSchema} from './definitions/propagation.js';
|
||||||
import {bruteForceExploiters, vulnerabilityExploiters} from './definitions/exploiter_classes.js';
|
import {bruteForceExploiters, vulnerabilityExploiters} from './definitions/exploiter_classes.js';
|
||||||
|
import {credentialCollectors} from './definitions/credential_collectors.js';
|
||||||
|
|
||||||
export const SCHEMA = {
|
export const SCHEMA = {
|
||||||
'title': 'Monkey',
|
'title': 'Monkey',
|
||||||
'type': 'object',
|
'type': 'object',
|
||||||
'definitions': {
|
'definitions': {
|
||||||
'brute_force_classes': bruteForceExploiters,
|
'brute_force_classes': bruteForceExploiters,
|
||||||
'vulnerability_classes': vulnerabilityExploiters
|
'vulnerability_classes': vulnerabilityExploiters,
|
||||||
|
'credential_collectors_classes': credentialCollectors
|
||||||
},
|
},
|
||||||
'properties': {
|
'properties': {
|
||||||
'propagation': propagationConfigurationSchema,
|
'propagation': propagationConfigurationSchema,
|
||||||
|
@ -38,12 +40,20 @@ export const SCHEMA = {
|
||||||
},
|
},
|
||||||
'credential_collectors': {
|
'credential_collectors': {
|
||||||
'title': 'Credential collectors',
|
'title': 'Credential collectors',
|
||||||
'type': 'array',
|
'properties': {
|
||||||
'items': pluginConfigurationSchema,
|
'collectors': {
|
||||||
'default': [
|
'title': 'Credential collectors',
|
||||||
{'name': 'MimikatzCollector', 'safe': true, 'options':{}},
|
'type': 'array',
|
||||||
{'name': 'SSHCollector', 'safe': true, 'options':{}}
|
'uniqueItems': true,
|
||||||
]
|
'items': {
|
||||||
|
'$ref': '#/definitions/credential_collectors_classes'
|
||||||
|
},
|
||||||
|
'default': [
|
||||||
|
'MimikatzCollector',
|
||||||
|
'SSHCollector'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
'advanced': {
|
'advanced': {
|
||||||
'title': 'Advanced',
|
'title': 'Advanced',
|
||||||
|
|
|
@ -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.'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue