Remove host key checks on ssh scanner modules
parent
2e75f46d34
commit
905f26372d
|
@ -70,13 +70,14 @@ class MetasploitModule < Msf::Auxiliary
|
|||
def do_login(user, pass, ip)
|
||||
factory = ssh_socket_factory
|
||||
opts = {
|
||||
auth_methods: ['password'],
|
||||
port: rport,
|
||||
config: false,
|
||||
use_agent: false,
|
||||
password: pass,
|
||||
proxy: factory,
|
||||
non_interactive: true
|
||||
:auth_methods => ['password'],
|
||||
:port => rport,
|
||||
:config => false,
|
||||
:use_agent => false,
|
||||
:password => pass,
|
||||
:proxy => factory,
|
||||
:non_interactive => true,
|
||||
:verify_host_key => :never
|
||||
}
|
||||
|
||||
opts.merge!(verbose: :debug) if datastore['SSH_DEBUG']
|
||||
|
|
|
@ -67,13 +67,14 @@ class MetasploitModule < Msf::Auxiliary
|
|||
|
||||
def check_vulnerable(ip)
|
||||
opt_hash = {
|
||||
port: rport,
|
||||
auth_methods: ['password', 'keyboard-interactive'],
|
||||
use_agent: false,
|
||||
config: false,
|
||||
password_prompt: Net::SSH::Prompt.new,
|
||||
non_interactive: true,
|
||||
proxies: datastore['Proxies']
|
||||
:port => rport,
|
||||
:auth_methods => ['password', 'keyboard-interactive'],
|
||||
:use_agent => false,
|
||||
:config => false,
|
||||
:password_prompt => Net::SSH::Prompt.new,
|
||||
:non_interactive => true,
|
||||
:proxies => datastore['Proxies'],
|
||||
:verify_host_key => :never
|
||||
}
|
||||
|
||||
begin
|
||||
|
@ -105,11 +106,12 @@ class MetasploitModule < Msf::Auxiliary
|
|||
pass = Rex::Text.rand_text_alphanumeric(8)
|
||||
|
||||
opt_hash = {
|
||||
auth_methods: ['password', 'keyboard-interactive'],
|
||||
port: port,
|
||||
use_agent: false,
|
||||
config: false,
|
||||
proxies: datastore['Proxies']
|
||||
:auth_methods => ['password', 'keyboard-interactive'],
|
||||
:port => port,
|
||||
:use_agent => false,
|
||||
:config => false,
|
||||
:proxies => datastore['Proxies'],
|
||||
:verify_host_key => :never
|
||||
}
|
||||
|
||||
opt_hash.merge!(verbose: :debug) if datastore['SSH_DEBUG']
|
||||
|
|
|
@ -48,14 +48,15 @@ class MetasploitModule < Msf::Auxiliary
|
|||
factory = ssh_socket_factory
|
||||
|
||||
ssh_opts = {
|
||||
port: rport,
|
||||
:port => rport,
|
||||
# The auth method is converted into a class name for instantiation,
|
||||
# so fortinet-backdoor here becomes FortinetBackdoor from the mixin
|
||||
auth_methods: ['fortinet-backdoor'],
|
||||
non_interactive: true,
|
||||
config: false,
|
||||
use_agent: false,
|
||||
proxy: factory
|
||||
:auth_methods => ['fortinet-backdoor'],
|
||||
:non_interactive => true,
|
||||
:config => false,
|
||||
:use_agent => false,
|
||||
:proxy => factory,
|
||||
:verify_host_key => :never
|
||||
}
|
||||
|
||||
ssh_opts.merge!(verbose: :debug) if datastore['SSH_DEBUG']
|
||||
|
|
|
@ -43,11 +43,12 @@ class MetasploitModule < Msf::Auxiliary
|
|||
def run_host(ip)
|
||||
factory = ssh_socket_factory
|
||||
ssh_opts = {
|
||||
port: rport,
|
||||
auth_methods: ['password', 'keyboard-interactive'],
|
||||
password: %q{<<< %s(un='%s') = %u},
|
||||
proxy: factory,
|
||||
:non_interactive => true
|
||||
:port => rport,
|
||||
:auth_methods => ['password', 'keyboard-interactive'],
|
||||
:password => %q{<<< %s(un='%s') = %u},
|
||||
:proxy => factory,
|
||||
:non_interactive => true,
|
||||
:verify_host_key => :never
|
||||
}
|
||||
|
||||
ssh_opts.merge!(verbose: :debug) if datastore['SSH_DEBUG']
|
||||
|
|
|
@ -86,7 +86,8 @@ class MetasploitModule < Msf::Auxiliary
|
|||
:password => pass,
|
||||
:config => false,
|
||||
:proxy => factory,
|
||||
:non_interactive => true
|
||||
:non_interactive => true,
|
||||
:verify_host_key => :never
|
||||
}
|
||||
|
||||
opt_hash.merge!(:verbose => :debug) if datastore['SSH_DEBUG']
|
||||
|
|
|
@ -210,7 +210,8 @@ class MetasploitModule < Msf::Auxiliary
|
|||
:use_agent => false,
|
||||
:config =>false,
|
||||
:proxy => factory,
|
||||
:non_interactive => true
|
||||
:non_interactive => true,
|
||||
:verify_host_key => :never
|
||||
}
|
||||
|
||||
opt_hash.merge!(:verbose => :debug) if datastore['SSH_DEBUG']
|
||||
|
|
Loading…
Reference in New Issue