Agent, Island: Modify config to remove boolean propagator field
This commit is contained in:
parent
0bfa0cd1ca
commit
915c58e8cc
|
@ -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(
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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"}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
|
|
@ -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"},
|
||||
],
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue