Land #7521, Modernize TLS protocol configuration for SMTP / SQL Server

bug/bundler_fix
Brendan 2016-11-03 12:56:50 -05:00
commit dae1f26313
No known key found for this signature in database
GPG Key ID: ECC0F0A52E65F268
3 changed files with 8 additions and 10 deletions

View File

@ -51,8 +51,9 @@ class TDSSSLProxy
def setup_ssl
@running = true
@t1 = Thread.start { ssl_setup_thread }
ssl_context = OpenSSL::SSL::SSLContext.new(:TLSv1)
@ssl_socket = OpenSSL::SSL::SSLSocket.new(@s1, ssl_context)
ctx = OpenSSL::SSL::SSLContext.new(:SSLv23)
ctx.ciphers = "ALL:!ADH:!EXPORT:!SSLv2:!SSLv3:+HIGH:+MEDIUM"
@ssl_socket = OpenSSL::SSL::SSLSocket.new(@s1, ctx)
@ssl_socket.connect
end

View File

@ -228,12 +228,9 @@ protected
end
def generate_ssl_context
ctx = OpenSSL::SSL::SSLContext.new
ctx.key = OpenSSL::PKey::RSA.new(1024){ }
ctx.session_id_context = Rex::Text.rand_text(16)
return ctx
ctx = OpenSSL::SSL::SSLContext.new(:SSLv23)
ctx.ciphers = "ALL:!ADH:!EXPORT:!SSLv2:!SSLv3:+HIGH:+MEDIUM"
ctx
end
end

View File

@ -154,7 +154,7 @@ class MetasploitModule < Msf::Exploit::Remote
end
# NRPE uses unauthenticated Annonymous-Diffie-Hellman
# NRPE uses unauthenticated Anonymous-Diffie-Hellman
# setting the global SSL => true will break as we would be overlaying
# an SSLSocket on another SSLSocket which hasnt completed its handshake
@ -163,7 +163,7 @@ class MetasploitModule < Msf::Exploit::Remote
self.sock = super(global, opts)
if datastore['NRPESSL'] or @force_ssl
ctx = OpenSSL::SSL::SSLContext.new("TLSv1")
ctx = OpenSSL::SSL::SSLContext.new(:TLSv1)
ctx.verify_mode = OpenSSL::SSL::VERIFY_NONE
ctx.ciphers = "ADH"