Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

[TUTORIAL] DNS Spoof to steal passwords!

Hello Again HF!,

Welcome to another Hacking Tutorial by MeshCollider.

If you are interested, here are links to my other hacking tutorials:Spoiler (Click to View)

Cracking passwords can take a lot of time and energy - especially if they are complex. Another alternative to steal a password is a phishing attack - clone a website, and host a modified copy to store credentials. But the trick is to get victims to actually visit your website. That is where a DNS spoof attack comes in.

DNS stands for Domain Name Service. A DNS server is responsible for converting websites addresses in the format "hackforums.net" to the IP address of the website. A DNS attack is a type of Man in the middle attack (MITM). We will be using the Kali Linux OS, which comes with the required software preinstalled. We will be using the Social Engineering Toolkit (S.E.T.) and Ettercap to capture credentials. Lets begin:

1) Open the Social Engineering Toolkit in Kali Linux:
Navigate to the correct directory:
Code
cd /usr/share/set
Run se-toolkit:
Code
./se-toolkit

2) Clone and Host a copy of the website you want to steal passwords on:
Enter the commands in this order:
"1 (Social Engineering Attacks)" > "2 (Website Attack Vectors)" > "3 (Credential Harvester Attack)" > "2 (Site Cloner)".
Then enter your computers IP (found by using the ifconfig command), and enter the URL of the website you want to clone (e.g. facebook.com).

3) If you receive no error messages, now we need to get victims to navigate to our site!
Open a new terminal, and run the ettercap GUI by using this command:
Code
ettercap -G
Click "Sniff > Unified Sniffing" and select the network interface you are using to connect to the network you want to attack.
Then choose "hosts > scan for hosts" and wait for the scan to finish. When the scan has found all the hosts on the network, open "hosts > host list".

4) Select the victims you want to attack:
Add the router of the network to target 1 and any computers you want to “poison” to target 2. If either the target 1 group or target 2 group are left empty, the entire network will be attacked. After you have added the victims to the target lists, choose “MITM > ARP Poisoning”, tick “sniff remote connections” and click Ok.

5) Create our "custom" DNS server:
Navigate to “/usr/share/ettercap” and open “etter.dns” with any text editor of your choice. Scroll to the bottom, and follow the example template to enter a DNS record. It will look something link this:
Code
example.com A 192.168.1.10
*.example.com A 192.168.1.10
www.example.com PTR 192.168.1.10
Replace “example.com” with the website address you are imitating (e.g. facebook.com), and “192.168.1.10” with the IP address of your computer (the host).
Now, navigate back to your ettercap window, and click “Plugins > Manage plugins…” and double click on “dns_spoof” to activate it.

6) Begin collecting passwords!
Choose “Start > Start sniffing” and you are finished! Any visitors to example.com will in fact see your cloned version of the webpage and you will be able to see their credentials in the S.E.T. terminal window. Test the password out to check it works!

Thanks for reading, please reply with your thanks if you enjoyed this and/or found it useful.

Watch out for future hacking tutorials from me - further wireless cracking, metasploit and other common hacking topics!

Written by MeshCollider 🤝
something not working for me : I can use SET, clone facebook. But i'm on linux backbox my etter.dns is in another doc. I founded it and modded it for redirect facebook.com to my ip. The probleme is I can start ettercap and arp spoof my network, but the dns spoof plugin is not working ( i ping facebook.com from another pc in my network and its the real ip, not my set page)
Thanks for this tut man!
Make sure that the other pc has cleared the DNS cache, and re try. Glad you liked the tutorial.
Very HQ tutorial as always :) Thank you for all of your HQ tutorial
Thanks for the contribution, it's a shame this doesn't have more replies which it definitely should.
Thanks for the help much thankfull!!<3
Would this work on my vps?
If so Please pm me to help set up!
-Thanks in advance
(Apr 3, 2014 09:34 PM)KappaPride Wrote:  Would this work on my vps?
If so Please pm me to help set up!
-Thanks in advance

Sorry, I have never tried this with a VPS. Could you give me a bit more info about how you use your VPS and how it is setup? I'm not sure whether I can help though sorry 🤝
Nice tutorial. I'm gonna test it out :)
The MFOD module is more steady when it comes to DNS spoofing, I'm more a fan of ARP poisoning it's verfy effective.
(Apr 15, 2014 10:30 PM)Raoulb1_ Wrote:  The MFOD module is more steady when it comes to DNS spoofing, I'm more a fan of ARP poisoning it's verfy effective.

The tutorial actually uses ARP poisoning lol.
Like installing the os on my vps and setting it up using ssh.
(Apr 16, 2014 12:09 PM)KappaPride Wrote:  Like installing the os on my vps and setting it up using ssh.

Well you should be able to install kali on the vps, but I don't think you can use ssh for this. It works by poisoning the computers on the network to redirect traffic through your machine. If you wanted, I think you can just set up a packet sniffer wireshark, url snarf, etc. to capture the packets that are traveling through your vps.
So the tutorial can be used only in the LAN environment ?
(Apr 16, 2014 03:24 PM)xinyonghu Wrote:  So the tutorial can be used only in the LAN environment ?

Yes, ettercap dns_spoof plugin poisons the ARP cache of any computers in your domain subset.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by DynamicWMay 18, 2025 04:32 PM 24 1,985 May 18, 2025 04:32 PM
Last Post: ghosts84
by ApricusSep 9, 2021 08:09 PM 5 1,366 Sep 9, 2021 08:09 PM
Last Post: theworldbanco
by bebrasMar 11, 2021 10:44 PM 0 262 Mar 11, 2021 10:44 PM
Last Post: bebras