Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Commit

Permalink
Fix false positive signing disabled with SMB2/3
Browse files Browse the repository at this point in the history
Currently, the SMBConnection.isSigningRequired and SMB3.is_signing_required methods in Impacket reflect the state of the session as opposed to the state of the connection.  When using CME with the --gen-relay-list option, the login method would encounter an exception near the end, and would reset the session state.  Afterwards, the connection state correctly showed that signing was required, but the session state claimed the opposite.  The latter contributed to many false positives in the --gen-relay-list output file.  This is a hackish change that addressed the issue for me.
  • Loading branch information
hantwister authored Mar 26, 2019
1 parent 333f1c4 commit 85e4de9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cme/protocols/smb.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def enum_host_info(self):
self.domain = self.conn.getServerDomain()
self.hostname = self.conn.getServerName()
self.server_os = self.conn.getServerOS()
self.signing = self.conn.isSigningRequired()
self.signing = self.conn.isSigningRequired() if self.smbv1 else self.conn._SMBConnection._Connection['RequireSigning']
self.os_arch = self.get_os_arch()

self.output_filename = os.path.expanduser('~/.cme/logs/{}_{}_{}'.format(self.hostname, self.host, datetime.now().strftime("%Y-%m-%d_%H%M%S")))
Expand Down

0 comments on commit 85e4de9

Please sign in to comment.