byt3bl33d3r / CrackMapExec

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

Wordlist parsing bug #106

Closed Cat0x00 closed 8 years ago

Cat0x00 commented 8 years ago

The following triggered a bug: ./crackmapexec 127.0.0.1 -u user -p pass_file

Tool didn't manage to load passwords form a file (pass_file) which was in the current working directory. I have managed to pin point the issue (crackmapexec.py [line 162]): for user, passw, ntlm_hash in zip(args.username, args.password, args.hash):

When hash command line argument is not supplied, it becomes an empty item within zip list (or whatever it creates). This makes the Python interpreter to bypass the subsequent code block (lines 163-173) which should read the file contents and load the list of usernames || passwords || hashes. The result is that the file name (in this case - pass_file) is treated as a standalone password.

Would be nice to see this fixed ;]

byt3bl33d3r commented 8 years ago

@Cat0x00 This should be fixed now. Thanks!