Use SSLVerifyMode and SSLCipher from the Exploit::Remote::Tcp mixin

bug/bundler_fix
jvazquez-r7 2015-09-28 10:31:17 -05:00
parent b206de7708
commit 4a9ef30e9e
No known key found for this signature in database
GPG Key ID: 38D99152B9352D83
1 changed files with 25 additions and 9 deletions

View File

@ -100,15 +100,17 @@ module Exploit::Remote::Tcp
end
nsock = Rex::Socket::Tcp.create(
'PeerHost' => opts['RHOST'] || rhost,
'PeerPort' => (opts['RPORT'] || rport).to_i,
'LocalHost' => opts['CHOST'] || chost || "0.0.0.0",
'LocalPort' => (opts['CPORT'] || cport || 0).to_i,
'SSL' => dossl,
'SSLVersion' => opts['SSLVersion'] || ssl_version,
'Proxies' => proxies,
'Timeout' => (opts['ConnectTimeout'] || connect_timeout || 10).to_i,
'Context' =>
'PeerHost' => opts['RHOST'] || rhost,
'PeerPort' => (opts['RPORT'] || rport).to_i,
'LocalHost' => opts['CHOST'] || chost || "0.0.0.0",
'LocalPort' => (opts['CPORT'] || cport || 0).to_i,
'SSL' => dossl,
'SSLVersion' => opts['SSLVersion'] || ssl_version,
'SSLVerifyMode' => opts['SSLVerifyMode'] || ssl_verify_mode,
'SSLCipher' => opts['SSLCipher'] || ssl_cipher,
'Proxies' => proxies,
'Timeout' => (opts['ConnectTimeout'] || connect_timeout || 10).to_i,
'Context' =>
{
'Msf' => framework,
'MsfExploit' => self,
@ -269,6 +271,20 @@ module Exploit::Remote::Tcp
datastore['ConnectTimeout']
end
#
# Returns the SSL certification verification mechanism
#
def ssl_verify_mode
datastore['SSLVerifyMode']
end
#
# Returns the SSL cipher to use for the context
#
def ssl_cipher
datastore['SSLCipher']
end
protected
attr_accessor :sock