diff --git a/monkey/infection_monkey/exploit/wmiexec.py b/monkey/infection_monkey/exploit/wmiexec.py index cbf34d448..e98cfa62f 100644 --- a/monkey/infection_monkey/exploit/wmiexec.py +++ b/monkey/infection_monkey/exploit/wmiexec.py @@ -65,7 +65,7 @@ class WmiExploiter(HostExploiter): wmi_connection, "Win32_Process", fields=("Caption",), - where="Name='{0}'".format(self.options["dropper_target_path_win_64"]), + where=f"Name='{ntpath.split(self.options['dropper_target_path_win_64'])[-1]}'", ) if process_list: wmi_connection.close()