From 99c302d4dc727f016f321d1b346721efa16408f4 Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Wed, 26 Aug 2020 13:04:34 +0300 Subject: [PATCH] Fixed ms08-067 python3 migration bug (bytes/strings mixup) --- monkey/infection_monkey/exploit/win_ms08_067.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/infection_monkey/exploit/win_ms08_067.py b/monkey/infection_monkey/exploit/win_ms08_067.py index 57ba3be64..897a12d9e 100644 --- a/monkey/infection_monkey/exploit/win_ms08_067.py +++ b/monkey/infection_monkey/exploit/win_ms08_067.py @@ -250,8 +250,8 @@ class Ms08_067_Exploiter(HostExploiter): vulnerable_port=SRVSVC_Exploit.TELNET_PORT) try: - sock.send("start %s\r\n" % (cmdline,)) - sock.send("net user %s /delete\r\n" % (self._config.user_to_add,)) + sock.send(("start %s\r\n" % (cmdline,)).encode()) + sock.send(("net user %s /delete\r\n" % (self._config.user_to_add,)).encode()) except Exception as exc: LOG.debug("Error in post-debug phase while exploiting victim %r: (%s)", self.host, exc) return False