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

Captive Portal attack hangs on AP service start. #73

Closed
SiNaPsEr0x opened this issue Aug 14, 2017 · 16 comments
Closed

Captive Portal attack hangs on AP service start. #73

SiNaPsEr0x opened this issue Aug 14, 2017 · 16 comments

Comments

@SiNaPsEr0x
Copy link
Contributor

SiNaPsEr0x commented Aug 14, 2017

Do you want to request a feature or report a bug?

-> Bug

fluxion dont start captive portal

What is the current behavior?

-> Quit accidentally

no

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

-> A great way to do this is to provide screenshots and commands.

yes screenshot

What is the expected behavior?

-> Be creative

run fine at handshake but when change mode to hostapd dont start nothing.

If this is a feature request, what is motivation or use case for changing the behavior?


schermata 2017-08-14 alle 10 18 54

Specs

Wireless adapter:

ALFA awus036h

Does it support injection?

root@kali:~# aireplay-ng -9 wlan0
ioctl(SIOCSIWMODE) failed: Device or resource busy
10:25:07 Trying broadcast probe requests...
10:25:07 Injection is working!

Fluxion version:

Paste the output of cat fluxion.sh | grep revision
3.0

Linux version:

4.11.0-kali1-amd64

@MPX4132
Copy link
Member

MPX4132 commented Aug 14, 2017

I think I found the bug. Check to see if this slightly older version works for you: https://github.com/FluxionNetwork/fluxion/tree/1aa3d96c8abb61922ad01bbab6235910570fa827

@MPX4132 MPX4132 added the bug label Aug 14, 2017
@SiNaPsEr0x
Copy link
Contributor Author

in debug mode this is log:

Archive: /tmp/fluxspace/file.zip
creating: /tmp/fluxspace/captive_portal/css/
inflating: /tmp/fluxspace/captive_portal/css/jquery.mobile-1.4.5.min.css
inflating: /tmp/fluxspace/captive_portal/css/main.css
creating: /tmp/fluxspace/captive_portal/js/
inflating: /tmp/fluxspace/captive_portal/js/additional-methods.min.js
inflating: /tmp/fluxspace/captive_portal/js/jquery-1.11.1.min.js
inflating: /tmp/fluxspace/captive_portal/js/jquery.mobile-1.4.5.min.js
inflating: /tmp/fluxspace/captive_portal/js/jquery.validate.min.js
inflating: /tmp/fluxspace/captive_portal/js/main.js
hostapd: nessun processo trovato
lib/ap/hostapd.sh: riga 18: kill: (23449) - Nessun processo corrisponde
Current MAC: 00:c0:ca^^^^^^ (ALFA, INC.)
Permanent MAC: 00:c0:c^^^^^^ (ALFA, INC.)
New MAC: e8:de:27:d^^^^^ (TP-LINK TECHNOLOGIES CO.,LTD.)
mdk3: nessun processo trovato
attacks/Captive Portal/attack.sh: riga 850: kill: (23471) - Nessun processo corrisponde
attacks/Captive Portal/attack.sh: riga 862: kill: (23475) - Nessun processo corrisponde
attacks/Captive Portal/attack.sh: riga 868: kill: (23479) - Nessun processo corrisponde
hostapd: nessun processo trovato
lib/ap/hostapd.sh: riga 18: kill: (23488) - Nessun processo corrisponde
[*] Starting Captive Portal access point service...

@MPX4132 MPX4132 changed the title Halt on captive portal Captive Portal attack hangs on AP service start. Aug 14, 2017
@MPX4132
Copy link
Member

MPX4132 commented Aug 14, 2017

Check if only hostapd is affected by trying to use airbase-ng. If airbase-ng works, we can narrow it down to hostapd.

@SiNaPsEr0x
Copy link
Contributor Author

SiNaPsEr0x commented Aug 14, 2017

yes on airbase-ng run correctly! but hostpad why not? and many window xterm remaining open after attack... fix it

@MPX4132
Copy link
Member

MPX4132 commented Aug 14, 2017

Ok cool, now we know it's an issue with hostapd only. Check what happens when you try running hostapd manually. Get the configuration file, either from /tmp/fluxspace or from the fluxion directory, depending on what commit version you're on. The file is called either APService.conf or MACADDRESS-hostapd.conf. You'll need to run fluxion and try to start the attack with hostapd so that the configuration file is generated. Once you've got the configuration file, and fluxion is still running trying to start hostapd, run the following command:

# hostapd /path/to/file/APService.conf

Post the results of the command here.

@SiNaPsEr0x
Copy link
Contributor Author

SiNaPsEr0x commented Aug 14, 2017

when fluxion is running:

root@kali:~/Scrivania# hostapd A0:4F:D4:B7:^^^^-hostapd.conf
Configuration file: A0:4F:D4:B7:^^-hostapd.conf
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlan0ap disabled_11b_rates=0
nl80211 driver initialization failed.
wlan0ap: interface state UNINITIALIZED->DISABLED
wlan0ap: AP-DISABLED
hostapd_free_hapd_data: Interface wlan0ap wasn't started

