From 55a817931d8aebaa3210e9788813a636120c9eaa Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Fri, 27 Nov 2020 17:48:00 +0200 Subject: [PATCH] Bugfix for monkey binary removal if dropper fails to do so --- monkey/infection_monkey/dropper.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/monkey/infection_monkey/dropper.py b/monkey/infection_monkey/dropper.py index 781a0614a..50e5008f1 100644 --- a/monkey/infection_monkey/dropper.py +++ b/monkey/infection_monkey/dropper.py @@ -202,7 +202,7 @@ class MonkeyDrops(object): ) # mark the file for removal on next boot - dropper_source_path_ctypes = c_char_p(self._config["source_path"]) + dropper_source_path_ctypes = c_char_p(self._config["source_path"].encode()) if 0 == ctypes.windll.kernel32.MoveFileExA( dropper_source_path_ctypes, None, MOVEFILE_DELAY_UNTIL_REBOOT ): @@ -218,7 +218,6 @@ class MonkeyDrops(object): self._config["source_path"], ) T1106Telem(ScanStatus.USED, UsageEnum.DROPPER_WINAPI).send() - LOG.info("Dropper cleanup complete") except AttributeError: LOG.error("Invalid configuration options. Failing")