diff --git a/monkey/infection_monkey/master/exploiter.py b/monkey/infection_monkey/master/exploiter.py index 9d5fe4f00..4355ecc16 100644 --- a/monkey/infection_monkey/master/exploiter.py +++ b/monkey/infection_monkey/master/exploiter.py @@ -86,7 +86,7 @@ class Exploiter: exploiter_results = self._run_exploiter(exploiter_name, victim_host, stop) results_callback(exploiter_name, victim_host, exploiter_results) - if exploiter["propagator"] and exploiter_results.success: + if exploiter_name != "ZerologonExploiter" and exploiter_results.success: break def _run_exploiter( diff --git a/monkey/monkey_island/cc/services/config.py b/monkey/monkey_island/cc/services/config.py index f892801d2..6cb895ead 100644 --- a/monkey/monkey_island/cc/services/config.py +++ b/monkey/monkey_island/cc/services/config.py @@ -611,9 +611,7 @@ class ConfigService: else vulnerability_category ) - formatted_exploiters_config[category].append( - {"name": exploiter, "propagator": (exploiter != "ZerologonExploiter")} - ) + formatted_exploiters_config[category].append({"name": exploiter}) config.pop(flat_config_exploiter_classes_field, None) diff --git a/monkey/tests/data_for_tests/monkey_configs/automated_master_config.json b/monkey/tests/data_for_tests/monkey_configs/automated_master_config.json index 6524a169f..aaed36c1c 100644 --- a/monkey/tests/data_for_tests/monkey_configs/automated_master_config.json +++ b/monkey/tests/data_for_tests/monkey_configs/automated_master_config.json @@ -46,20 +46,20 @@ }, "exploiters": { "brute_force": [ - {"name": "MSSQLExploiter", "propagator": true}, - {"name": "PowerShellExploiter", "propagator": true}, - {"name": "SmbExploiter", "propagator": true}, - {"name": "SSHExploiter", "propagator": true}, - {"name": "WmiExploiter", "propagator": true} + {"name": "MSSQLExploiter"}, + {"name": "PowerShellExploiter"}, + {"name": "SmbExploiter"}, + {"name": "SSHExploiter"}, + {"name": "WmiExploiter"} ], "vulnerability": [ - {"name": "DrupalExploiter", "propagator": true}, - {"name": "ElasticGroovyExploiter", "propagator": true}, - {"name": "HadoopExploiter", "propagator": true}, - {"name": "ShellShockExploiter", "propagator": true}, - {"name": "Struts2Exploiter", "propagator": true}, - {"name": "WebLogicExploiter", "propagator": true}, - {"name": "ZerologonExploiter", "propagator": false} + {"name": "DrupalExploiter"}, + {"name": "ElasticGroovyExploiter"}, + {"name": "HadoopExploiter"}, + {"name": "ShellShockExploiter"}, + {"name": "Struts2Exploiter"}, + {"name": "WebLogicExploiter"}, + {"name": "ZerologonExploiter"} ] } }, diff --git a/monkey/tests/unit_tests/infection_monkey/master/test_exploiter.py b/monkey/tests/unit_tests/infection_monkey/master/test_exploiter.py index 26067ab22..aaf30dc2d 100644 --- a/monkey/tests/unit_tests/infection_monkey/master/test_exploiter.py +++ b/monkey/tests/unit_tests/infection_monkey/master/test_exploiter.py @@ -36,11 +36,11 @@ def callback(): def exploiter_config(): return { "brute_force": [ - {"name": "PowerShellExploiter", "propagator": True}, - {"name": "SSHExploiter", "propagator": True}, + {"name": "PowerShellExploiter"}, + {"name": "SSHExploiter"}, ], "vulnerability": [ - {"name": "ZerologonExploiter", "propagator": False}, + {"name": "ZerologonExploiter"}, ], } diff --git a/monkey/tests/unit_tests/monkey_island/cc/services/test_config.py b/monkey/tests/unit_tests/monkey_island/cc/services/test_config.py index daecec1b6..60dd4e464 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/services/test_config.py +++ b/monkey/tests/unit_tests/monkey_island/cc/services/test_config.py @@ -172,20 +172,20 @@ def test_format_config_for_agent__network_scan(flat_monkey_config): def test_format_config_for_agent__exploiters(flat_monkey_config): expected_exploiters_config = { "brute_force": [ - {"name": "MSSQLExploiter", "propagator": True}, - {"name": "PowerShellExploiter", "propagator": True}, - {"name": "SSHExploiter", "propagator": True}, - {"name": "SmbExploiter", "propagator": True}, - {"name": "WmiExploiter", "propagator": True}, + {"name": "MSSQLExploiter"}, + {"name": "PowerShellExploiter"}, + {"name": "SSHExploiter"}, + {"name": "SmbExploiter"}, + {"name": "WmiExploiter"}, ], "vulnerability": [ - {"name": "DrupalExploiter", "propagator": True}, - {"name": "ElasticGroovyExploiter", "propagator": True}, - {"name": "HadoopExploiter", "propagator": True}, - {"name": "ShellShockExploiter", "propagator": True}, - {"name": "Struts2Exploiter", "propagator": True}, - {"name": "WebLogicExploiter", "propagator": True}, - {"name": "ZerologonExploiter", "propagator": False}, + {"name": "DrupalExploiter"}, + {"name": "ElasticGroovyExploiter"}, + {"name": "HadoopExploiter"}, + {"name": "ShellShockExploiter"}, + {"name": "Struts2Exploiter"}, + {"name": "WebLogicExploiter"}, + {"name": "ZerologonExploiter"}, ], } ConfigService.format_flat_config_for_agent(flat_monkey_config)