when fluxion is off and run hostapd:

Could not read interface wlan0ap flags: No such device
nl80211: Driver does not support authentication/association or connect commands
nl80211: deinit ifname=wlan0ap disabled_11b_rates=0
Could not read interface wlan0ap flags: No such device
nl80211 driver initialization failed.
wlan0ap: interface state UNINITIALIZED->DISABLED
wlan0ap: AP-DISABLED
hostapd_free_hapd_data: Interface wlan0ap wasn't started

@MPX4132
Copy link
Member

MPX4132 commented Aug 14, 2017

Did you run the command while fluxion was running the attack?

@SiNaPsEr0x
Copy link
Contributor Author

SiNaPsEr0x commented Aug 14, 2017

yes.. the first part of post ^
error and dont start

@MPX4132
Copy link
Member

MPX4132 commented Aug 14, 2017

Try creating the virtual interface yourself. First pick a wireless interface and start it as a monitor:

# airmon-ng start wlanX

That should create a new interface, such as wlanXmon.
Next, create a second virtual interface (in monitor mode) with the original monitor interface:

iw dev wlanXmon interface add wlanXap type monitor

Post the results here. It could be your driver doesn't support virtual interfaces, which is why we're going to try this. Has fluxion with hostapd ever worked with that wireless card?

@SiNaPsEr0x
Copy link
Contributor Author

SiNaPsEr0x commented Aug 14, 2017

root@kali:~# airmon-ng start wlan0

Found 3 processes that could cause trouble.
If airodump-ng, aireplay-ng or airtun-ng stops working after
a short period of time, you may want to run 'airmon-ng check kill'

PID Name
437 NetworkManager
1249 wpa_supplicant
1412 dhclient

PHY Interface Driver Chipset

phy0 wlan0 rtl8187 Realtek Semiconductor Corp. RTL8187

	(mac80211 monitor mode vif enabled for [phy0]wlan0 on [phy0]wlan0mon)
	(mac80211 station mode vif disabled for [phy0]wlan0)

root@kali:# iw dev wlan0mon interface add wlan0ap type monitor
root@kali:
#

running all correctly

iwconfig:
root@kali:~# iwconfig
eth0 no wireless extensions.

wlan0mon IEEE 802.11 Mode:Monitor Frequency:2.457 GHz Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:on

lo no wireless extensions.

wlan0ap IEEE 802.11 Mode:Monitor Frequency:2.457 GHz Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:on

root@kali:~#

@MPX4132
Copy link
Member

MPX4132 commented Aug 14, 2017

Ok, now try running hostapd with those interfaces you made, without starting fluxion (keep it closed). Make sure your interfaces are all still up by running:

# iwconfig

wlan0mon should exits and should be in monitor mode, and wlan0ap should also still exist and be in monitor mode. If they're still there, launch the same command from earlier:

# hostapd /path/to/APService.conf

If hostapd starts successfully, there's a very high chance it's a problem with fluxion. If it throws an error, there's a high chance it's a problem with your driver.

@SiNaPsEr0x
Copy link
Contributor Author

root@kali:~# iwconfig
wlan0mon IEEE 802.11 Mode:Monitor Frequency:2.457 GHz Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:on

wlan0ap IEEE 802.11 Mode:Monitor Frequency:2.457 GHz Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:on

eth0 no wireless extensions.

lo no wireless extensions.

root@kali:~#

root@kali:~/Scrivania# hostapd A0:4F:D4ììììì-hostapd.conf
Configuration file: A0:4F:D4:B7:ìììììì-hostapd.conf
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlan0ap disabled_11b_rates=0
nl80211 driver initialization failed.
wlan0ap: interface state UNINITIALIZED->DISABLED
wlan0ap: AP-DISABLED
hostapd_free_hapd_data: Interface wlan0ap wasn't started

@SiNaPsEr0x
Copy link
Contributor Author

i tryit airmon-ng check kill:
root@kali:~# airmon-ng check kill

Killing these processes:

PID Name
639 dhclient
769 wpa_supplicant

but nothing change for hostpad idem error

@MPX4132
Copy link
Member

MPX4132 commented Aug 14, 2017

It's extremely likely you've got a driver issue. I have a similar issue with a card using the rtl8192cu driver. I can't even bring it to monitor mode. As a last resort you can run:

export FLUXIONDropNet=1; ./fluxion

That's the last I can help you with.

@SiNaPsEr0x
Copy link
Contributor Author

https://bugs.kali.org/view.php?id=3751 there is not my problem but of kali

@MPX4132
Copy link
Member

MPX4132 commented Aug 14, 2017

Yeah, seems like it’s a driver issue. I’m closing this thread. I suggest using Atheros cards, I’ve never had any issues with them. Good luck.

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

2 participants