From c43cfe490c6465be8d3df06593b6d10e90672369 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Fri, 12 Nov 2021 13:00:00 +0100 Subject: [PATCH 1/4] Agent: Always send log to server --- monkey/infection_monkey/config.py | 1 - monkey/infection_monkey/example.conf | 1 - monkey/infection_monkey/monkey.py | 3 +-- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/monkey/infection_monkey/config.py b/monkey/infection_monkey/config.py index 996db0518..ac7084bd3 100644 --- a/monkey/infection_monkey/config.py +++ b/monkey/infection_monkey/config.py @@ -82,7 +82,6 @@ class Configuration(object): dropper_log_path_linux = "/tmp/user-1562" monkey_log_path_windows = "%temp%\\~df1563.tmp" monkey_log_path_linux = "/tmp/user-1563" - send_log_to_server = True ########################### # dropper config diff --git a/monkey/infection_monkey/example.conf b/monkey/infection_monkey/example.conf index cadcb8e8d..aab1a2a5d 100644 --- a/monkey/infection_monkey/example.conf +++ b/monkey/infection_monkey/example.conf @@ -50,7 +50,6 @@ "max_iterations": 3, "monkey_log_path_windows": "%temp%\\~df1563.tmp", "monkey_log_path_linux": "/tmp/user-1563", - "send_log_to_server": true, "ms08_067_exploit_attempts": 5, "user_to_add": "Monkey_IUSER_SUPPORT", "ping_scan_timeout": 10000, diff --git a/monkey/infection_monkey/monkey.py b/monkey/infection_monkey/monkey.py index 59eca27d8..fdb945978 100644 --- a/monkey/infection_monkey/monkey.py +++ b/monkey/infection_monkey/monkey.py @@ -323,8 +323,7 @@ class InfectionMonkey(object): ).send() # Signal the server (before closing the tunnel) InfectionMonkey.close_tunnel() firewall.close() - if WormConfiguration.send_log_to_server: - self.send_log() + self.send_log() self._singleton.unlock() InfectionMonkey.self_delete() From 00f4f19f991666f622f6d84825164d7d3ef13535 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Fri, 12 Nov 2021 13:11:35 +0100 Subject: [PATCH 2/4] Island: Remove checkbox to send log to server --- monkey/monkey_island/cc/services/config_schema/internal.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/monkey/monkey_island/cc/services/config_schema/internal.py b/monkey/monkey_island/cc/services/config_schema/internal.py index 0ba7ca07d..023944be2 100644 --- a/monkey/monkey_island/cc/services/config_schema/internal.py +++ b/monkey/monkey_island/cc/services/config_schema/internal.py @@ -302,13 +302,6 @@ INTERNAL = { "default": "%temp%\\~df1563.tmp", "description": "The fullpath of the monkey log file on Windows", }, - "send_log_to_server": { - "title": "Send log to server", - "type": "boolean", - "default": True, - "description": "Determines whether the monkey sends its log to the Monkey " - "Island server", - }, }, }, "exploits": { From bbe01778cf11410cfbdbebb85c3893fb9972bbce Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Fri, 12 Nov 2021 13:17:49 +0100 Subject: [PATCH 3/4] Changelog: Removed checkbox to send log to server --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bedf32b5..48ffd9d30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/). - Sambacry exploiter. #1567 - "Kill file" option in the config. #1536 - Netstat collector, because network connection information wasn't used anywhere. #1535 +- Checkbox to disable/enable sending log to server. #1537 ### Fixed - A bug in network map page that caused delay of telemetry log loading. #1545 From 6e65bb42654a1bbf9d3430ca06af7fb2fefa8a03 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Fri, 12 Nov 2021 15:17:32 +0100 Subject: [PATCH 4/4] UT: Remove send log to server --- .../data_for_tests/monkey_configs/monkey_config_standard.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/monkey/tests/data_for_tests/monkey_configs/monkey_config_standard.json b/monkey/tests/data_for_tests/monkey_configs/monkey_config_standard.json index 26715875c..a43c54841 100644 --- a/monkey/tests/data_for_tests/monkey_configs/monkey_config_standard.json +++ b/monkey/tests/data_for_tests/monkey_configs/monkey_config_standard.json @@ -126,8 +126,7 @@ "dropper_log_path_linux": "/tmp/user-1562", "dropper_log_path_windows": "%temp%\\~df1562.tmp", "monkey_log_path_linux": "/tmp/user-1563", - "monkey_log_path_windows": "%temp%\\~df1563.tmp", - "send_log_to_server": true + "monkey_log_path_windows": "%temp%\\~df1563.tmp" }, "exploits": { "exploit_lm_hash_list": [],