diff --git a/modules/auxiliary/scanner/ssh/apache_karaf_command_execution.rb b/modules/auxiliary/scanner/ssh/apache_karaf_command_execution.rb index 82ca5afee1..ccf2c21373 100644 --- a/modules/auxiliary/scanner/ssh/apache_karaf_command_execution.rb +++ b/modules/auxiliary/scanner/ssh/apache_karaf_command_execution.rb @@ -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'] diff --git a/modules/auxiliary/scanner/ssh/cerberus_sftp_enumusers.rb b/modules/auxiliary/scanner/ssh/cerberus_sftp_enumusers.rb index 47b5a792ee..6e9110bb00 100644 --- a/modules/auxiliary/scanner/ssh/cerberus_sftp_enumusers.rb +++ b/modules/auxiliary/scanner/ssh/cerberus_sftp_enumusers.rb @@ -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'] diff --git a/modules/auxiliary/scanner/ssh/fortinet_backdoor.rb b/modules/auxiliary/scanner/ssh/fortinet_backdoor.rb index 70e83503f2..797f299efc 100644 --- a/modules/auxiliary/scanner/ssh/fortinet_backdoor.rb +++ b/modules/auxiliary/scanner/ssh/fortinet_backdoor.rb @@ -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'] diff --git a/modules/auxiliary/scanner/ssh/juniper_backdoor.rb b/modules/auxiliary/scanner/ssh/juniper_backdoor.rb index 79e151e3c2..48518110dd 100644 --- a/modules/auxiliary/scanner/ssh/juniper_backdoor.rb +++ b/modules/auxiliary/scanner/ssh/juniper_backdoor.rb @@ -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'] diff --git a/modules/auxiliary/scanner/ssh/ssh_enumusers.rb b/modules/auxiliary/scanner/ssh/ssh_enumusers.rb index 265cf9071e..b7cd1a95da 100644 --- a/modules/auxiliary/scanner/ssh/ssh_enumusers.rb +++ b/modules/auxiliary/scanner/ssh/ssh_enumusers.rb @@ -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'] diff --git a/modules/auxiliary/scanner/ssh/ssh_identify_pubkeys.rb b/modules/auxiliary/scanner/ssh/ssh_identify_pubkeys.rb index cfce1a497d..5ff1c4ab20 100644 --- a/modules/auxiliary/scanner/ssh/ssh_identify_pubkeys.rb +++ b/modules/auxiliary/scanner/ssh/ssh_identify_pubkeys.rb @@ -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']