From 9052e48286cb2fcdafcc5f5087547b9b52dbc1f5 Mon Sep 17 00:00:00 2001 From: byt3bl33d3r Date: Fri, 8 Apr 2016 19:58:01 -0600 Subject: [PATCH] Removed decription of authentication error (will display if --verbose is passed) Fixed host tracking in the inject_pe_dll.py module --- core/connection.py | 6 ++++-- modules/code_execution/pe_dll_inject.py | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/core/connection.py b/core/connection.py index 38b2afb9..abc32179 100644 --- a/core/connection.py +++ b/core/connection.py @@ -100,7 +100,8 @@ class Connection: self.logger.success(out) return True except SessionError as e: - self.logger.error(u'{}\\{}:{} {}'.format(self.domain, username, password, str(e).split(':')[1])) + error, desc = e.getErrorString() + self.logger.error(u'{}\\{}:{} {} {}'.format(self.domain, username, password, error, '({})'.format(desc) if self.args.verbose else '')) return False def hash_login(self, username, ntlm_hash): @@ -131,7 +132,8 @@ class Connection: self.logger.success(out) return True except SessionError as e: - self.logger.error(u'{}\\{} {} {}'.format(self.domain, username, ntlm_hash, str(e).split(':')[1])) + error, desc = e.getErrorString() + self.logger.error(u'{}\\{} {} {}'.format(self.domain, username, ntlm_hash, error)) return False def login(self): diff --git a/modules/code_execution/pe_dll_inject.py b/modules/code_execution/pe_dll_inject.py index 8b4fc054..07b374d8 100644 --- a/modules/code_execution/pe_dll_inject.py +++ b/modules/code_execution/pe_dll_inject.py @@ -72,11 +72,11 @@ class CMEModule: request.send_response(200) request.end_headers() + request.stop_tracking_host() + with open(self.payload_path, 'rb') as payload: request.wfile.write(payload.read()) - request.stop_tracking_host() - else: request.send_response(404) request.end_headers() \ No newline at end of file