Mac OS X can provide the Hak5 WiFi Pineapple with Internet connectivity for connected clients, but setting this up does require configuration of the Pineapple network configuration file before it will work. This is a step beyond what Windows and Linux users have to do.

For an easier solution, which requires a USB WiFi adapter capable of 2.4Ghz, please see the post:  How to configure a Hak5 WiFi Pineapple for Internet access using a USB WiFi Adapter

This may not be the only solution, but it’s one that works for us in our class, Achieving Security Awareness Through Social Engineering Attacks, currently going on at BlackHat USA 2018.

If internet sharing is not working using  instructions you found online or in the Pineapple book, this may be a solution for you.

Mac OS X “Connection Sharing” expects to use a default network IP range – 192.168.2.x “class C” with a netmask of 255.255.255.0

The Pineapple by default uses 172.16.42.x/255.255.255.0.  This causes a conflict.

You CAN change the default on your Mac, but I recommend changing the setting on your Pineapple, instead.

The steps to set up Internet Connection Sharing on Mac OS X for the Hak5 WiFi Pineapple are basically:

  1. Ensure WiFi (or Ethernet) connectivity is working on your laptop. You should be able to browse the web.
  2. Your user account needs Administrative privileges on your Mac in order to enable Internet Sharing
  3. Plug in Pineapple to USB port(s) on computer
    • Some systems require both ends of the included USB “Y” cable to be connected to power.
    • A USB 2.0 or greater hub is useful in these cases, as may be a USB-A to USB-C adapter.
  4. Wait for Pineapple to boot
  5. Change to a “Manual Configuration” for the Pineapple network interface on your Mac:
    • IP address – 172.16.42.42
    • Netmask – 255.255.255.0
    • Router – <leave blank>
    • DNS – <leave blank>
    • Click the button to “Complete Setup”
  6. In a web browser, connect to the Pineapple on the administrative interface: http://172.16.42.1:1471 and complete the setup:
    • Set the root password to something memorable, and keep in mind that you are connecting over port 80 unencrypted to setup the Pineapple, so set your password accordingly.
    • Set the “Management SSID” name and “WPA2 Password” (you will not be using this, but it needs to be set in order to exit setup)
    • Check the boxes at the bottom of the screen and continue (i.e. Read and accept EULA and Software License)
    • (Pineapple will continue to Login screen)
  7. SSH to the pineapple:
    • Open “Terminal.app” on your Mac
    • Type “ssh root@172.16.42.1” and hit RETURN
    • When prompted, enter the Pineapple’s root password, which you set earlier, and hit RETURN
    • Edit a file on your Pineapple called /etc/config/network with your favorite editor, e.g. by starting a text editor in your Pineapple’s command line SSH terminal:
      • nano /etc/config/network
      • or
      • vi /etc/config/network
    • Look for the “config interface ‘lan’” section within the file and:
      • Update the Pineapple’s IP address or “option ipaddr” to: 192.168.2.10
      • Update default router for the Pineapple or “option gateway” to:  192.168.2.42
        • Changes shown in bold – some data has been left out of this article: 
        • config interface 'lan'
                  option ifname   'eth0'
                  option type     'bridge'
                  option proto    'static'
                  option ipaddr   '192.168.2.10' #172.16.42.1 is default  
                  option netmask  '255.255.255.0'
                  option gateway  '192.168.2.42' #172.16.42.42 is default
                  option dns      '8.8.8.8, 8.8.4.4'
    • Save the file and exit the editor
      • nano:  CTRL-X
      • vi:   :wq!
    • Type “reboot” at the command prompt of the Pineapple
  8. Wait for the Pineapple to reboot
  9. On your Mac, under the “Network” Preferences Pane, change the a “Manual Configuration” for the Pineapple network interface on your Mac to:
    • IP address – 192.168.2.42
    • Netmask – 255.255.255.0
    • Router – <leave blank>
    • DNS – <leave blank>
    • <Apply Settings>
  10. On your Mac, under the “Sharing” Preferences pane:
    • Click on the word “Internet Sharing”
    • Uncheck the “Internet Sharing” box, if it is checked.
    • Configure as such on the right side:  “Share <WiFi Interface> with <Pineapple Interface>”
      • If the Pineapple port does not appear in the box on the right hand side of the window, you may not be giving enough power to the Pineapple. Some systems require both ends of the included USB “Y” cable to be connected to power.
      • A USB 2.0 or greater hub is useful in these cases, as may be a USB-A to USB-C adapter.
    • Check the box next to “Internet Sharing” to enable it
    • When prompted, select the “Start” button in the dialog box
  11. On your Mac, connect to new portal URL in your web browser – http://192.168.2.10:1471
    • On the Dashboard tab, click “Load bulletins from WiFiPineapple.com”
    • The loading image will animate and bulletins should load
    • Any error indicates internet Sharing was not successful

Your Mac’s Pineapple network port is now set to be 192.168.2.42 and your Pineapple is now set to be 192.168.2.10 and they form a network. The Pineapple is configured to use x.x.x.42 (192.168.2.42, as we specifically defined) as its default gateway. Your Mac is now the Pineapple’s router. The Pineapple sends it traffic through the Mac.

Each time you enable “Connection Sharing” on a Mac (at time of writing: High Sierra), it creates a file called /etc/bootpd.plist — this disappears when Sharing is stopped. The bootpd.plist file shows the default IP range the Mac expects to use. This can be useful in troubleshooting.