-
Notifications
You must be signed in to change notification settings - Fork 1.6k
UnicodeEncodeError when using unicode chars in supplied credentials #37
Comments
@its0x08 I'm going to need the credentials you used to reproduce this |
some times i use this command |
once again ... root@backbox:/home/its_0x08/Desktop/exploits/CrackMapExec# python crackmapexec.py -t 25 192.168.192.0/24 -u admin -p admin,password --shares [] 192.168.192.53:445 is running (name:KATRIN) (domain:KATRIN) [-] 192.168.192.59:445 ASUS-PC\admin:admin SMB SessionError: STATUS_LOGON_FAILURE(The attempted logon is invalid. This is either due to a bad username or authentication information.) |
That seems to be an Impacket bug when negotiating against a machine that has those International characters. Please fill up a bug at https://github.com/CoreSecurity/impacket/issues |
@its0x08 this is a bug with the impacket library, just filed a bug report |
@its0x08 I just fixed this issue, could you please recheck so I'm sure it's fixed correctly? You will need to git pull the latest impacket repo. |
now its fixed :) |
LDAP Enumeration and Add Computer Modules
[-] 192.168.200.44:445 ISIDORO\guest:admin SMB SessionError: STATUS_LOGON_FAILURE(The attempted logon is invalid. This is either due to a bad username or authentication information.)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 327, in run
result = self._run(_self.args, *_self.kwargs)
File "crackmapexec.py", line 2935, in connect
smb = smart_login(host, smb, domain)
File "crackmapexec.py", line 2713, in smart_login
smb.login(user, passwd, domain)
File "/usr/local/lib/python2.7/dist-packages/impacket/smbconnection.py", line 210, in login
return self._SMBConnection.login(user, password, domain, lmhash, nthash)
File "/usr/local/lib/python2.7/dist-packages/impacket/smb3.py", line 678, in login
blob['MechToken'] = str(auth)
File "/usr/local/lib/python2.7/dist-packages/impacket/structure.py", line 170, in str
return self.getData()
File "/usr/local/lib/python2.7/dist-packages/impacket/ntlm.py", line 211, in getData
return Structure.getData(self)
File "/usr/local/lib/python2.7/dist-packages/impacket/structure.py", line 121, in getData
data += self.packField(field[0], field[1])
File "/usr/local/lib/python2.7/dist-packages/impacket/structure.py", line 106, in packField
ans = self.pack(format, self.fields[fieldName], field = fieldName)
File "/usr/local/lib/python2.7/dist-packages/impacket/structure.py", line 263, in pack
return str(data)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-8: ordinal not in range(128)
<Greenlet at 0xb6552b1cL: connect('192.168.200.10')> failed with UnicodeEncodeError
[-] 192.168.200.68:445 LS--20150801JUS\admin:admin SMB SessionError: STATUS_LOGON_FAILURE(The attempted logon is invalid. This is either due to a bad username or authentication information.)
The text was updated successfully, but these errors were encountered: