Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions modules/boot_image_shell/cisco_asax_firepower_boot_root.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,10 @@ def password
end

def connect
opts = ssh_client_defaults.merge({
auth_methods: ['password'],
port: rport,
password: password
})
opts.merge!(verbose: :debug) if datastore['SSH_DEBUG']

print_status("#{rhost}:#{rport} - Attempting to login...")
begin
::Timeout.timeout(datastore['SSH_TIMEOUT']) do
ssh = Net::SSH.start(rhost, username, opts)
ssh = Net::SSH.start(rhost, username, :password => password, :port => rport, :kex=>'diffie-hellman-group1-sha1')
print_good('Authenticated with the remote server')
return ssh
end
Expand Down Expand Up @@ -311,7 +304,7 @@ def exploitable?(cmd)
case state
when 0 # get enable prompt
if buffer.include? 'Password: '
channel.send_data("#{datastore['ENABLE_PASSWORD']}\n")
channel.send_data("#{datastore['PASSWORD']}\n")
buffer = ''
elsif buffer.include? 'Invalid password'
fail_with(failure::BadConfig, 'Invalid enable password')
Expand Down