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