Wifi Pineapple Nano
Setting up
- Download the firmware Hak5 download centre
- plug in the pineapple to the PC using the USB Y-cable: both USB ends in the PC and the female usb onto the pineapple
- surf to http://172.16.42.1:1471
- follow instructions and then:
Windows
- you get a new network connection
- In network connections rename the new ASIX USB network to pineapple using F2
- In your internet connection, right click -> properties -> sharing -> set to on -> select pineapple in the drop down list (home networking connection) and apply
- Pineapple connection, right click -> properties -> set ipv4 address to 172.16.42.42, netmask 255.255.255.0. Gateway and DNS stays empty
Now continue under Both
Linux
lsusb
shows you an ASIX fast ethernet card
ifconfig | grep eth
shows you a new usb ethernet port
wget wifipineapple.com/wp6.sh chmod +x wp6.sh sudo ./wp6.sh
Because the wp6.sh script doesn't write the route properly, using C to connect results in a message: "Detecting Wifi Pineapple......." and endless dots. To fix this
sudo ip route add 172.16.42.0/24 dev enx00c0ca9153f3
And then run the wp6.sh script and use the C button.
Connection problems
Internet sharing issue with Kali / Just_a_User shows you how to connect using Network Manager
Plug the nano into your kali machine and wait for it to be detected.
Use network manager to configure the IP manually to 172.16.42.42, subnet 255.255.255.0 .
Either turn off and on the interface using network manager or unplug and replug nano - confirm ip is 172.16.42.42.
Open up ssh terminal and type in "nm-connection-editor" and select your interface - maybe name it e.g. nano
Browse to ipv4 settings tab and use the drop down menu to select "Shared to other computers"
Either turn off and on the interface using network manager or unplug and replug nano
Browse to Pineapple UI or ssh into nano and check internet connectivity - hopefully sorted.
You may have to run above command again to be able to get the pineapple to connect.
ip route list
should look a bit like
default via 192.168.0.1 dev wlp4s0 proto dhcp metric 20600 169.254.0.0/16 dev wlp4sc0 scope link metric 1000 172.16.42.0/24 dev enx00c0ca9153f3 scope link 192.168.0.0/24 dev wlp4s0 proto kernel scope link src 192.160.0.53 metric 600
This keeps a problem with the resolver, where for some reason the laptop can't resolve DNS, but the pineapple can.
When rebooting you may need to reseat the PC USB plug closest to the female USB plug (in the pineapple)
Setup for Wifi Pineapple Nano on Ubuntu 18.04 has a better script than above
Another alternate script Use like "sudo ./script <pineapple_interface> <computer_wifi_interface> <wifi_router_address>"
#!/bin/bash IFACE_IN=$1 IFACE_EX=$2 GW=$3 ifconfig $IFACE_IN up ifconfig $IFACE_IN 172.16.42.42 netmask 255.255.255.0 route del default gw Pineapple.lan route add default gw $GW netmask 0.0.0.0 echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -o $IFACE_EX -j MASQUERADE iptables -A FORWARD -i $IFACE_EX -o $IFACE_IN -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -A FORWARD -i $IFACE_IN -o $IFACE_EX -j ACCEPT
Both
Now you can surf to http://172.16.42.1:1471 and load the bulletins - now you know you're online.
Modules
Stuff not in the hak5 repositories
adde88 repo of very useful tools
Not installing / updating
Most likely the there are problems with the SD Card.
If you SSH in you may find the following error:
pineapple nano jffs2-partition seems full and overlayfs is mounted read-only
then the modules have probably installed to
/overlay/upper/pineapple/modules/
and / or
/sd/modules
There should be links in /overlay/upper/pineapple/modules/ from /sd/modules/, so empty both directories and re-install after ensuring the sd card is mounted properly, or you may end up with version mismatches.
list of installed modules
Dwall Evil Portal Deauth nmap Occupineapple Portal Auth SSLsplit Site Survey Log manager
SD Card
This can be a real problem to mount or get working. You can find loads of interesting error messages in dmesg but none of them will make much sense. The recommendation is to format the SD Card in the webinterface. Under Advanced you can click on USB & Storage and select Format SD Card. That may very well not work.
The SD Card has two partions
- data partition
- swap partition
Commands you will use a lot
fdisk -l dmesg
The solution [1] here at least formats your sd card in the right way. You may need to perform a few of these steps from another linux PC though - every time I tried the mkfs.ext4 /dev/sda1 on the pineapple the scsi bus would reboot and it would tell me /dev/sda1 doesn't exist.
Tools to wipe from sdcard.org
SD Memory Card Formatter 5.0.1 for SD/SDHC/SDXC
complete wipe and gui format
Completely wipe SD card with dd if=/dev/zero of=/dev/sdcard/sd bs=4096 Eject SD card from WiFi Pineapple NANO Power off WiFi Pineapple NANO Insert SD card into WiFi Pineapple NANO Power on WiFi Pineapple NANO Use the webinterface to format the SD card (this may take a while). Alternatively, use a linux distro to format the SD card ext4. The card should mount automatically. If it does not, reboot the WiFi Pineapple NANO.
hand formatting
Format SD Card
cat /pineapple/modules/Advanced/formatSD/fdisk_options | fdisk /dev/sda mkfs.ext4 /dev/sda1 mkfs.ext4 /dev/sda2 mkswap /dev/sda2 mkdir /sd
change /etc/config/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 '/sd' option device '/dev/sda1' option fstype 'auto' option options 'rw,sync' option enabled '1'
config 'swap' option device '/dev/sda2' option enabled '1'
Reboot and the SD Card should be mounted.