Land #6014, support TCP advanced options for loginscanner mods
commit
a2c9e2549d
|
@ -30,6 +30,12 @@ module Metasploit
|
|||
# @!attribute port
|
||||
# @return [Fixnum] The port to connect to
|
||||
attr_accessor :port
|
||||
# @!attribute host
|
||||
# @return [String] The local host for outgoing connections
|
||||
attr_accessor :local_host
|
||||
# @!attribute port
|
||||
# @return [Fixnum] The local port for outgoing connections
|
||||
attr_accessor :local_port
|
||||
# @!attribute proxies
|
||||
# @return [String] The proxy directive to use for the socket
|
||||
attr_accessor :proxies
|
||||
|
|
|
@ -18,17 +18,15 @@ module Metasploit
|
|||
# @!attribute ssl_version
|
||||
# @return [String] The version of SSL to implement
|
||||
attr_accessor :ssl_version
|
||||
# @!attribute ssl_verify_mode
|
||||
# @return [String] the SSL certification verification mechanism
|
||||
attr_accessor :ssl_verify_mode
|
||||
# @!attribute ssl_cipher
|
||||
# @return [String] The SSL cipher to use for the context
|
||||
attr_accessor :ssl_cipher
|
||||
|
||||
private
|
||||
|
||||
def chost
|
||||
'0.0.0.0'
|
||||
end
|
||||
|
||||
def cport
|
||||
0
|
||||
end
|
||||
|
||||
def rhost
|
||||
host
|
||||
end
|
||||
|
@ -36,6 +34,14 @@ module Metasploit
|
|||
def rport
|
||||
port
|
||||
end
|
||||
|
||||
def chost
|
||||
local_host || '0.0.0.0'
|
||||
end
|
||||
|
||||
def cport
|
||||
local_port || 0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -82,15 +82,17 @@ module Metasploit
|
|||
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'] || connection_timeout || 10).to_i,
|
||||
'Context' => { 'Msf' => framework, 'MsfExploit' => framework_module }
|
||||
'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'] || connection_timeout || 10).to_i,
|
||||
'Context' => { 'Msf' => framework, 'MsfExploit' => framework_module }
|
||||
)
|
||||
# enable evasions on this socket
|
||||
set_tcp_evasions(nsock)
|
||||
|
|
|
@ -74,6 +74,12 @@ class Metasploit3 < Msf::Auxiliary
|
|||
send_delay: datastore['TCP::send_delay'],
|
||||
framework: framework,
|
||||
framework_module: self,
|
||||
ssl: datastore['SSL'],
|
||||
ssl_version: datastore['SSLVersion'],
|
||||
ssl_verify_mode: datastore['SSLVerifyMode'],
|
||||
ssl_cipher: datastore['SSLCipher'],
|
||||
local_port: datastore['CPORT'],
|
||||
local_host: datastore['CHOST']
|
||||
)
|
||||
|
||||
scanner.scan! do |result|
|
||||
|
|
|
@ -69,6 +69,12 @@ class Metasploit3 < Msf::Auxiliary
|
|||
send_delay: datastore['TCP::send_delay'],
|
||||
framework: framework,
|
||||
framework_module: self,
|
||||
ssl: datastore['SSL'],
|
||||
ssl_version: datastore['SSLVersion'],
|
||||
ssl_verify_mode: datastore['SSLVerifyMode'],
|
||||
ssl_cipher: datastore['SSLCipher'],
|
||||
local_port: datastore['CPORT'],
|
||||
local_host: datastore['CHOST']
|
||||
)
|
||||
|
||||
scanner.scan! do |result|
|
||||
|
|
|
@ -67,6 +67,12 @@ class Metasploit3 < Msf::Auxiliary
|
|||
send_delay: datastore['TCP::send_delay'],
|
||||
framework: framework,
|
||||
framework_module: self,
|
||||
ssl: datastore['SSL'],
|
||||
ssl_version: datastore['SSLVersion'],
|
||||
ssl_verify_mode: datastore['SSLVerifyMode'],
|
||||
ssl_cipher: datastore['SSLCipher'],
|
||||
local_port: datastore['CPORT'],
|
||||
local_host: datastore['CHOST']
|
||||
)
|
||||
|
||||
scanner.scan! do |result|
|
||||
|
|
|
@ -81,6 +81,12 @@ class Metasploit3 < Msf::Auxiliary
|
|||
connection_timeout: 30,
|
||||
framework: framework,
|
||||
framework_module: self,
|
||||
ssl: datastore['SSL'],
|
||||
ssl_version: datastore['SSLVersion'],
|
||||
ssl_verify_mode: datastore['SSLVerifyMode'],
|
||||
ssl_cipher: datastore['SSLCipher'],
|
||||
local_port: datastore['CPORT'],
|
||||
local_host: datastore['CHOST']
|
||||
)
|
||||
|
||||
scanner.scan! do |result|
|
||||
|
|
|
@ -58,6 +58,12 @@ class Metasploit3 < Msf::Auxiliary
|
|||
windows_authentication: datastore['USE_WINDOWS_AUTHENT'],
|
||||
framework: framework,
|
||||
framework_module: self,
|
||||
ssl: datastore['SSL'],
|
||||
ssl_version: datastore['SSLVersion'],
|
||||
ssl_verify_mode: datastore['SSLVerifyMode'],
|
||||
ssl_cipher: datastore['SSLCipher'],
|
||||
local_port: datastore['CPORT'],
|
||||
local_host: datastore['CHOST']
|
||||
)
|
||||
|
||||
scanner.scan! do |result|
|
||||
|
|
|
@ -66,6 +66,12 @@ class Metasploit3 < Msf::Auxiliary
|
|||
send_delay: datastore['TCP::send_delay'],
|
||||
framework: framework,
|
||||
framework_module: self,
|
||||
ssl: datastore['SSL'],
|
||||
ssl_version: datastore['SSLVersion'],
|
||||
ssl_verify_mode: datastore['SSLVerifyMode'],
|
||||
ssl_cipher: datastore['SSLCipher'],
|
||||
local_port: datastore['CPORT'],
|
||||
local_host: datastore['CHOST']
|
||||
)
|
||||
|
||||
scanner.scan! do |result|
|
||||
|
|
|
@ -75,6 +75,12 @@ class Metasploit3 < Msf::Auxiliary
|
|||
send_delay: datastore['TCP::send_delay'],
|
||||
framework: framework,
|
||||
framework_module: self,
|
||||
ssl: datastore['SSL'],
|
||||
ssl_version: datastore['SSLVersion'],
|
||||
ssl_verify_mode: datastore['SSLVerifyMode'],
|
||||
ssl_cipher: datastore['SSLCipher'],
|
||||
local_port: datastore['CPORT'],
|
||||
local_host: datastore['CHOST']
|
||||
)
|
||||
|
||||
scanner.scan! do |result|
|
||||
|
|
|
@ -116,6 +116,12 @@ class Metasploit4 < Msf::Auxiliary
|
|||
pre_login: lambda { |s| raw_send("enable\r\n", s.sock) },
|
||||
framework: framework,
|
||||
framework_module: self,
|
||||
ssl: datastore['SSL'],
|
||||
ssl_version: datastore['SSLVersion'],
|
||||
ssl_verify_mode: datastore['SSLVerifyMode'],
|
||||
ssl_cipher: datastore['SSLCipher'],
|
||||
local_port: datastore['CPORT'],
|
||||
local_host: datastore['CHOST']
|
||||
)
|
||||
|
||||
scanner.scan! do |result|
|
||||
|
|
|
@ -72,6 +72,12 @@ class Metasploit3 < Msf::Auxiliary
|
|||
telnet_timeout: datastore['TelnetTimeout'],
|
||||
framework: framework,
|
||||
framework_module: self,
|
||||
ssl: datastore['SSL'],
|
||||
ssl_version: datastore['SSLVersion'],
|
||||
ssl_verify_mode: datastore['SSLVerifyMode'],
|
||||
ssl_cipher: datastore['SSLCipher'],
|
||||
local_port: datastore['CPORT'],
|
||||
local_host: datastore['CHOST']
|
||||
)
|
||||
|
||||
scanner.scan! do |result|
|
||||
|
|
|
@ -78,6 +78,12 @@ class Metasploit3 < Msf::Auxiliary
|
|||
send_delay: datastore['TCP::send_delay'],
|
||||
framework: framework,
|
||||
framework_module: self,
|
||||
ssl: datastore['SSL'],
|
||||
ssl_version: datastore['SSLVersion'],
|
||||
ssl_verify_mode: datastore['SSLVerifyMode'],
|
||||
ssl_cipher: datastore['SSLCipher'],
|
||||
local_port: datastore['CPORT'],
|
||||
local_host: datastore['CHOST']
|
||||
)
|
||||
|
||||
scanner.scan! do |result|
|
||||
|
|
|
@ -83,6 +83,12 @@ class Metasploit3 < Msf::Auxiliary
|
|||
send_delay: datastore['TCP::send_delay'],
|
||||
framework: framework,
|
||||
framework_module: self,
|
||||
ssl: datastore['SSL'],
|
||||
ssl_version: datastore['SSLVersion'],
|
||||
ssl_verify_mode: datastore['SSLVerifyMode'],
|
||||
ssl_cipher: datastore['SSLCipher'],
|
||||
local_port: datastore['CPORT'],
|
||||
local_host: datastore['CHOST']
|
||||
)
|
||||
|
||||
scanner.scan! do |result|
|
||||
|
|
Loading…
Reference in New Issue