UI: Add ransomware to config schema

This commit is contained in:
Ilija Lazoroski 2022-07-04 13:11:30 +02:00
parent d527881770
commit a4e66a0c9e
3 changed files with 79 additions and 9 deletions

View File

@ -1,5 +1,6 @@
import AdvancedMultiSelect from '../ui-components/AdvancedMultiSelect';
import InfoBox from './InfoBox';
import TextBox from './TextBox.js';
export default function UiSchema(props) {
const UiSchema = {
@ -36,6 +37,17 @@ export default function UiSchema(props) {
}
}
},
payloads: {
classNames: 'config-template-no-header',
encryption: {
info_box : {
'ui:field': InfoBox
},
text_box: {
'ui:field': TextBox
}
}
},
custom_pbas: {
classNames: 'config-template-no-header'
},

View File

@ -1,5 +1,5 @@
import {customPBAConfigurationSchema} from './definitions/custom_pbas.js';
import {pluginConfigurationSchema} from './definitions/plugins.js';
import {ransomwareSchema} from './definitions/ransomware.js';
import {propagationConfigurationSchema} from './definitions/propagation.js';
import {bruteForceExploiters, vulnerabilityExploiters} from './definitions/exploiter_classes.js';
import {credentialCollectors} from './definitions/credential_collectors.js';
@ -27,14 +27,7 @@ export const SCHEMA = {
}
},
'custom_pbas': customPBAConfigurationSchema,
'payloads': {
'title': 'Payloads',
'type': 'array',
'items': pluginConfigurationSchema,
'default': [
{'name': 'ransomware', 'safe': true, 'options': {}}
]
},
'payloads': ransomwareSchema,
'credential_collectors': {
'title': 'Credential collectors',
'type': 'array',

View File

@ -0,0 +1,65 @@
export const ransomwareSchema = {
'title': 'Payloads',
'properties': {
'encryption': {
'title': 'Ransomware simulation',
'type': 'object',
'description': 'To simulate ransomware encryption, you\'ll need to provide Infection ' +
'Monkey with files that it can safely encrypt. On each machine where you would like ' +
'the ransomware simulation to run, create a directory and put some files in it.' +
'\n\nProvide the path to the directory that was created on each machine.',
'properties': {
'enabled': {
'title': 'Encrypt files',
'type': 'boolean',
'default': true,
'description': 'Ransomware encryption will be simulated by flipping every bit ' +
'in the files contained within the target directories.'
},
'info_box': {
'info': 'No files will be encrypted if a directory is not specified or doesn\'t ' +
'exist on a victim machine.'
},
'directories': {
'title': 'Directories to encrypt',
'type': 'object',
'properties': {
'linux_target_dir': {
'title': 'Linux target directory',
'type': 'string',
'format': 'valid-ransomware-target-path-linux',
'default': '',
'description': 'A path to a directory on Linux systems that contains ' +
'files that you will allow Infection Monkey to encrypt. If no ' +
'directory is specified, no files will be encrypted.'
},
'windows_target_dir': {
'title': 'Windows target directory',
'type': 'string',
'format': 'valid-ransomware-target-path-windows',
'default': '',
'description': 'A path to a directory on Windows systems that contains ' +
'files that you will allow Infection Monkey to encrypt. If no ' +
'directory is specified, no files will be encrypted.'
}
}
},
'text_box': {
'text': 'Note: A README.txt will be left in the specified target directory.'
}
}
},
'other_behaviors': {
'title': 'Other ransomware behavior',
'type': 'object',
'properties': {
'readme': {
'title': 'Create a README.txt file',
'type': 'boolean',
'default': true,
'description': 'Creates a README.txt ransomware note on infected systems.'
}
}
}
}
}