From fae25939b53660a60d224e61a8b2ce9860fc5070 Mon Sep 17 00:00:00 2001 From: vakarisz Date: Wed, 16 Mar 2022 10:34:11 +0200 Subject: [PATCH] Agent: Add interrupt to WMI exploiter --- monkey/infection_monkey/exploit/wmiexec.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/monkey/infection_monkey/exploit/wmiexec.py b/monkey/infection_monkey/exploit/wmiexec.py index 7fc229ebe..1371ae9f2 100644 --- a/monkey/infection_monkey/exploit/wmiexec.py +++ b/monkey/infection_monkey/exploit/wmiexec.py @@ -30,6 +30,9 @@ class WmiExploiter(HostExploiter): creds = generate_brute_force_combinations(self.options["credentials"]) for user, password, lm_hash, ntlm_hash in creds: + if self.is_interrupted(): + return self.exploit_result + creds_for_log = get_credential_string([user, password, lm_hash, ntlm_hash]) logger.debug(f"Attempting to connect to {self.host} using WMI with {creds_for_log}")