Open
Description
Steps to reproduce
How'd you do it?
- point the scanner/mssql/mssql_login scanner at a box which isn't running mssql
- run it
This section should also tell us any relevant information about the
environment; for example, if an exploit that used to work is failing,
tell us the victim operating system and service versions.
Expected behavior
Should continue past the invalid box
Current behavior
falls over with this error:
[-] 1.2.3.4:1433 - Unable to parse encryption req during pre-login, this may not be a MSSQL server
[-] Auxiliary failed: NoMethodError undefined method `[]' for false:FalseClass
[-] Call stack:
[-] /root/tools/metasploit-framework/lib/metasploit/framework/mssql/client.rb:154:in `mssql_login'
[-] /root/tools/metasploit-framework/lib/metasploit/framework/login_scanner/mssql.rb:50:in `attempt_login'
[-] /root/tools/metasploit-framework/lib/metasploit/framework/login_scanner/base.rb:231:in `block in scan!'
[-] /root/tools/metasploit-framework/lib/metasploit/framework/login_scanner/base.rb:154:in `block in each_credential'
[-] /root/tools/metasploit-framework/lib/metasploit/framework/credential_collection.rb:121:in `each'
[-] /root/tools/metasploit-framework/lib/metasploit/framework/login_scanner/base.rb:141:in `each_credential'
[-] /root/tools/metasploit-framework/lib/metasploit/framework/login_scanner/base.rb:205:in `scan!'
[-] /root/tools/metasploit-framework/modules/auxiliary/scanner/mssql/mssql_login.rb:71:in `run_host'
[-] /root/tools/metasploit-framework/lib/msf/core/auxiliary/scanner.rb:111:in `block (2 levels) in run'
[-] /root/tools/metasploit-framework/lib/msf/core/thread_manager.rb:106:in `block in spawn'
I've had similar errors with other mssql modules but haven't tried those since I upgraded to the latest version.
System stuff
Metasploit version
msf5 auxiliary(scanner/mssql/mssql_login) > version
Framework: 5.0.4-dev-7633c2832a
Console : 5.0.4-dev-7633c2832a
I installed Metasploit with:
- Kali package via apt
- Omnibus installer (nightly)
- Commercial/Community installer (from http://www.rapid7.com/products/metasploit/download.jsp)
- [x ] Source install (please specify ruby version)
# ruby -v
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux-gnu]
OS
Kali