Uploaded AirBridge

pull/42/head
0i41E 2024-07-30 12:05:38 +02:00 committed by GitHub
parent 8f3c354765
commit 071abf6e95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 94 additions and 0 deletions

View File

@ -0,0 +1,61 @@
#!/bin/bash
# Title: AirBridge
# Author: 0i41E
#
# Description: A payload to enable WiFi on the Squirrel, when a WiFi Adapter is attached.
# Requirements beforehand: opkg update && opkg install usb-modeswitch, MK7AC Module or similar WiFi Adapter.
# Usage: Connect with payload switch selected, and wait for the magenta LED, insert WiFi adapter, press button.
# Set Network mode
NETMODE BRIDGE
# Starting SSH & Web Interface
SSH_START
UI_START
LED M FAST
BUTTON
LED G FAST
SSID="<SSID>" # Station SSID
PASSPHRASE="<Passphrase>" # Passphrase
EXTERNAL_HOST="8.8.8.8" # Host to verify connection
WLAN_INTERFACE="wlan0"
# Removing old wpa_supplicant.conf file
rm /etc/wpa_supplicant.conf
# Check if wlan interface is up
if ! ip link show $WLAN_INTERFACE | grep -q "state UP"; then
ip link set $WLAN_INTERFACE
else
echo "$WLAN_INTERFACE is already up."
fi
# Create wpa_supplicant.conf file
cat > /etc/wpa_supplicant.conf <<EOF
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="$SSID"
psk="$PASSPHRASE"
}
EOF
# Start wpa_supplicant
wpa_supplicant -B -i "$WLAN_INTERFACE" -c /etc/wpa_supplicant.conf
# Obtain IP address via DHCP
udhcpc -i "$WLAN_INTERFACE"
# Check connectivity to the external host
if ping -c 1 $EXTERNAL_HOST; then
C2NOTIFY INFO AirBridge initiated!
LED G SOLID
else
LED R SOLID
fi

View File

@ -0,0 +1,33 @@
# AirBridge
#### Author: 0i41E
**AirBridge** is a payload designed for the [Package Squirrel MK II](https://shop.hak5.org/products/packet-squirrel-mark-ii) in combination with Hak5's [MK7AC Module](https://shop.hak5.org/products/mk7ac-wifi-adapter), or similar WiFi adapters.
It is meant to help users to overcome a potential airgapped network, by utilizing the WiFi adapter to connect to a nearby Station.
Since it'll start the SSH service, as well as the Web interface, users can then interact with the Squirrel as usual. C2 access or conection to a VPN are also possible afterwards.
BILD
## Preperation
Before deploying the Squirrel as also the payload, the user has to update the system and install `usb_modeswitch`, as without it, the WiFi adpater will be identified as storage. For this step, internet access is required.
`opkg update && opkg install usb-modeswitch`
Apart from this step, the payload needs to be configured.
Input the desired `SSID`, as well as its `PASSPHRASE`.
Optionally, the `EXTERNAL_HOST` may be changed from Googles DNS server to a different system. The users C2 instance may be a good alternative, if used. `NETMODE` can be configured to the users needs.
```
SSID="<SSID>" # Station SSID
PASSPHRASE="<Passphrase>" # Passphrase
EXTERNAL_HOST="8.8.8.8" # External Host to verify connection
```
The last step is obvious, but should be mentioned...
Prepare a Station, reachable by the AC Module.
## Usage
After saving the payload, put the switch into the correct position and power up the device.
After successfully booting, a blinking LED in the color magenta, will indicate the Squirrel being ready to proceed.
Plug in your WiFi adapter via USB-A and press the button. *This method was implemented intentionally, as during testing it caused problems to power up the device with the AC Module already attached.*
The LED will start blinking green.
A solid green LED will indicate the success. Otherwise, a red LED will appear.
If everything went well, you should now be able to access the Squirrel by whatever IP-Address your Station gave to the Squirrel.