Skip to content

Commit 1bc283f

Browse files
authored
When ntlmrelayx's SOCKS5 proxy server receives an SMB2 Neg Protocol request, respond with the same MessageID as the client used instead of a static value of 1. (#1659)
1 parent cba9632 commit 1bc283f

File tree

1 file changed

+1
-1
lines changed
  • impacket/examples/ntlmrelayx/servers/socksplugins

1 file changed

+1
-1
lines changed

impacket/examples/ntlmrelayx/servers/socksplugins/smb.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def getNegoAnswer(self, recvPacket):
266266
respSMBCommand['DialectRevision'] = SMB2_DIALECT_WILDCARD
267267
else:
268268
respSMBCommand['DialectRevision'] = self.serverDialect
269-
resp['MessageID'] = 1
269+
resp['MessageID'] = recvPacket['MessageID']
270270
respSMBCommand['ServerGuid'] = b(''.join([random.choice(string.ascii_letters) for _ in range(16)]))
271271
respSMBCommand['Capabilities'] = 0x7
272272
respSMBCommand['MaxTransactSize'] = 65536

0 commit comments

Comments
 (0)