2011-10-17 01:27:28 +00:00
|
|
|
##
|
|
|
|
# $Id$
|
|
|
|
##
|
|
|
|
|
2011-08-11 23:45:43 +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/
|
2011-08-11 23:45:43 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
class Metasploit3 < Msf::Auxiliary
|
2011-11-20 02:12:07 +00:00
|
|
|
|
2011-08-11 23:45:43 +00:00
|
|
|
#
|
|
|
|
# This module acts as an compromised webserver distributing PII Data
|
|
|
|
#
|
|
|
|
include Msf::Exploit::Remote::HttpServer::HTML
|
|
|
|
include Msf::Auxiliary::PII
|
2011-11-20 02:12:07 +00:00
|
|
|
|
2011-08-11 23:45:43 +00:00
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
2011-10-18 20:42:59 +00:00
|
|
|
'Name' => 'VSploit Web PII',
|
2011-08-11 23:45:43 +00:00
|
|
|
'Description' => 'This module emulates a webserver leaking PII data',
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'Author' => 'MJC',
|
2011-10-17 01:27:28 +00:00
|
|
|
'Version' => '$Revision: $',
|
2011-08-11 23:45:43 +00:00
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'URL', 'http://www.metasploit.com'],
|
|
|
|
],
|
|
|
|
'DefaultOptions' => { 'HTTP::server_name' => 'IIS'}
|
|
|
|
))
|
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
OptBool.new('META_REFRESH', [ false, "Set page to auto refresh.", false]),
|
|
|
|
OptInt.new('REFRESH_TIME', [ false, "Set page refresh interval.", 15]),
|
|
|
|
OptInt.new('ENTRIES', [ false, "PII Entry Count", 1000])
|
|
|
|
],self.class)
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def create_page
|
|
|
|
# Webpage Title
|
|
|
|
title = "vSploit PII Webserver"
|
2011-10-23 11:56:13 +00:00
|
|
|
sheep = <<-EOS
|
2011-08-11 23:45:43 +00:00
|
|
|
__________
|
|
|
|
< baaaaah! >
|
|
|
|
---------
|
|
|
|
\\
|
|
|
|
\\
|
|
|
|
,@;@,
|
|
|
|
;@;@( \\@;@;@;@;@;@,
|
|
|
|
/x @\\_|@;@;@;@;@;@;,
|
|
|
|
/ )@:@;@;@;@;@;@;@|)
|
2011-10-17 02:42:01 +00:00
|
|
|
*---;@;@;@;@;@;@;@;@;
|
2011-08-11 23:45:43 +00:00
|
|
|
';@;\;@;\;@;@
|
|
|
|
|| | \\ (
|
|
|
|
|| | // /
|
|
|
|
// ( // /
|
2011-10-17 02:42:01 +00:00
|
|
|
~~~~~ ~~~~
|
2011-08-11 23:45:43 +00:00
|
|
|
|
2011-10-23 11:56:13 +00:00
|
|
|
EOS
|
2011-08-11 23:45:43 +00:00
|
|
|
page = ""
|
|
|
|
page << "<html>\n<head>\n"
|
|
|
|
|
|
|
|
if datastore['META_REFRESH']
|
|
|
|
page << "<meta http-equiv=\"refresh\" content=\"#{datastore['REFRESH_TIME']}\">\n"
|
|
|
|
end
|
|
|
|
|
|
|
|
page << "<title>#{title}</title>\n</head>\n<body>\n"
|
|
|
|
page << "<pre>\n"
|
|
|
|
page << sheep
|
|
|
|
page << "Data Creation by: #{title}\n"
|
|
|
|
page << "Entries Per Page: #{datastore['ENTRIES']}\n"
|
|
|
|
|
|
|
|
if datastore['META_REFRESH']
|
|
|
|
page << "Refresh Interval: #{datastore['REFRESH_TIME']} Seconds\n"
|
|
|
|
end
|
|
|
|
|
|
|
|
# Start creating PII data
|
|
|
|
pii = create_pii()
|
|
|
|
page << "\n"
|
|
|
|
page << pii
|
|
|
|
page << "</pre>\n</body>\n</html>"
|
|
|
|
page
|
|
|
|
end
|
|
|
|
|
|
|
|
def on_request_uri(cli,request)
|
|
|
|
# Transmit the response to the client
|
|
|
|
res = create_page()
|
2012-04-25 19:24:17 +00:00
|
|
|
print_status("Leaking PII...")
|
2011-08-11 23:45:43 +00:00
|
|
|
send_response(cli, res, { 'Content-Type' => 'text/html' })
|
|
|
|
end
|
2011-08-12 02:17:07 +00:00
|
|
|
|
|
|
|
def run
|
|
|
|
exploit()
|
|
|
|
end
|
2011-08-11 23:45:43 +00:00
|
|
|
end
|