From 3fec6ac753c7399797f541883f5011307aedbc6d Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Wed, 22 Jul 2020 12:33:21 +0300 Subject: [PATCH] Renamed values in config: Network->General to Network->Scope, Exploits->General to Exploits->Exploiters --- .../cc/services/config_schema.py | 50 +++++++++---------- .../cc/services/reporting/report.py | 6 +-- .../configuration-components/UiSchema.js | 16 +++--- 3 files changed, 35 insertions(+), 37 deletions(-) diff --git a/monkey/monkey_island/cc/services/config_schema.py b/monkey/monkey_island/cc/services/config_schema.py index 769091e81..07e9e9cb9 100644 --- a/monkey/monkey_island/cc/services/config_schema.py +++ b/monkey/monkey_island/cc/services/config_schema.py @@ -327,10 +327,31 @@ SCHEMA = { "type": "object", "primary": True, "properties": { - "general": { - "title": "General", + "exploiters": { + "title": "Exploiters", "type": "object", "properties": { + "exploiter_classes": { + "title": "Exploiters", + "type": "array", + "uniqueItems": True, + "items": { + "$ref": "#/definitions/exploiter_classes" + }, + "default": [ + "SmbExploiter", + "WmiExploiter", + "SSHExploiter", + "ShellShockExploiter", + "SambaCryExploiter", + "ElasticGroovyExploiter", + "Struts2Exploiter", + "WebLogicExploiter", + "HadoopExploiter", + "VSFTPDExploiter", + "MSSQLExploiter" + ] + } } }, "credentials": { @@ -374,8 +395,8 @@ SCHEMA = { "title": "Network", "type": "object", "properties": { - "general": { - "title": "General", + "scope": { + "title": "Scope", "type": "object", "properties": { "blocked_ips": { @@ -906,27 +927,6 @@ SCHEMA = { "title": "General", "type": "object", "properties": { - "exploiter_classes": { - "title": "Exploits", - "type": "array", - "uniqueItems": True, - "items": { - "$ref": "#/definitions/exploiter_classes" - }, - "default": [ - "SmbExploiter", - "WmiExploiter", - "SSHExploiter", - "ShellShockExploiter", - "SambaCryExploiter", - "ElasticGroovyExploiter", - "Struts2Exploiter", - "WebLogicExploiter", - "HadoopExploiter", - "VSFTPDExploiter", - "MSSQLExploiter" - ] - }, "skip_exploit_if_file_exist": { "title": "Skip exploit if file exists", "type": "boolean", diff --git a/monkey/monkey_island/cc/services/reporting/report.py b/monkey/monkey_island/cc/services/reporting/report.py index 9880b0ed0..f557c6a01 100644 --- a/monkey/monkey_island/cc/services/reporting/report.py +++ b/monkey/monkey_island/cc/services/reporting/report.py @@ -618,7 +618,7 @@ class ReportService: @staticmethod def get_config_exploits(): - exploits_config_value = ['exploits', 'general', 'exploiter_classes'] + exploits_config_value = ['basic', 'exploiters', 'exploiter_classes'] default_exploits = ConfigService.get_default_config(False) for namespace in exploits_config_value: default_exploits = default_exploits[namespace] @@ -632,11 +632,11 @@ class ReportService: @staticmethod def get_config_ips(): - return ConfigService.get_config_value(['basic_network', 'general', 'subnet_scan_list'], True, True) + return ConfigService.get_config_value(['basic_network', 'scope', 'subnet_scan_list'], True, True) @staticmethod def get_config_scan(): - return ConfigService.get_config_value(['basic_network', 'general', 'local_network_scan'], True, True) + return ConfigService.get_config_value(['basic_network', 'scope', 'local_network_scan'], True, True) @staticmethod def get_issues_overview(issues, config_users, config_passwords): diff --git a/monkey/monkey_island/cc/ui/src/components/configuration-components/UiSchema.js b/monkey/monkey_island/cc/ui/src/components/configuration-components/UiSchema.js index f28393d1d..3b1e233d8 100644 --- a/monkey/monkey_island/cc/ui/src/components/configuration-components/UiSchema.js +++ b/monkey/monkey_island/cc/ui/src/components/configuration-components/UiSchema.js @@ -5,7 +5,13 @@ import {API_PBA_LINUX, API_PBA_WINDOWS} from '../pages/ConfigurePage'; export default function UiSchema(props) { const UiSchema = { basic: { - 'ui:order': ['general', 'credentials'], + 'ui:order': ['exploiters', 'credentials'], + exploiters: { + exploiter_classes: { + classNames: 'config-template-no-header', + 'ui:widget': AdvancedMultiSelect + } + } }, basic_network: {}, monkey: { @@ -61,14 +67,6 @@ export default function UiSchema(props) { }, cnc: {}, network: {}, - exploits: { - general: { - exploiter_classes: { - classNames: 'config-template-no-header', - 'ui:widget': AdvancedMultiSelect - } - } - }, internal: { general: { started_on_island: {'ui:widget': 'hidden'}