Skip to content

Commit 38d056b

Browse files
committed
Land rapid7#9436 - Fix cerberus_sftp_enumusers undefined method start for nil
Land rapid7#9436 Thanks Steve!
2 parents 682c915 + 85d0180 commit 38d056b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

modules/auxiliary/scanner/ssh/cerberus_sftp_enumusers.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ def check_vulnerable(ip)
7171
auth_methods: ['password', 'keyboard-interactive'],
7272
use_agent: false,
7373
config: false,
74+
password_prompt: Net::SSH::Prompt.new,
75+
non_interactive: true,
7476
proxies: datastore['Proxies']
7577
}
7678

@@ -116,7 +118,10 @@ def check_user(ip, user, port)
116118

117119
begin
118120
::Timeout.timeout(datastore['SSH_TIMEOUT']) do
119-
auth.authenticate("ssh-connection", user, pass)
121+
begin
122+
auth.authenticate("ssh-connection", user, pass)
123+
rescue NoMethodError
124+
end
120125
auth_method = auth.allowed_auth_methods.join('|')
121126
if auth_method != ''
122127
:success

0 commit comments

Comments
 (0)