ztgrace / changeme

A default credential scanner.
GNU General Public License v3.0
1.44k stars 248 forks source link

Windows Compatibility #25

Closed ranjithprethan closed 7 years ago

ranjithprethan commented 7 years ago

Hi, I am trying to find out the default credentials of DB server ( MS SQL). When i was trying to scan a DB server using the following command,
./changeme.py -s X.X.X.X

I get the error message below. kindly help.

Traceback (most recent call last): File "C:\changeme-master\changeme.py", line 6, in core.main() File "C:\changeme-master\changeme\core.py", line 41, in main creds = load_creds(config) File "C:\changeme-master\changeme\core.py", line 231, in load_creds protocol = get_protocol(f) File "C:\changeme-master\changeme\core.py", line 217, in get_protocol return filename.split('/')[1] IndexError: list index out of range

If we don't have a subnet IP range, please suggest me the command that is used to scan multiple web servers/db servers for default credentials. Thanks in advance

ztgrace commented 7 years ago

Hi @ranjithprethan,

Thanks for the bug report. It looks like you're trying to run this on Windows and the code is looking for a forward slash as a directory delimiter. I've obviously never tested this on Windows and your mileage may vary once I get the bug fixed. I'll post a fix shortly to address this bug using the more platform agnostic os.path.sep.

Also, mssql, telnet and ftp are currently broken. I'm hoping to have them working in the next few weeks.

ztgrace commented 7 years ago

Commit 7c7e890 now uses os.path.sep instead of the hardcoded / Please let me know if that fixes the issue.

ranjithprethan commented 7 years ago

Thank you. That error is fixed. But I have got more errors this time.

ztgrace commented 7 years ago

Ok, I'm going to convert this issues from a bug to enhancement and use it to track Windows compatibility. Please feel free to post any further errors you receive.

ranjithprethan commented 7 years ago

Hi, It's not working in Linux/ubuntu now. i tried downloading the most recent copy. Kindly look into this

xyz@xyz-VirtualBox:~/changeme-master$ ./changeme.py --help Traceback (most recent call last): File "./changeme.py", line 3, in from changeme import core File "/home/xyz/changeme-master/changeme/core.py", line 2, in from cerberus import Validator ImportError: No module named cerberus

Thanks

ztgrace commented 7 years ago

Hi @ranjithprethan, it looks like you're missing the cerberus python module. Please follow the installation instructions and let me know if you have any further issues.

ranjithprethan commented 7 years ago

Hi, It works now. I have installed the right module. Thank you

I have a small query, If my apache tomcat runs in a non-standard port ( e.g. - 8082) , can we add the port number or port range in the yaml file? Pls suggest. Thanks

ztgrace commented 7 years ago

Windows will not be supported natively, please use docker.