Bash Bunny
  • Bash Bunny by Hak5
  • Getting Started
    • Switch Positions
    • Mass Storage Structure
    • LED Status Indications
    • Installing Additional Tools
    • Installing Additional Languages
    • Considerations for Mark II
  • Writing Payloads
    • Payload Development Basics
    • DuckyScript™ on the Bash Bunny
    • QUACK
    • Extensions
    • ATTACKMODE
      • VID, PID, MAN, PROD, SN
    • LED
    • Working with the File System
    • CPU Control
    • Contributing Best Practices
    • Submitting Payloads
    • WAIT_FOR_PRESENT
  • Internet Connectivity
    • Getting the Bash Bunny Online
    • Sharing an Internet connection from Windows
    • Sharing an Internet connection from Linux
    • Sharing an Internet connection from MacOS
  • Software Updates
    • Updating the Bash Bunny Firmware
  • Troubleshooting
    • Factory Reset
    • Password Reset
  • Beginner Guides
    • Writing Keystroke Injection Payloads for the Bash Bunny
    • Network Hijacking Attacks with the Bash Bunny
    • Top 5 Bash Bunny Exfiltration Payloads to "steal files"
    • Getting Root on a Bash Bunny from the Serial Console
    • Remote Triggers for the Bash Bunny Mark II
    • Geofencing for the Bash Bunny Mark II
  • Video Guides
    • Bash Bunny Primer
    • Bash Bunny Phishing Attack with Hamsters
    • Password Grabber Bash Bunny Payload
    • Operating System Detection with the Bash Bunny
    • Bash Bunny Extensions
    • Reverse Shells on Linux with Bash Bunny
    • Bash Bunny Payload - Sudo Bashdoor on Linux
    • Bash Bunny Payload - 1990's Prank
    • Bash Bunny Dev - Behind the Scenes
    • Concealed Exfiltration - Pocket Network Attacks with the Bash Bunny
    • How to write Bash Bunny payloads and contribute on GitHub
Powered by GitBook
On this page
  • METHOD 1: DHCLIENT EXTENSION
  • METHOD 2: SQUID VIA MACPORTS
  1. Internet Connectivity

Sharing an Internet connection from MacOS

Last updated 3 years ago

The Bash Bunny can share the Internet connection of a host computer. This can be useful when installing additional software on your Bash Bunny. Following these instructions, you will be able to share your Mac's Internet connection with your Bash Bunny so that, when connected to your Bash Bunny via SSH, you will be able to successfully issue commands requiring an Internet connection such as git clone or apt-get.

METHOD 1: DHCLIENT EXTENSION

  1. With the Bash Bunny in arming mode, create a new payload.txt in switch position 1 directory as follows:

    LED SETUPATTACKMODE ECM_ETHERNETDHCLIENTLED FINISH≈
  2. Safely eject the Bash Bunny, then flip the selector switch to position 1 and reconnect it to your Mac.

  3. If this is your first time configuring Internet Connection Sharing for this Bash Bunny on your Mac, you may now need to unplug and replug the Bash Bunny while in the same switch position 1. The LED will indicate magenta while the ECM Ethernet interface comes online and the DHCP client on the Bash Bunny then attempts to obtain an IP address from your Mac. Once successful, the LED will change to green.

  4. The Bash Bunny will get an IP address from your Mac in the 192.168.2.x/24 range (likely 192.168.2.2). Check the bridge100 interface with the ifconfig command in a terminal.You should now be able to SSH into the Bash Bunny from the terminal, for example with the command ssh root@192.168.2.2

METHOD 2: SQUID VIA MACPORTS

  1. Configure a payload.txt for ATTACKMODE ECM_ETHERNET STORAGE

  2. Boot Bash Bunny from an ECM_ETHERNET configured payload

  3. Install and set up Squid on the OSX host:

    sudo port install squid
    sudo squid -z
    sudo squid
  4. You will now have an open (!!) proxy running on all interfaces of your host. If you are not in a trusted environment, limit the interface in the squid.conf file.

  5. SSH to the bash bunny

    ssh root@172.16.64.1
  6. Set up the proxy server using environment variables.

    export http_proxy=http://172.16.64.10:3128   <-- change the IP address to match the host IP if needed
  7. Your bash bunny should now be on-line.

    apt-get update; apt-get upgrade

Ensure that the Bash Bunny has been updated to the latest firmware and that the is present in the payloads/extensions/ directory on the Bash Bunny's USB mass storage partition. If not, copy the extension from the linked Bash Bunny repository.

From the System Preferences > Sharing menu on your Mac, check Internet Sharing, then select the Internet interface from "Share your connection from" and the Bash Bunny (labeled RNDIS/Ethernet Gadget) from "To computer using", then save changes and close the menu.

Open a terminal on the OSX host. Install Macports if you don’t have it installed already.

get2_dhclient.sh extension
http://macports.org
https://youtu.be/U2UMz9C283M
mceclip0.png