From bc934b0467263518c43600f4c938e1929f825002 Mon Sep 17 00:00:00 2001 From: Erik Geiser <70747329+rtpt-erikgeiser@users.noreply.github.com> Date: Thu, 5 Dec 2024 15:38:41 +0100 Subject: [PATCH] ntlmrelayx.py: Set log level for 'Unsupported MechType' to DEBUG (#1647) --- impacket/examples/ntlmrelayx/servers/smbrelayserver.py | 2 +- impacket/examples/ntlmrelayx/servers/wcfrelayserver.py | 2 +- impacket/smbserver.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/impacket/examples/ntlmrelayx/servers/smbrelayserver.py b/impacket/examples/ntlmrelayx/servers/smbrelayserver.py index 16ee2da251..1dda84f420 100644 --- a/impacket/examples/ntlmrelayx/servers/smbrelayserver.py +++ b/impacket/examples/ntlmrelayx/servers/smbrelayserver.py @@ -263,7 +263,7 @@ def SmbSessionSetup(self, connId, smbServer, recvPacket): mechStr = MechTypes[mechType] else: mechStr = hexlify(mechType) - smbServer.log("Unsupported MechType '%s'" % mechStr, logging.CRITICAL) + smbServer.log("Unsupported MechType '%s'" % mechStr, logging.DEBUG) # We don't know the token, we answer back again saying # we just support NTLM. respToken = SPNEGO_NegTokenResp() diff --git a/impacket/examples/ntlmrelayx/servers/wcfrelayserver.py b/impacket/examples/ntlmrelayx/servers/wcfrelayserver.py index 01dccf6cdc..d984b3f336 100644 --- a/impacket/examples/ntlmrelayx/servers/wcfrelayserver.py +++ b/impacket/examples/ntlmrelayx/servers/wcfrelayserver.py @@ -160,7 +160,7 @@ def handle(self): mechStr = MechTypes[mechType] else: mechStr = hexlify(mechType) - LOG.error("Unsupported MechType '%s'" % mechStr) + LOG.debug("Unsupported MechType '%s'" % mechStr) # We don't know the token, we answer back again saying # we just support NTLM. respToken = SPNEGO_NegTokenResp() diff --git a/impacket/smbserver.py b/impacket/smbserver.py index 5e1f08dd90..649228c586 100644 --- a/impacket/smbserver.py +++ b/impacket/smbserver.py @@ -2460,7 +2460,7 @@ def smbComSessionSetupAndX(connId, smbServer, SMBCommand, recvPacket): mechStr = MechTypes[mechType] else: mechStr = hexlify(mechType) - smbServer.log("Unsupported MechType '%s'" % mechStr, logging.CRITICAL) + smbServer.log("Unsupported MechType '%s'" % mechStr, logging.DEBUG) # We don't know the token, we answer back again saying # we just support NTLM. # ToDo: Build this into a SPNEGO_NegTokenResp() @@ -2862,7 +2862,7 @@ def smb2SessionSetup(connId, smbServer, recvPacket): mechStr = MechTypes[mechType] else: mechStr = hexlify(mechType) - smbServer.log("Unsupported MechType '%s'" % mechStr, logging.CRITICAL) + smbServer.log("Unsupported MechType '%s'" % mechStr, logging.DEBUG) # We don't know the token, we answer back again saying # we just support NTLM. # ToDo: Build this into a SPNEGO_NegTokenResp()