Wifi Pineapple Nano

From Edgar BV Wiki
Revision as of 12:50, 25 March 2020 by Unknown user (talk) (→‎Linux)
Jump to navigation Jump to search

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.

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)

Both

Now you can surf to http://172.16.42.1:1471 and load the bulletins - now you know you're online.

Modules

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

They should be in both, 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.

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.