From 31df3d3b5d95684e5af2570e32c8b8c91945eac3 Mon Sep 17 00:00:00 2001 From: int3x Date: Fri, 22 May 2026 01:52:07 -0400 Subject: [PATCH 1/2] Add missing remove_target attribute to NTLMRelayxConfig --- lib/relay/utils/config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/relay/utils/config.py b/lib/relay/utils/config.py index d9a3105..f5d6564 100644 --- a/lib/relay/utils/config.py +++ b/lib/relay/utils/config.py @@ -49,6 +49,7 @@ def __init__(self): self.dumpHashes = False self.SMBServerChallenge = None self.remove_mic = False + self.remove_target = False def setSMB2Support(self, value): self.smb2support = value From 1bfc6e94ddacf11be60ee5359f3199e481575bc5 Mon Sep 17 00:00:00 2001 From: int3x Date: Fri, 22 May 2026 02:30:00 -0400 Subject: [PATCH 2/2] Fix incorrect body parsing on multipart requests Using b"\r\n\r\n" to parse requests into header and body has edge cases. For example, multipart bodies contain additional CRLF separators in the body (between each part's mini-headers and its content). --- lib/relay/servers/socksplugins/http.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/relay/servers/socksplugins/http.py b/lib/relay/servers/socksplugins/http.py index 767ca9b..066b9f5 100644 --- a/lib/relay/servers/socksplugins/http.py +++ b/lib/relay/servers/socksplugins/http.py @@ -736,15 +736,14 @@ def prepareRequest(self, data): response.append(part) # Append the body response.append(b'') - body_parts = data.split(EOL+EOL) - if len(body_parts) > 1: - response.append(body_parts[1]) + headerSize = data.find(EOL+EOL) + if headerSize != -1: + response.append(data[headerSize + 4:]) else: response.append(b'') # No body for GET requests senddata = EOL.join(response) # Check if the body is larger than 1 packet - headerSize = data.find(EOL+EOL) headers = self.getHeaders(data) try: bodySize = int(headers.get('content-length', 0))