Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/auxiliary/vsploit/pii/web_pii.rb
Views: 11704
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Auxiliary67#8# This module acts as an compromised webserver distributing PII Data9#10include Msf::Exploit::Remote::HttpServer::HTML11include Msf::Auxiliary::PII1213def initialize(info = {})14super(update_info(info,15'Name' => 'VSploit Web PII',16'Description' => 'This module emulates a webserver leaking PII data',17'License' => MSF_LICENSE,18'Author' => 'MJC',19'References' =>20[21[ 'URL', 'https://www.rapid7.com/blog/post/2011/06/02/vsploit--virtualizing-exploitation-attributes-with-metasploit-framework']22],23'DefaultOptions' => { 'HTTP::server_name' => 'IIS'}24))25register_options(26[27OptBool.new('META_REFRESH', [ false, "Set page to auto refresh.", false]),28OptInt.new('REFRESH_TIME', [ false, "Set page refresh interval.", 15]),29OptInt.new('ENTRIES', [ false, "PII Entry Count", 1000])30])31end323334def create_page35# Webpage Title36title = "vSploit PII Webserver"37sheep = <<-EOS38__________39< baaaaah! >40---------41\\42\\43,@;@,44;@;@( \\@;@;@;@;@;@,45/x @\\_|@;@;@;@;@;@;,46/ )@:@;@;@;@;@;@;@|)47*---;@;@;@;@;@;@;@;@;48';@;\;@;\;@;@49|| | \\ (50|| | // /51// ( // /52~~~~~ ~~~~5354EOS55page = ""56page << "<html>\n<head>\n"5758if datastore['META_REFRESH']59page << "<meta http-equiv=\"refresh\" content=\"#{datastore['REFRESH_TIME']}\">\n"60end6162page << "<title>#{title}</title>\n</head>\n<body>\n"63page << "<pre>\n"64page << sheep65page << "Data Creation by: #{title}\n"66page << "Entries Per Page: #{datastore['ENTRIES']}\n"6768if datastore['META_REFRESH']69page << "Refresh Interval: #{datastore['REFRESH_TIME']} Seconds\n"70end7172# Start creating PII data73pii = create_pii()74page << "\n"75page << pii76page << "</pre>\n</body>\n</html>"77page78end7980def on_request_uri(cli,request)81# Transmit the response to the client82res = create_page()83print_status("Leaking PII...")84send_response(cli, res, { 'Content-Type' => 'text/html' })85end8687def run88exploit()89end90end919293