Skip to content

Commit 4da1954

Browse files
author
cyber02
committed
fix: added reference to issue Pennyw0rth#694 in NTLM workstation field comment, added the same fix to the hash_login() method
1 parent fcb3078 commit 4da1954

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

nxc/protocols/winrm.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ def check_if_admin(self):
146146

147147
def plaintext_login(self, domain, username, password):
148148
# Add server hostname to the Workstation field in NTLM Authenticate Message (Message 3)
149+
# This helps fix false negatives during NTLM auth — see issue #694 for details
149150
os.environ["NETBIOS_COMPUTER_NAME"] = self.hostname
150151
self.admin_privs = False
151152
self.password = password
@@ -185,6 +186,9 @@ def plaintext_login(self, domain, username, password):
185186
return False
186187

187188
def hash_login(self, domain, username, ntlm_hash):
189+
# Add server hostname to the Workstation field in NTLM Authenticate Message (Message 3)
190+
# This helps fix false negatives during NTLM auth — see issue #694 for details
191+
os.environ["NETBIOS_COMPUTER_NAME"] = self.hostname
188192
self.admin_privs = False
189193
lmhash = "00000000000000000000000000000000"
190194
nthash = ""

0 commit comments

Comments
 (0)