From 7e2e2aa15fd3f2b79300d13606bebd9c6b380129 Mon Sep 17 00:00:00 2001 From: Itay Mizeretz Date: Tue, 26 Sep 2017 20:00:56 +0300 Subject: [PATCH] Global config updates of creds now apply to running monkeys Fix issue caused by moving of the credentials to basic tab --- monkey_island/cc/services/config.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/monkey_island/cc/services/config.py b/monkey_island/cc/services/config.py index 8af645dcc..9ad727b08 100644 --- a/monkey_island/cc/services/config.py +++ b/monkey_island/cc/services/config.py @@ -837,13 +837,19 @@ class ConfigService: upsert=False ) + mongo.db.monkey.update( + {}, + {'$addToSet': {'config.' + item_key.split('.')[-1]: item_value}}, + multi=True + ) + @staticmethod def creds_add_username(username): - ConfigService.add_item_to_config_set('exploits.credentials.exploit_user_list', username) + ConfigService.add_item_to_config_set('basic.credentials.exploit_user_list', username) @staticmethod def creds_add_password(password): - ConfigService.add_item_to_config_set('exploits.credentials.exploit_password_list', password) + ConfigService.add_item_to_config_set('basic.credentials.exploit_password_list', password) @staticmethod def creds_add_lm_hash(lm_hash):