Jump to content

Wifite2 Wifi Pineapple Setup


kleo

Recommended Posts

Wifite2 WiFi Pineapple Setup

Simple setup to use Wifite2 on your WiFi Pineapple. Credits to the contributors of Wifite2.

 

Requirements:

1. Mounted flashdrive on the WiFi Pineapple. (We won't be using an sdcard due to a kernel bug, still present on the latest version 2.0.2, pointed out by Zylla, https://www.wifipineapple.com/bugs/511)

2. Flashdrive format script by Zylla:

Mirror: https://gist.github.com/kbeflo/8c85c084e9c5ae86b3367716a463e793

3. Mount flashdrive on boot

# Mount flashdrive on boot

# create mount.sh at /root/
mount /dev/sdb1 /sd
swapon /dev/sdb2

# include these lines at /etc/rc.local

sleep 5
./root/mount.sh

 

 

Wifite2:

Github: https://github.com/derv82/wifite2

 

opkg update

# tetra
opkg install git git-http coreutils-stty

git clone git://github.com/derv82/wifite2.git

cd wifite2/

./Wifite.py

# nano with sd card
opkg install --dest sd git git-http coreutils-stty

cd /sd/

git clone git://github.com/derv82/wifite2.git

cd wifite2/

./Wifite.py

 

 

 

Edited by kbeflo
  • Like 2
  • Upvote 1
Link to comment
Share on other sites

1 hour ago, maximusgoliath said:

First of all, thank you for your work!

Any Idea what I‘ve might be missing here:

root@Pineapple:~# cd /sd
root@Pineapple:/sd# cd wifite2/
root@Pineapple:/sd/wifite2# ls
LICENSE      README.md    Wifite.py    py           runtests.sh
root@Pineapple:/sd/wifite2# ./Wifite.py
-ash: ./Wifite.py: not found
 

Try "chmod +x Wifite2.py"   or  "python Wifite.py"

Link to comment
Share on other sites

But it won't work on my Nano. Tried interface 1,2,3 and 9 always the same exception occurs:

 


 [+] looking for wireless interfaces

    PHY   Interface   Driver              Chipset                       
-----------------------------------------------------------------------
 1. phy1  wlan2       Atheros AR9271      ath9k                         
 2. phy2  wlan1       Atheros AR9271      ath9k                         
 3. phy0  wlan0-1     Atheros AR9330      ath9k                         
 4. phyX  IEEE        Unknown             Unknown (MONITOR MODE NOT SUPPORTED)
 5. phyX  802.11bgn   Unknown             Unknown (MONITOR MODE NOT SUPPORTED)
 6. phyX  Mode:Master Unknown             Unknown (MONITOR MODE NOT SUPPORTED)
 7. phyX  Tx-Power=17 Unknown             Unknown (MONITOR MODE NOT SUPPORTED)
 8. phyX  dBm         Unknown             Unknown (MONITOR MODE NOT SUPPORTED)
 9. phy0  wlan0       Atheros AR9330      ath9k                         

 [+] select interface (1-9): 9
 [+] enabling monitor mode on wlan0... enabled mon0

 [+] Scanning. Found 0 target(s), 0 client(s). Ctrl+C when ready                                                                                                          
 [!] Error: Airodump exited unexpectedly! Command ran: airodump-ng mon0 -a -w /tmp/wifiteRpkuXu/airodump --write-interval 1 --output-format pcap,csv

 [!] Full stack trace below

 [!]    Traceback (most recent call last):
 [!]    File "Wifite.py", line 201, in <module>
 [!]        w.main()
 [!]    File "Wifite.py", line 39, in main
 [!]        self.run()
 [!]    File "Wifite.py", line 83, in run
 [!]        s = Scanner()
 [!]    File "/sd/wifite2/py/Scanner.py", line 38, in __init__
 [!]        % ' '.join(airodump.pid.command))
 [!]  Exception: Airodump exited unexpectedly! Command ran: airodump-ng mon0 -a -w /tmp/wifiteRpkuXu/airodump --write-interval 1 --output-format pcap,csv

 [!] Exiting

 [!] disabling monitor mode on mon0... disabled mon0
 [!] putting interface wlan0 up... done
 [!] restarting NetworkManager... restarted

Link to comment
Share on other sites

On 18.11.2017 at 6:07 PM, maximusgoliath said:

But it won't work on my Nano. Tried interface 1,2,3 and 9 always the same exception occurs:

 


 [+] looking for wireless interfaces

    PHY   Interface   Driver              Chipset                       
-----------------------------------------------------------------------
 1. phy1  wlan2       Atheros AR9271      ath9k                         
 2. phy2  wlan1       Atheros AR9271      ath9k                         
 3. phy0  wlan0-1     Atheros AR9330      ath9k                         
 4. phyX  IEEE        Unknown             Unknown (MONITOR MODE NOT SUPPORTED)
 5. phyX  802.11bgn   Unknown             Unknown (MONITOR MODE NOT SUPPORTED)
 6. phyX  Mode:Master Unknown             Unknown (MONITOR MODE NOT SUPPORTED)
 7. phyX  Tx-Power=17 Unknown             Unknown (MONITOR MODE NOT SUPPORTED)
 8. phyX  dBm         Unknown             Unknown (MONITOR MODE NOT SUPPORTED)
 9. phy0  wlan0       Atheros AR9330      ath9k                         

 [+] select interface (1-9): 9
 [+] enabling monitor mode on wlan0... enabled mon0

 [+] Scanning. Found 0 target(s), 0 client(s). Ctrl+C when ready                                                                                                          
 [!] Error: Airodump exited unexpectedly! Command ran: airodump-ng mon0 -a -w /tmp/wifiteRpkuXu/airodump --write-interval 1 --output-format pcap,csv

 [!] Full stack trace below

 [!]    Traceback (most recent call last):
 [!]    File "Wifite.py", line 201, in <module>
 [!]        w.main()
 [!]    File "Wifite.py", line 39, in main
 [!]        self.run()
 [!]    File "Wifite.py", line 83, in run
 [!]        s = Scanner()
 [!]    File "/sd/wifite2/py/Scanner.py", line 38, in __init__
 [!]        % ' '.join(airodump.pid.command))
 [!]  Exception: Airodump exited unexpectedly! Command ran: airodump-ng mon0 -a -w /tmp/wifiteRpkuXu/airodump --write-interval 1 --output-format pcap,csv

 [!] Exiting

 [!] disabling monitor mode on mon0... disabled mon0
 [!] putting interface wlan0 up... done
 [!] restarting NetworkManager... restarted

Holy moly, that's alot of interfaces!
Have you upgraded your version of aircrack-ng  on the Pineapple?
This output looks alot like the bogus output you get after upgrading to another version of aircrack-ng, not using the airmon-ng customized for the Pineapples.

Link to comment
Share on other sites

  • 1 month later...
2 minutes ago, Rinilyn said:

i really need this working man. this is everything i did after a fresh reset. @kbeflo

( i sym linked git too). i also tried other interfaces after the pictures. same results.

The issue with Wifite2 in the first screenshot comes from not having installed coreutils-stty.
In the second screenshot i can see you're installing it. So i'm a bit puzzled. Does it happen after installing coreutils-stty?
And by the way, i saw you drew a red line around some errors in the second screenshot. Those are not actual errors that are causing the Nano to misbehave.
Those errors appear on every package you try to install with OPKG on the Nano. I guess the overlay filesystem is fooling opkg to think that something is wrong, when actually it's not.
So every line that contains: .prerm / .postinst / .list / .control can safely be ignored on the Nano. Nothing is actually wrong.

Link to comment
Share on other sites

21 minutes ago, Zylla said:

The issue with Wifite2 in the first screenshot comes from not having installed coreutils-stty.
In the second screenshot i can see you're installing it. So i'm a bit puzzled. Does it happen after installing coreutils-stty?
And by the way, i saw you drew a red line around some errors in the second screenshot. Those are not actual errors that are causing the Nano to misbehave.
Those errors appear on every package you try to install with OPKG on the Nano. I guess the overlay filesystem is fooling opkg to think that something is wrong, when actually it's not.
So every line that contains: .prerm / .postinst / .list / .control can safely be ignored on the Nano. Nothing is actually wrong.

The red lines arentt errors, they are the commands that  i typed(im just trying to show him that i followed steps). Coreutils gets installed but wifite still wont run and “see” it. This is the same session with wifite happening AFTER installing coreutils and sym linking.

.controls arent errors, im am sym linking them (i was desperate i tried everything). I sometimes feel my nano is different than everyone ?

Edited by Rinilyn
Link to comment
Share on other sites

17 hours ago, Rinilyn said:

The red lines arentt errors, they are the commands that  i typed(im just trying to show him that i followed steps). Coreutils gets installed but wifite still wont run and “see” it. This is the same session with wifite happening AFTER installing coreutils and sym linking.

.controls arent errors, im am sym linking them (i was desperate i tried everything). I sometimes feel my nano is different than everyone ?

There's no need to sym-link those files, as the error-messages is a "false-positive". (Due to the reasons i explained above with the overlay filesystem.)
You will get those error messages with any IPK you try to install on the Nano, but they can safely be ignored. The installed IPK still works.

That being said, i just tested Wifite2 on my Nano. (factory settings with usb-stick mounted as /sd)
Here's my process step-by step, for the nano. And it works flawlessly:

opkg update ; opkg install coreutils-stty -d sd
mkdir -p /sd/gits ; cd /sd/gits
git clone git@github.com:derv82/wifite2
python wifite2/Wifite.py

Results:
image.png.9664275a2a5cc9f530c9268aaea7ad81.png

Link to comment
Share on other sites

  • 4 weeks later...

Updated requirements

@Rinilyn quoting you for your reliable setup.

On 1/8/2018 at 11:48 PM, Rinilyn said:

What you need: 
# Wifi Pineapple Nano Connected To a Pc with Internet
# USB Hub
# A Regular Usb Drive
# A Third Compatible Radio( Prefer RALINK USB WIFI RT5370)

-Go To http://172.16.42.1:1471 and navigate to Advanced and backup whats in Fstab.
-Remove your sd card if its there,Go to Configuration and Perform a Factory reset.
-Meanwhile,plug in your USB drive to your PC and Format your USB to (ext4+swap partition). You can use an App such as PartitionGURU to accomplish that.
-Connect your Pineapple back to PC, Navigate to http://172.16.42.1:1471 and after setting up your fresh pineapple, Go to Configuration and edit Fstab to:

config global 
    option anon_swap '0'
    option anon_mount '0'
    option auto_swap '1'
    option auto_mount '1'
    option delay_root '5'
    option check_fs '0'

config mount
    option target '/mnt'
    option device '/dev/sda1'
    option fstype 'auto'
    option options 'rw,sync'
    option enabled '1'


Then, Format your SD card also in configuration, Save Fstab again.
To make sure everything is working,try downloading a module and check if it recognises the sd card

Open your favorite SSH tool and SSH into your pineapple  and type:


1. fdisk -l

2. Check if your thumb drive is listed

3. mount -t ext4 /dev/sdb1 /sd/

Your Pineapple now thinks the USB drive is an SD Card. 

Edited by kbeflo
  • Upvote 1
Link to comment
Share on other sites

@kbefloNano users must do these also:

Sym link git:

ln -s /sd/usr/bin/git /usr/bin/git
ln -s /sd/usr/bin/git-shell /usr/bin/git-shell
ln -s /sd/usr/bin/git-upload-pack /usr/bin/git-upload-pack
ln -s /sd/usr/bin/git-upload-archive /usr/bin/git-upload-archive
ln -s /sd/usr/bin/git-receive-pack /usr/bin/git-receive-pack

 

Sym Link stty:

ln -s /sd/usr/bin/stty /usr/bin/stty

 

otherwise he will get the errors i had previously mentioned above.

Edited by Rinilyn
  • Upvote 1
Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...