r/HowToHack • • Feb 06 '17

RougeWifi - A simple password stealing bash/php/javascript wifi AP

https://github.com/s0meguy1/RougeWifi
185 Upvotes

20 comments sorted by

15

u/Enemby Feb 06 '17

Did you mean to spell "RogueWifi"?

5

u/petiepablo Feb 06 '17

Jesus! I rand this by three of my friends, no one caught that including myself! And now I feel like an idiot! Yeah Ill update in the next push, but unfortunately because it will break all of the links, the URL will have to remain the same.

19

u/CosmosisQ Feb 06 '17

You can keep it "rouge" and make your script pink-themed just for fun. Maybe even make a cute little pink mascot for it!

5

u/petiepablo Feb 06 '17

Hahaha, I like it. I'll add that to the next push

6

u/67079F105EC467BB36E8 Feb 06 '17 edited Feb 08 '17

a62h5l30jb5fkjwr10e6980dkh9yog42vq4rinsbugmge59u63416tce7ljv6n2xjcr9kijnfujimrfxclixirauthbrtthhqzs6ouu0qlj

13

u/petiepablo Feb 06 '17 edited Feb 06 '17

I'm not sure what you mean. So initially I had it set so that any * @ * .* and password would allow the client to auth through the portal, but I suspicious people would enter:

U: [email protected] P: lkjsflksdj

And the AP would allow them internet. So I figured if I added a "failed auth no matter what on first attempt", it would make people think "ok, this thing must reach out to something because the gibberish I entered failed". And for those that entered the correct password the first time, they just assume they fat fingered..

EDIT: So I re-read what you said, I do log both attempts via javascript. The JS portion of the HTML contains a variable for the first login, then the second log in is sent directly along with the first login variable to the "passwords.txt". I could send the first one as it occurs (with the error message forcing the second), then send the second, but I am not that good with JS. I'd have to do some reading. Also thats why its up here, I hope others see things and say "Hey you should do X " (and hopefully tell me how to do X haha).

2

u/67079F105EC467BB36E8 Feb 07 '17 edited Feb 08 '17

cfs7mvbih5fdx9vqmr2d0mk4vkfe7kv7czqlz84v1zno5cuh1dzx6rgwo90fj3wy90g7xh43mk8yqpq2nvnz3slfk8rlyro1crwmp7cvmifwt

6

u/cop1152 Feb 06 '17

Thanks for this! Will test and report back.

1

u/hammo85 Feb 07 '17

mine get stuck at "Starting hostapd".. just sits there forever.

For your info I am using 2 wireless cards and so changed the command to "./wifi.sh wlan1 wlan0 FreeWifi"

1

u/petiepablo Feb 07 '17 edited Feb 08 '17

Ok, do me a favor, run the following commands:

echo -e "interface=wlan1\ndriver=nl80211\nssid=TEST1\nhw_mode=g\nchannel=6\nignore_broadcast_ssid=0" > /etc/hostapd/hostapd.conf

hostapd -dd /etc/hostapd/hostapd.conf

Let me know the output of hostapd

EDIT: fixed interface name

1

u/TimeFcuk Feb 07 '17

I had the same issue so I'll give you my output from those commands:

random: Trying to read entropy from /dev/random Configuration file: /etc/hostapd/hostapd.conf Line 2: invalid/unknown driver 'n180211' 1 errors found in configuration file '/etc/hostapd/hostapd.conf' Failed to set up interface with /etc/hostapd/hostapd.conf hostpad_init: free iface 0x55d23faf6710 Failed to initialize interface

1

u/petiepablo Feb 07 '17

And what does your hostapd conf look like? I it the same as the echo command I pasted above for hammo85?

1

u/TimeFcuk Feb 08 '17

Yes I ran those commands

1

u/petiepablo Feb 08 '17 edited Feb 08 '17

I commented below about this:

https://www.reddit.com/r/HowToHack/comments/5sdzod/rougewifi_a_simple_password_stealing/ddhdhbo/

hostapd is very touchy with drivers. I believe whatever drivers linux is using for your card are incorrect, but other, more robust, apps will work. I will look into using an alternative for the broadcasting of wifi. Remember, my script is noting revolutionary, it just runs other well known applications.

If you google your issue you'll see that a lot of people have that same problem with hostapd...

1

u/hammo85 Feb 08 '17

Sorry just at work, ill try it when I get home and let you know. Thanks for responding!

1

u/hammo85 Feb 08 '17

hostapd -dd /etc/hostapd/hostapd.conf random: Trying to read entropy from /dev/random Configuration file: /etc/hostapd/hostapd.conf Interface name not specified in /etc/hostapd/hostapd.conf hostapd_interface_deinit_free(0x557a548e0520) hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1 hostapd_interface_deinit(0x557a548e0520) : interface state UNINITIALIZED->DISABLED hostapd_bss_deinit: deinit bss : AP-DISABLED hostapd_cleanup(hapd=0x557a548e18e0 ()) hostapd_free_hapd_data: Interface wasn't started hostapd_interface_deinit_free: driver=0x557a53393d00 drv_priv=(nil) -> hapd_deinit hostapd_interface_free(0x557a548e0520) hostapd_interface_free: free hapd 0x557a548e18e0 hostapd_cleanup_iface(0x557a548e0520) hostapd_cleanup_iface_partial(0x557a548e0520) hostapd_cleanup_iface: free iface=0x557a548e0520 Failed to initialize interface

1

u/petiepablo Feb 08 '17 edited Feb 08 '17

This is an issue due to drivers. When I tested this script on a raw build of linux with just the script dependencies installed, I had that same issue. Depending on your wifi card, you may need to install drivers. Whatever drivers linux is using for your card its not playing well with hostapd. I will look into an option for something alternative to hostapd as it is so touchy. "Interface name not specified in /etc/hostapd/hostapd.conf" - I had the wrong parameter in my line, hence the interface issue, try this one:

echo -e "interface=wlan1\ndriver=nl80211\nssid=TEST-TEST\nhw_mode=g\nchannel=6\nignore_broadcast_ssid=0" > /etc/hostapd/hostapd.conf
        ▲
         (All this does is echo the below config into hostapd.conf)

Then re-run hostapd. Sorry for the confusion, I rushed to get you an answer

To give you some ideas in troubleshooting, here is my hostapd.conf with some explanations:

interface=wlan0  <---- Name to broadcast on
driver=nl80211   <---- Driver to use (try removing line entirely)
ssid=WiConnect-Free-Wifi  <---- broadcast name
hw_mode=g       <---- Wireless N,G,B etc
channel=6          <---- channel
ignore_broadcast_ssid=0  <---- may not need, try removing line entirely

If none of this works or doesnt change the error message in any way, look into getting the specific drivers for your card, which can be a pain depending on what card you are using. I will look into alternatives for broadcasting a network, but a quick google search showed that there weren't too many [quick and dirty] alternatives.

1

u/hammo85 Feb 08 '17

The alfa 51NH. Ill try update the drivers?