Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rescue SSLError in HTTP scanner check_setup #14225

Merged

Conversation

jmartin-tech
Copy link
Contributor

By capturing possible connection errors when SSL cannot be
negotiated, this update prevents early exit due to failure of a
single IP when scanning a range of IPs

Verification

List the steps needed to make sure this thing works

  • Start msfconsole
  • use an https based login_scanner to scan a host with the service unable to offer SSL support
  • Verify module completes
  • Verify no exception occurs

Note: there are at least 10 other known overrides of check_setup that do not rescue any errors. Due to inconsistent behaviors for these methods, scope has been limited to get a start on improvements.

By capturing possible connection errors when SSL cannot be
negotiated, this update prevents early exit due to failure of a
single IP when scanning a range of IPs
@acammack-r7 acammack-r7 added the bug label Oct 8, 2020
@bwatters-r7
Copy link
Contributor

Is there an issue associated with this bug?

@adfoster-r7 adfoster-r7 self-assigned this Oct 19, 2020
@jmartin-tech
Copy link
Contributor Author

The original bug is seen in Pro when attempting a brute force run and the unhandled error raises further than expected.

The behavior change can be seen in testing with scanner/http/zabbix_login against a metasploitable3 target:
Before:

msf6 auxiliary(scanner/http/zabbix_login) > run

[*] Error: XX.XX.XX.XX: OpenSSL::SSL::SSLError SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: sslv3 alert handshake failure
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed

After:

msf6 auxiliary(scanner/http/zabbix_login) > run

[-] XX.XX.XX.XX:8443 - Unable to connect to target
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed

@dwelch-r7 dwelch-r7 assigned dwelch-r7 and unassigned adfoster-r7 Oct 28, 2020
@dwelch-r7 dwelch-r7 merged commit c51e5b1 into rapid7:master Oct 29, 2020
@dwelch-r7
Copy link
Contributor

dwelch-r7 commented Oct 29, 2020

Release Notes

Updated rescue clauses to handle SSLError in HTTP scanner check_setup() methods.

@bnlshtl13
Copy link

bnlshtl13 commented Oct 29, 2020 via email

@jmartin-tech jmartin-tech deleted the fix/rescue-ssl-in-http-scanner branch October 29, 2020 13:58
@pbarry-r7 pbarry-r7 added the rn-fix release notes fix label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug rn-fix release notes fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants