SymPak
-
Posts
54 -
Joined
-
Last visited
-
Days Won
2
Posts posted by SymPak
-
-
I prefer using reaver and wash from terminal. I have had better luck this way.
The commands I use are:
airmon-ng start wlan0
ifconfig wlan0 down
wash -i mon0
reaver -i mon0 -b XX:XX:XX:XX:XX:XX -a -c XX -vv
If you don't know what wash does, it displays only WPS enabled access points.
Hope this helps.
-SymPak
-
Dave, how did you go about putting the script on your pineapple? Starting the script on wlan0 is simple. Just run ./connect.sh -i wlan0
-
Version 1.1r2 fixes an error in the script. Each line was filled with ^M characters, which caused the script not to run properly.
-SymPak
-
Glad to hear you got it working! I have had to start fresh a few times myself.
-SymPak
-
Updated! v1.1 is now available!
-
Strange. Try this
mv /etc/config/wireless /etc/config/wireless.bak
wifi detect > /etc/config/wireless
wifi
That will rebuild the wireless config file. It isn't necessary to rename the wireless config but I like to do it just in case.
-SymPak
-
It looks like your wlan0 is still associating with another ap. If wlan0 is still set to client mode it won't broadcast an ssid.
-SymPak
-
Ok lets try running the script again on wlan1. After it completes either check the system log under the logs tab in the web interface or run dmesg in a terminal. That should give us a good indication of what is happening.
-
Good to hear. Thanks!
-
Hi Scrag, please post a copy of /etc/config/wireless for me to look at. Also, if you haven't already, you can try to connect manually with the network manager infusion. If you try the network manager infusion make sure wlan1 network is set to WAN and mode is set to client. Just to confirm, you are on firmware version 2.8.1 correct?
-SymPak
-
Just a small status update. Version 1.1 will be out soon with some new features!
Features will include:
User specific wifi (encrypted and unencrypted)
Option to start karma once connected
Option to change to a random MAC address
Automatic setup of internet connection sharing between wifi interfaces.
I would also like to get some feedback from those of you who have tried my script. Has it worked for you? Have you had issues running it? Anything helps.
-SymPak
-
Don't forget to set LAN to WAN, on the interface your trying to connect to wifi
-
Thanks! I could have kept adding features, but I did not want to get ahead of myself. I am currently working on adding the list of user defines networks and setting up ICS once it has an ip address. After that I will begin work on an infusion to act as a control interface. Adding a macchanger is a good idea! I will look into implementing it.
-
Dustbyter,
I find it better to edit /etc/config/wireless using the uci command. More info about the UCI system and /etc/config/wireless here: http://wiki.openwrt.org/doc/uci
Also, try udhcpc -n -i wlan0. The -n option makes udhcpc exit after 3 failed tries. By default, it just sits and waits after 3 tries.
The next version of my script will include user specific ESSIDs and passkeys.
-
UPDATE v1.3, Pineapple v2.8.1 and v3.0.0 compatible!
Hi all,
This update brings WPS button cancel to stop the script, ICS improvements including network address detection in case your pineapple is using a different IP address, command execution upon successful connection and general improvements and bug fixes.Other features include, blacklisting and whitelisting for unencrypted networks, /etc/config/wireless backup, /etc/config/wireless restore, temporarily blacklisting the internal Wifi MAC addresses to prevent it from connecting to itself, automatic internet connection sharing setup, options to start karma once connected, macchanger support for random MAC addresses on both WLAN0 and WLAN1 interfaces, connecting to user specified wifi including encrypted and unencrypted networks and WPS button LED feedback.
More info:
ICS now shares to br-lan by default. Specify what interface you want to share the internet connection to using the -t option.
The /etc/config/wireless file can now be backed up and restored with the script. Run ./connect.sh -B to backup and ./connect.sh -R to restore.
Blacklisting and whitelisting can now be done through the script. Use the -b option to specify an access point you want to blacklist. Use the -w option to specify an access point you want to whitelist. Use the -W option to use the whitelist. Blacklists and whitelists only work with unencrypted wifi networks.
Commands can now be run upon successful connection. Commands are to be placed on their own line in commands.txt in the same directory as connect.sh. Create commands.txt manually, or alternatively by running connect.sh with the -c option. If commands.txt does not exist it will be created. If it does exist the commands will be run as specified in the file.
WPS button LED feedback:
The WPS button LED will flash when the script starts. This means the script is starting. After 30 or 40 seconds count the flashes! There will be a series of flashes followed by a pause. The flashes will then repeat.
Currently there are 3 status states:
If the WPS LED goes solid, the script executed successfully! The pineapple is now connected to Wifi and has an IP address.
If the LED flashes once, it found wifi but was unable to obtain an IP address.
If the LED flashes twice, the pineapple was unable to find any open wifi networks.
If the connection is not successful, the WPS LED will remain off. Restarting the pineapple will restore the LED to normal operation.Installation
Download the attached file below. Copy or create the wificonnect directory at /pineapple/components/wificonnect/ (or where ever you would like) and place connect.sh in it. SSH into your pineapple, change into the script directory with cd and execute (without quotes): "chmod +x connect.sh".
WPS Button
Pineapple v3.x
Go to the Configuration tile > Button Configuration and add the following to the wps button script (without quotes): "sh /pineapple/components/wificonnect/connect.sh -i wlan1 &" (for external wifi) or "sh /pineapple/components/wificonnect/connect.sh -i wlan0 &" (for internal wifi). IMPORTANT: Keep the & at the end to ensure the script works properly. It is necessary if you would like to use the WPS button to stop the running script.
Alternatively, you can add this to a custom script in the WPS Manager infusion or run it from the terminal.
Pineapple v2.x
Go to the configuration tab in the Pineapple Control Center and add the following to the wps button script (without quotes): "sh /pineapple/components/wificonnect/connect.sh -i wlan1 &" (for external wifi) or "sh /pineapple/components/wificonnect/connect.sh -i wlan0 &" (for internal wifi). IMPORTANT: Keep the & at the end to ensure the script works properly. It is necessary if you would like to use the WPS button to stop the running script.
Alternatively, you can add this to a custom script in the Button infusion or run it from the terminal.
Screenshots
Wifi Connect v1.3 Created by: SymPak USAGE: ./connect.sh [-BRWkrc] [-i <wlan0|wlan1>] [-s SSID] [-p Wifi Password] [-t Interface] [-b SSID] [-w SSID]... OPTIONS: -B Backup /etc/config/wireless -R Restore /etc/config/wireless from backup -k Start Karma -r Random MAC -i Interface -s SSID -p Wifi Password -t To interface for ICS. From interface is specified with -i -w Whitelists AP by SSID. Scans with WLAN0 if no interface is specified. Unencrypted netowrks only -W Checks for and connects to networks specified in the whitelist. Unencrypted netowrks only -b Blacklists AP by SSID. Scans with WLAN0 if no interface is specified. Unencrypted netowrks only -c Run commands specified in commands.txt upon successful connection.
Blacklisting and whitelisting screenshot:
root@Pineapple:/pineapple/scripts/wificonnect# ./connect.sh -i wlan1 -b someAP
Starting on wlan1
Scanning for wifi
someAP added to blacklist
Done.
root@Pineapple:/pineapple/scripts/wificonnect# ./connect.sh -i wlan1 -w myAP
Starting on wlan1
Scanning for wifi
myAP added to whitelist
Done.root@Pineapple:/pineapple/scripts/wificonnect# ./connect.sh -i wlan1 -W
Starting on wlan1
Stopping karma
Scanning for wifi
Checking for whitelisted APs
Found myAP in whitelist.
Connecting to myAP on channel 6 signal quality 72%
Requesting IP AddressConnected
Configuring ICS
Done.Backup and restore screenshot:
root@Pineapple:/pineapple/scripts/wificonnect# ./connect.sh -B
Wireless configuration file backed up
Done.root@Pineapple:/pineapple/scripts/wificonnect# ./connect.sh -R
Wireless configuration file restored from backup
Done.If you encounter any errors please report them here. Also feature requests or improvement suggestions are always welcome!
Note: If you would like to use parts of this script for a script or infusion of your own, contact me by a PM.
-SymPak
-
Upgrade to 2.8.1, which is now out of beta! If your still having problems try these commands:
uci set wireless.@wifi-iface[1].ssid="Your SSID"
uci set wireless.@wifi-device[1].channel="Your channel"
uci set wireless.@wifi-iface[1].network=wan
uci set wireless.@wifi-iface[1].mode=sta
uci commit wireless
wifiudhcpc -i wlan1
Note, this is for open wifi.
Hope this helps
-
Im not getting the dhcp request link on radio 0 in network manager. I haven't had a problem with radio 1. But once you set up the interface in network manager you can manually request an IP address by executing "udhcpc -i wlan1" for radio 1 or "udhcpc -i wlan0" for radio 0. Hope this helps
-
In network manager, make sure you set lan to wan and access point to client.
I am almost ready to release my script, just a few more details to work out. My plan is to have support for encrypted access points in the future, but it may not make it into the initial release. I will be making a thread detailing the features and future plans.
I don't currently have plans to automate attacks although, Foxtrot is working on an infusion called automator which will do just that!
-
trapman16, check the log tab. If you are getting the error "deauthenticating from ... by local choice (reason=3)" then go to https://wifipineapple.com/?portal and sign up for beta testing. 2.8.1 beta 2 fixed that problem for me.
-
My desired config: Get rid of the intermediary laptop and have the pineapple connect to some preset APs or any open AP in range.
I am currently working on just this! I have a script mostly complete and an infusion is in the works. It connects to the strongest open wifi when you press the wps button! Also I can confirm that 2.8.1 beta 2 fixes the deauth reason 3 error.
-
Do you have the swap partition set up?
-
Awesome, thanks Sebkinne!
If i could figure out how to get the WPS button/Button Infusion to work with 2.7.7 it wouldn't be AS stressful.
Try this as a temporary fix for the wps button issue: http://forums.hak5.org/index.php?/topic/28778-wps-button-not-working/
-
Wlan1 is also connecting perfectly for me on 2.7.7. I never thought to test wlan0 on 2.8.0, ill give that a shot later! And as far as I know karma only works on wlan0.
-
I am also having this problem. I am not able to connect to open or protected APs. The adapter I am using is the Alfa NHA on firmware 2.8.0. I have tried using the network manager infusion, iwconfig and editing /etc/config/wireless. Sometimes, maybe once every 50 tries I can connect to an open AP. I am also getting deauthenticating from XX:XX:XX:XX:XX:XX by local choice (reason=3).
Update:
I downgraded to 2.7.4 and was able to connect without a problem. After upgrading back to 2.8.0 I am having the same issue.
Wifi Connect script UPDATED v1.3 v3.0.0 compatible!
in WiFi Pineapple Mark IV
Posted
Thats not an /etc/config/wireless issue. Thats an issue with the iwlist command. The interface isn't allowing a scan to be completed. Try executing iwlist wlan1 scan and see what errors it gives