forked from p15670423/monkey
UI: Fix custom pbas in the schema
This commit is contained in:
parent
a1f4a6978a
commit
66c2bc492c
|
@ -1,6 +1,8 @@
|
|||
import AdvancedMultiSelect from '../ui-components/AdvancedMultiSelect';
|
||||
import InfoBox from './InfoBox';
|
||||
import TextBox from './TextBox.js';
|
||||
import PbaInput from './PbaInput';
|
||||
import {API_PBA_LINUX, API_PBA_WINDOWS} from '../pages/ConfigurePage';
|
||||
|
||||
export default function UiSchema(props) {
|
||||
const UiSchema = {
|
||||
|
@ -78,7 +80,39 @@ export default function UiSchema(props) {
|
|||
}
|
||||
},
|
||||
custom_pbas: {
|
||||
classNames: 'config-template-no-header'
|
||||
classNames: 'config-template-no-header',
|
||||
linux_command: {
|
||||
'ui:widget': 'textarea',
|
||||
'ui:emptyValue': ''
|
||||
},
|
||||
linux_file: {
|
||||
'ui:widget': PbaInput,
|
||||
'ui:options': {
|
||||
filename: props.linux_filename,
|
||||
apiEndpoint: API_PBA_LINUX,
|
||||
setPbaFilename: props.setPbaFilenameLinux
|
||||
}
|
||||
},
|
||||
windows_command: {
|
||||
'ui:widget': 'textarea',
|
||||
'ui:emptyValue': ''
|
||||
},
|
||||
windows_file: {
|
||||
'ui:widget': PbaInput,
|
||||
'ui:options': {
|
||||
filename: props.windows_filename,
|
||||
apiEndpoint: API_PBA_WINDOWS,
|
||||
setPbaFilename: props.setPbaFilenameWindows
|
||||
}
|
||||
},
|
||||
linux_filename: {
|
||||
classNames: 'linux-pba-file-info',
|
||||
'ui:emptyValue': ''
|
||||
},
|
||||
windows_filename: {
|
||||
classNames: 'windows-pba-file-info',
|
||||
'ui:emptyValue': ''
|
||||
}
|
||||
},
|
||||
post_breach_actions: {
|
||||
classNames: 'config-template-no-header',
|
||||
|
|
|
@ -10,14 +10,20 @@ export const customPBAConfigurationSchema = {
|
|||
'file on exploited machines.\nExample: ' +
|
||||
'"chmod +x ./my_script.sh; ./my_script.sh ; rm ./my_script.sh"'
|
||||
},
|
||||
'linux_filename': {
|
||||
'linux_file': {
|
||||
'title': 'Linux post-breach file',
|
||||
'type': 'string',
|
||||
'format': 'data-url',
|
||||
'description': 'File to be uploaded after breaching. ' +
|
||||
'Use the "Linux post-breach command" field to ' +
|
||||
'change permissions, run, or delete the file. ' +
|
||||
'Reference your file by filename.'
|
||||
},
|
||||
'linux_filename': {
|
||||
'title': 'Linux PBA filename',
|
||||
'type': 'string',
|
||||
'default': ''
|
||||
},
|
||||
'windows_command': {
|
||||
'title': 'Windows post-breach command',
|
||||
'type': 'string',
|
||||
|
@ -27,13 +33,19 @@ export const customPBAConfigurationSchema = {
|
|||
'file on exploited machine.\nExample: ' +
|
||||
'"my_script.bat & del my_script.bat"'
|
||||
},
|
||||
'windows_filename':{
|
||||
'windows_file':{
|
||||
'title': 'Windows post-breach file',
|
||||
'type': 'string',
|
||||
'format': 'data-url',
|
||||
'description': 'File to be uploaded after breaching. ' +
|
||||
'Use the "Windows post-breach command" field to ' +
|
||||
'change permissions, run or delete the file. ' +
|
||||
'Reference your file by filename.'
|
||||
},
|
||||
'windows_filename': {
|
||||
'title': 'Windows PBA filename',
|
||||
'type': 'string',
|
||||
'default': ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue