Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when selecting hostap as a access point service #1130

Open
divdock1 opened this issue Jan 24, 2023 · 6 comments
Open

Error when selecting hostap as a access point service #1130

divdock1 opened this issue Jan 24, 2023 · 6 comments

Comments

@divdock1
Copy link

divdock1 commented Jan 24, 2023

Bug Report

Summary

Upon selecting the Rogue AP service using hostapd I get an error (image attached below) and Fluxion does not proceed.

This error has only occurred after the latest update, I was able to use Fluxion with my Alfa AWUS036ACM adapter without issue until yesterday. I am running Fluxion version 6.10

What is the current behavior?

An error occurs and Fluxion does not proceed.

How to reproduce

Select attack (Captive Portal) > Select Wireless Interface > Select Channel to Monitor > Select Network > Select Wireless Interface for Target Tracking > Select Wireless Interface for Jamming > Select Interface for AP > Select De-authentication Method (mdk4) > Select AP service (Rouge AP - hostapd) > The error occurs and you are returned to the "Select De-authentication Method" page.

If the current behavior is a bug, please provide the steps to reproduce it.

See "How to reproduce"

What do you think the expected behavior should be?

Fluxion should continue with the attack and no error should occur.

Specs

#!/usr/bin/env bash

clear
declare -r HEADER_SIZE="####"

Diagnostic script

if [ -d "lib" ];then
source lib/InterfaceUtils.sh
source lib/ChipsetUtils.sh
elif [ -d "../lib" ];then
source ../lib/InterfaceUtils.sh
source ../lib/ChipsetUtils.sh
else
echo -e "\033[31mError lib folder not found\033[0m"
exit 1
fi

if [ ! "$1" ]; then
echo -e "\033[32mUsage ./scripts/diagnostics [wireless_interface]\033[0m"
exit 1
fi

echo "$HEADER_SIZE FLUXION Info"
if [ -f "fluxion.sh" ];then
declare -r FLUXIONInfo=($(grep -oE "FLUXION(Version|Revision)=[0-9]+" fluxion.sh))
else
declare -r FLUXIONInfo=($(grep -oE "FLUXION(Version|Revision)=[0-9]+" ../fluxion.sh))
fi

echo "FLUXION V${FLUXIONInfo[0]/=/}.${FLUXIONInfo[1]/=/}"
echo -ne "\n\n"

echo "$HEADER_SIZE BASH Info "
bash --version
echo "Path: $(ls -L $(which bash))"
echo -ne "\n\n"

echo "$HEADER_SIZE Interface ($1) Info "
if interface_physical "$1";then
echo "Device: $InterfacePhysical"
else
echo "Device: Unknown"
fi

if interface_driver "$1";then
echo "Driver: $InterfaceDriver"
else
echo "Driver: Unsupported"
fi

if interface_chipset "$1";then
echo "Chipset: $InterfaceChipset"
else
echo "Chipset: Unknown"
fi

if iw list | grep monitor | head -n 1 | tail -n 1 &>/dev/null;then
echo "Master Modes Yes"
else
echo "Master Modes No"
fi

echo -n "Injection Test: "
aireplay-ng --test "$1" | grep -oE "Injection is working!|No Answer..." || echo -e "\033[31mFailed\033[0m"
echo -ne "\n\n"

echo "$HEADER_SIZE XTerm Infos"
echo "Version: $(xterm -version)"
echo "Path: $(ls -L $(which xterm))"
echo -n "Test: "
if xterm -hold -fg "#FFFFFF" -bg "#000000" -title "XServer/XTerm Test" -e "echo "XServer/XTerm test: close window to continue..."" &>/dev/null; then echo "XServer/XTerm success!"
else
echo -e "\033[31m XServer/XTerm failure!\033[0m"
fi
echo -ne "\n\n"

echo "$HEADER_SIZE HostAPD Info"
hostapd -v
echo "Path: $(ls -L $(which hostapd))"
echo -ne "\n\n"

echo "$HEADER_SIZE Aircrack-ng Info"
aircrack-ng -H | head -n 4
echo -ne "\n"

echo "$HEADER_SIZE Pyrit Info"
scapyver=$(python2 -c "import scapy; print(scapy.VERSION)")
pyrit | head -n 3
echo "Scapy Version: ${scapyver}"

if [[ "$scapyver" != 2.3.? ]]; then
echo -e "\033[31mWarning: Pyrit has been reported to be incompatible with scapy version 2.4.0 and above. Consult the wiki for further information. This should not affect you, if you don't choose to use pyrit in the script.\033[0m"
fi

echo -ne "\n"

System info

echo "$HEADER_SIZE System Info"
if [ -r "/proc/version" ]; then
echo "Chipset: $(cat /proc/version)"
else
echo "Chipset: $(uname -r)"
fi

echo -ne "\n"
echo "$HEADER_SIZE Chipset"
chipset=$(airmon-ng | grep $1 | awk '{print $3}')

echo "Chipset: $chipset"
check_chipset $chipset

Screenshot_2023-01-24_02_51_06 (2)
Screenshot_2023-01-24_02_22_44 (2)

@cjb900
Copy link
Collaborator

cjb900 commented Jan 24, 2023

@strasharo this just started after the pull requests you merged. I just tested this latest version and i get a similar error with hostapd
vlcsnap-2023-01-24-00h30m06s907

@usama7628674
Copy link
Contributor

@cjb900 Go to line 57 of hostaph.sh file and change <= to -le. This should fix the issue

@cjb900
Copy link
Collaborator

cjb900 commented Jan 24, 2023

thanks i'll have to try that after work and see if that fixes the issue.

@cjb900
Copy link
Collaborator

cjb900 commented Jan 24, 2023

@usama7628674 Changing that part in the hostapd.sh file worked for getting past the hostapd error but now i get this when selecting the captive portal interface to use.
Screenshot_2023-01-24_13_27_00
Checking airmon-ng i see that the interfaces its looking for are indeed not there and neither card is in monitor mode.
Screenshot_2023-01-24_13-35-29
Everything else in fluxion seems to be working as far as i can tell.

@divdock1
Copy link
Author

divdock1 commented Jan 24, 2023

@usama7628674 Changing that part in the hostapd.sh file worked for getting past the hostapd error but now i get this when selecting the captive portal interface to use. Checking airmon-ng i see that the interfaces its looking for are indeed not there and neither card is in monitor mode. Everything else in fluxion seems to be working as far as i can tell.

After editing hostaph.sh I also get pass the hostapd error, I don't get the "cannot find device" error and Fluxion continues displaying this but it is not working correctly. My wireless adapter is also not in monitor mode.

Screenshot_2023-01-24_21_56_10

Screenshot_2023-01-24_22_10_05 (2)

@strasharo
Copy link
Contributor

@cjb900 reverted, please try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants