From 760d267459414796b7eb519cd9bed3a7d1e40335 Mon Sep 17 00:00:00 2001 From: Barak Hoffer Date: Thu, 8 Oct 2015 13:32:26 +0300 Subject: [PATCH] minor bug fixes --- chaos_monkey/exploit/win_ms08_067.py | 1 + chaos_monkey/exploit/wmiexec.py | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/chaos_monkey/exploit/win_ms08_067.py b/chaos_monkey/exploit/win_ms08_067.py index e3f48ceb4..2e0a5cdff 100644 --- a/chaos_monkey/exploit/win_ms08_067.py +++ b/chaos_monkey/exploit/win_ms08_067.py @@ -16,6 +16,7 @@ from model import DROPPER_CMDLINE, MONKEY_CMDLINE from exploit import HostExploiter from exploit.tools import SmbTools, get_target_monkey from network.tools import check_port_tcp +from network import SMBFinger try: from impacket import smb diff --git a/chaos_monkey/exploit/wmiexec.py b/chaos_monkey/exploit/wmiexec.py index 172354445..089d035f8 100644 --- a/chaos_monkey/exploit/wmiexec.py +++ b/chaos_monkey/exploit/wmiexec.py @@ -74,14 +74,10 @@ class WmiExploiter(HostExploiter): password, src_path, self._config.dropper_target_path) - remote_full_path = False if not remote_full_path: - remote_full_path = self._config.dropper_target_path - http_path = HTTPTools.create_transfer(host, - src_path, - remote_full_path) - cmdline = MONKEY_CMDLINE_HTTP % {'http_path': http_path, 'monkey_path': remote_full_path} + wmi_connection.close() + return False # execute the remote dropper in case the path isn't final elif remote_full_path.lower() != self._config.dropper_target_path.lower(): cmdline = DROPPER_CMDLINE % {'dropper_path': remote_full_path}