Agent: Fix malformed WMI query in WMIExploiter

This commit is contained in:
Mike Salvatore 2022-03-08 15:15:37 -05:00 committed by vakarisz
parent e76b46c8ca
commit 98f8a5b48a
1 changed files with 1 additions and 1 deletions

View File

@ -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()