byt3bl33d3r / CrackMapExec

A swiss army knife for pentesting networks
BSD 2-Clause "Simplified" License
8.37k stars 1.64k forks source link

error in SMB module when trying to use -u -p #393

Closed tfcstone closed 4 years ago

tfcstone commented 4 years ago

When Running the SMB module with a username password either correct or fake the error below comes up. This has been reproduced on brand new images before and after updates

crackmapexec smb 10.10.10.178 -u '' -p '' SMB 10.10.10.178 445 HTB-NEST [*] Windows 6.1 Build 7601 (name:HTB-NEST) (domain:HTB-NEST) (signing:False) (SMBv1:False) Traceback (most recent call last): File "src/gevent/greenlet.py", line 766, in gevent._greenlet.Greenlet.run File "/usr/lib/python3/dist-packages/cme/protocols/smb.py", line 110, in init connection.init(self, args, db, host) File "/usr/lib/python3/dist-packages/cme/connection.py", line 47, in init self.proto_flow() File "/usr/lib/python3/dist-packages/cme/connection.py", line 82, in proto_flow self.login() File "/usr/lib/python3/dist-packages/cme/connection.py", line 242, in login if self.plaintext_login(self.domain, user, password): return True File "/usr/lib/python3/dist-packages/cme/protocols/smb.py", line 282, in plaintext_login self.conn.login(username, password, domain) File "/usr/lib/python3/dist-packages/impacket/smbconnection.py", line 267, in login return self._SMBConnection.login(user, password, domain, lmhash, nthash) File "/usr/lib/python3/dist-packages/impacket/smb3.py", line 778, in login type3, exportedSessionKey = ntlm.getNTLMSSPType3(auth, respToken['ResponseToken'], user, password, domain, lmhash, nthash) File "/usr/lib/python3/dist-packages/impacket/ntlm.py", line 631, in getNTLMSSPType3 ntResponse, lmResponse, sessionBaseKey = computeResponse(ntlmChallenge['flags'], ntlmChallenge['challenge'], File "/usr/lib/python3/dist-packages/impacket/ntlm.py", line 39, in computeResponse return computeResponseNTLMv2(flags, serverChallenge, clientChallenge, serverName, domain, user, password, File "/usr/lib/python3/dist-packages/impacket/ntlm.py", line 902, in computeResponseNTLMv2 responseKeyNT = NTOWFv2(user, password, domain, nthash) File "/usr/lib/python3/dist-packages/impacket/ntlm.py", line 891, in NTOWFv2 return hmac_md5(theHash, user.upper().encode('utf-16le') + domain.encode('utf-16le')) File "/usr/lib/python3/dist-packages/impacket/ntlm.py", line 882, in hmac_md5 h = hmac.new(key) File "/usr/lib/python3.8/hmac.py", line 153, in new return HMAC(key, msg, digestmod) File "/usr/lib/python3.8/hmac.py", line 51, in init raise TypeError("Missing required parameter 'digestmod'.") TypeError: Missing required parameter 'digestmod'. 2020-06-19T11:48:12Z <Greenlet at 0x7efe67fe8260: smb(Namespace(aesKey=False, clear_obfscripts=False, co, <protocol.database object at 0x7efe68049460>, '10.10.10.178')> failed with TypeError

To Reproduce See Above

Expected behavior A clear and concise description of what you expected to happen.

Crackmapexec info

Additional context Add any other context about the problem here.

mpgn commented 4 years ago

Duplicate https://github.com/byt3bl33d3r/CrackMapExec/issues/386