byt3bl33d3r / CrackMapExec

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

Error when using Passwords with symbols #150

Closed vysecurity closed 7 years ago

vysecurity commented 7 years ago
root@r00t3d:~# cme 192.168.115.130 -u administrator -p Password123\!\!
CME          192.168.115.130:445 WIN-71UN1DFATB0 [*] Windows 6.1 Build 7601 (name:WIN-71UN1DFATB0) (domain:WIN-71UN1DFATB0)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/gevent-1.2.1-py2.7-linux-x86_64.egg/gevent/greenlet.py", line 536, in run
    result = self._run(*self.args, **self.kwargs)
  File "/usr/local/lib/python2.7/dist-packages/crackmapexec-3.1.5dev-py2.7.egg/cme/connection.py", line 146, in __init__
    self.login()
  File "/usr/local/lib/python2.7/dist-packages/crackmapexec-3.1.5dev-py2.7.egg/cme/connection.py", line 411, in login
    if self.plaintext_login(self.domain, user, password): return
  File "/usr/local/lib/python2.7/dist-packages/crackmapexec-3.1.5dev-py2.7.egg/cme/connection.py", line 253, in plaintext_login
    self.db.add_credential('plaintext', domain, username, password)
  File "/usr/local/lib/python2.7/dist-packages/crackmapexec-3.1.5dev-py2.7.egg/cme/database.py", line 30, in add_credential
    cur.execute("INSERT INTO credentials (credtype, domain, username, password, pillagedfrom) VALUES (?,?,?,?,?)", [credtype, domain, username, password, pillaged_from] )
OperationalError: table credentials has no column named pillagedfrom
Fri Jan 20 04:14:50 2017 <Greenlet at 0x7f24edd5de10: Connection(Namespace(content=False, cred_id=[], depth=10, dis, <cme.database.CMEDatabase instance at 0x7f24ed58db, '192.168.115.130', None, None)> failed with OperationalError

[*] KTHXBYE!

This is only an issue when I use passwords with symbols

vysecurity commented 7 years ago

Actually weird, may be my issue, it pops up regardless of the password.

byt3bl33d3r commented 7 years ago

@vysec looks like you have an old database version, try deleting ~/.cme and try again