diff --git a/CHANGELOG.md b/CHANGELOG.md index 4af0e245b..63fa2717a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/). - T1082 attack technique report. #1754 - 32-bit agents. #1675 - Log path config options. #1761 +- "smb_service_name" option. #1741 ### Fixed - A bug in network map page that caused delay of telemetry log loading. #1545 diff --git a/monkey/infection_monkey/config.py b/monkey/infection_monkey/config.py index 8a920cc52..96783a249 100644 --- a/monkey/infection_monkey/config.py +++ b/monkey/infection_monkey/config.py @@ -120,7 +120,6 @@ class Configuration(object): # smb/wmi exploiter smb_download_timeout = 30 # timeout in seconds - smb_service_name = "InfectionMonkey" ########################### # post breach actions diff --git a/monkey/infection_monkey/example.conf b/monkey/infection_monkey/example.conf index f0cbb6e16..7a4386107 100644 --- a/monkey/infection_monkey/example.conf +++ b/monkey/infection_monkey/example.conf @@ -38,7 +38,6 @@ ], "ping_scan_timeout": 10000, "smb_download_timeout": 300, - "smb_service_name": "InfectionMonkey", "self_delete_in_cleanup": true, "exploit_user_list": [], "exploit_password_list": [], diff --git a/monkey/infection_monkey/exploit/smbexec.py b/monkey/infection_monkey/exploit/smbexec.py index b5b6f65c3..9a978b8a9 100644 --- a/monkey/infection_monkey/exploit/smbexec.py +++ b/monkey/infection_monkey/exploit/smbexec.py @@ -23,6 +23,7 @@ class SmbExploiter(HostExploiter): "445/SMB": (r"ncacn_np:%s[\pipe\svcctl]", 445), } USE_KERBEROS = False + SMB_SERVICE_NAME = "InfectionMonkey" def __init__(self, host): super(SmbExploiter, self).__init__(host) @@ -162,8 +163,8 @@ class SmbExploiter(HostExploiter): resp = scmr.hRCreateServiceW( scmr_rpc, sc_handle, - self._config.smb_service_name, - self._config.smb_service_name, + SmbExploiter.SMB_SERVICE_NAME, + SmbExploiter.SMB_SERVICE_NAME, lpBinaryPathName=cmdline, ) service = resp["lpServiceHandle"] diff --git a/monkey/monkey_island/cc/services/config_schema/internal.py b/monkey/monkey_island/cc/services/config_schema/internal.py index 26326721c..1db04b4ae 100644 --- a/monkey/monkey_island/cc/services/config_schema/internal.py +++ b/monkey/monkey_island/cc/services/config_schema/internal.py @@ -225,13 +225,6 @@ INTERNAL = { "description": "Timeout (in seconds) for SMB download operation (used in " "various exploits using SMB)", }, - "smb_service_name": { - "title": "SMB service name", - "type": "string", - "default": "InfectionMonkey", - "description": "Name of the SMB service that will be set up to download " - "monkey", - }, }, }, }, diff --git a/monkey/tests/data_for_tests/monkey_configs/flat_config.json b/monkey/tests/data_for_tests/monkey_configs/flat_config.json index 1f82c5499..f36bc5d18 100644 --- a/monkey/tests/data_for_tests/monkey_configs/flat_config.json +++ b/monkey/tests/data_for_tests/monkey_configs/flat_config.json @@ -90,7 +90,6 @@ } }, "smb_download_timeout": 300, - "smb_service_name": "InfectionMonkey", "subnet_scan_list": ["192.168.1.50", "192.168.56.0/24", "10.0.33.0/30"], "system_info_collector_classes": [ "MimikatzCollector"