From ee1a321416bc7e35a115ba3ed6f32f20ddde8f0f Mon Sep 17 00:00:00 2001 From: Itay Mizeretz Date: Mon, 19 Feb 2018 18:32:05 +0200 Subject: [PATCH] Send log to island is configurable --- chaos_monkey/config.py | 1 + chaos_monkey/example.conf | 1 + chaos_monkey/monkey.py | 3 ++- monkey_island/cc/services/config.py | 6 ++++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/chaos_monkey/config.py b/chaos_monkey/config.py index e62820816..9ec784594 100644 --- a/chaos_monkey/config.py +++ b/chaos_monkey/config.py @@ -106,6 +106,7 @@ 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/chaos_monkey/example.conf b/chaos_monkey/example.conf index 6f70f888a..13fa33492 100644 --- a/chaos_monkey/example.conf +++ b/chaos_monkey/example.conf @@ -48,6 +48,7 @@ "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, "ms08_067_remote_user_add": "Monkey_IUSER_SUPPORT", "ms08_067_remote_user_pass": "Password1!", diff --git a/chaos_monkey/monkey.py b/chaos_monkey/monkey.py index 79e8bf3ec..530e0785e 100644 --- a/chaos_monkey/monkey.py +++ b/chaos_monkey/monkey.py @@ -227,7 +227,8 @@ class ChaosMonkey(object): firewall.close() - self.send_log() + if WormConfiguration.send_log_to_server: + self.send_log() self._singleton.unlock() diff --git a/monkey_island/cc/services/config.py b/monkey_island/cc/services/config.py index ea755312f..e9822ea75 100644 --- a/monkey_island/cc/services/config.py +++ b/monkey_island/cc/services/config.py @@ -483,6 +483,12 @@ SCHEMA = { "type": "string", "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" } } },