Skip to content

Commit 10bcef0

Browse files
author
Michael Messner
committed
cleanup, deprecated
1 parent e7ade9f commit 10bcef0

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

modules/exploits/linux/http/dlink_upnp_exec_echo.rb renamed to modules/exploits/linux/http/dlink_upnp_exec_noauth.rb

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,22 @@ def initialize(info = {})
5555
],
5656
'DefaultTarget' => 0
5757
))
58+
5859
deregister_options('CMDSTAGER::DECODER', 'CMDSTAGER::FLAVOR')
60+
61+
register_options(
62+
[
63+
Opt::RPORT(49152) #port of UPnP SOAP webinterface
64+
], self.class)
65+
5966
end
6067

6168
def check
6269
begin
6370
res = send_request_cgi({
6471
'uri' => '/InternetGatewayDevice.xml'
6572
})
66-
if res && [200, 301, 302].include?(res.code) && res.body.to_s =~ /<modelNumber>DIR-645<\/modelNumber>/
73+
if res && [200, 301, 302].include?(res.code) && res.body.to_s =~ /<modelNumber>DIR-/
6774
return Exploit::CheckCode::Detected
6875
end
6976
rescue ::Rex::ConnectionError
@@ -74,10 +81,10 @@ def check
7481
end
7582

7683
def exploit
77-
print_status("#{peer} - Trying to access the vulnerable URL...")
84+
print_status("#{peer} - Trying to access the device ...")
7885

7986
unless check == Exploit::CheckCode::Detected
80-
fail_with(Failure::Unknown, "#{peer} - Failed to access the vulnerable URL")
87+
fail_with(Failure::Unknown, "#{peer} - Failed to access the vulnerable device")
8188
end
8289

8390
print_status("#{peer} - Exploiting...")

modules/exploits/linux/http/dlink_upnp_exec_noauth_telnetd.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@
44
##
55

66
require 'msf/core'
7+
require 'msf/core/module/deprecated'
78

89
class Metasploit3 < Msf::Exploit::Remote
910
Rank = ExcellentRanking
1011

1112
include Msf::Exploit::Remote::HttpClient
1213
include Msf::Exploit::FileDropper
14+
include Msf::Module::Deprecated
15+
16+
DEPRECATION_DATE = Date.new(2014, 8, 8)
17+
DEPRECATION_REPLACEMENT = 'modules/exploits/linux/http/dlink_upnp_exec_noauth.rb'
1318

1419
def initialize(info = {})
1520
super(update_info(info,

0 commit comments

Comments
 (0)