From 7031690f7b951355e1df71f65e0af57fc9643daf Mon Sep 17 00:00:00 2001 From: rf-bandit <111388888+rf-bandit@users.noreply.github.com> Date: Mon, 4 Nov 2024 23:54:08 -0700 Subject: [PATCH 1/5] Create openvpn-Mkii This payload is modified from a payload for the original Packet Squirrel to work on the Packet Squirrel Mark II. More info here: https://www.youtube.com/watch?v=OlKztGlt8VA --- payloads/remote-acces/openvpn-Mkii | 56 ++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 payloads/remote-acces/openvpn-Mkii diff --git a/payloads/remote-acces/openvpn-Mkii b/payloads/remote-acces/openvpn-Mkii new file mode 100644 index 0000000..7af220a --- /dev/null +++ b/payloads/remote-acces/openvpn-Mkii @@ -0,0 +1,56 @@ +#!/bin/bash +# +# This payload is modified from a payload for the original Packet Squirrel to work on +# the Packet Squirrel Mark II. +# More info here: https://www.youtube.com/watch?v=OlKztGlt8VA +# +# Title: OpenVPN-Mkii +# Description: Create a connection to a VPN-connection to an OpenVPN-server. Optionally: Send traffic from the clients through said tunnel. +# Author: Hak5, rf_bandit +# Version: 1.1 +# Category: remote-access +# Target: Any +# Net Mode: BRIDGE, NAT + +# Set to 1 to allow clients to use the VPN +FOR_CLIENTS=0 +# + +DNS_SERVER="8.8.8.8" + +# Cheap hack to set the DNS server +function setdns() { + while true + do + [[ ! $(grep -q "$DNS_SERVER" /tmp/resolv.conf) ]] && { + echo -e "search lan\nnameserver $DNS_SERVER" > /tmp/resolv.conf + } + sleep 5 + done +} + +function start() { + LED SETUP + DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) + if [ $FOR_CLIENTS = 1 ]; then /usr/bin/NETMODE NAT && /usr/bin/LED G SINGLE; else /usr/bin/NETMODE BRIDGE && /usr/bin/LED Y SINGLE; fi + + + sleep 3 + + # Make OpenVPN use the local configuration + uci set openvpn.vpn.config="${DIR}/config.ovpn" + uci commit + + # Start the OpenVPN server in the background + /etc/init.d/openvpn start + + # Start SSH Server + SSH_START + # Set DNS server + setdns & + + #LED ATTACK +} + +# Start the payload +start & From 59717ec9c47529510a6bed862e8b41451394d48d Mon Sep 17 00:00:00 2001 From: rf-bandit <111388888+rf-bandit@users.noreply.github.com> Date: Sat, 8 Feb 2025 22:05:41 -0700 Subject: [PATCH 2/5] Delete payloads/remote-acces/openvpn-Mkii --- payloads/remote-acces/openvpn-Mkii | 56 ------------------------------ 1 file changed, 56 deletions(-) delete mode 100644 payloads/remote-acces/openvpn-Mkii diff --git a/payloads/remote-acces/openvpn-Mkii b/payloads/remote-acces/openvpn-Mkii deleted file mode 100644 index 7af220a..0000000 --- a/payloads/remote-acces/openvpn-Mkii +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -# -# This payload is modified from a payload for the original Packet Squirrel to work on -# the Packet Squirrel Mark II. -# More info here: https://www.youtube.com/watch?v=OlKztGlt8VA -# -# Title: OpenVPN-Mkii -# Description: Create a connection to a VPN-connection to an OpenVPN-server. Optionally: Send traffic from the clients through said tunnel. -# Author: Hak5, rf_bandit -# Version: 1.1 -# Category: remote-access -# Target: Any -# Net Mode: BRIDGE, NAT - -# Set to 1 to allow clients to use the VPN -FOR_CLIENTS=0 -# - -DNS_SERVER="8.8.8.8" - -# Cheap hack to set the DNS server -function setdns() { - while true - do - [[ ! $(grep -q "$DNS_SERVER" /tmp/resolv.conf) ]] && { - echo -e "search lan\nnameserver $DNS_SERVER" > /tmp/resolv.conf - } - sleep 5 - done -} - -function start() { - LED SETUP - DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) - if [ $FOR_CLIENTS = 1 ]; then /usr/bin/NETMODE NAT && /usr/bin/LED G SINGLE; else /usr/bin/NETMODE BRIDGE && /usr/bin/LED Y SINGLE; fi - - - sleep 3 - - # Make OpenVPN use the local configuration - uci set openvpn.vpn.config="${DIR}/config.ovpn" - uci commit - - # Start the OpenVPN server in the background - /etc/init.d/openvpn start - - # Start SSH Server - SSH_START - # Set DNS server - setdns & - - #LED ATTACK -} - -# Start the payload -start & From ced62ada363427db9f436c2b0d5c6b543e932340 Mon Sep 17 00:00:00 2001 From: rf-bandit <111388888+rf-bandit@users.noreply.github.com> Date: Sat, 8 Feb 2025 22:06:55 -0700 Subject: [PATCH 3/5] Create payload.sh --- .../ /remote-access/openvpn-Mkii/payload.sh | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 payloads/ /remote-access/openvpn-Mkii/payload.sh diff --git a/payloads/ /remote-access/openvpn-Mkii/payload.sh b/payloads/ /remote-access/openvpn-Mkii/payload.sh new file mode 100644 index 0000000..7af220a --- /dev/null +++ b/payloads/ /remote-access/openvpn-Mkii/payload.sh @@ -0,0 +1,56 @@ +#!/bin/bash +# +# This payload is modified from a payload for the original Packet Squirrel to work on +# the Packet Squirrel Mark II. +# More info here: https://www.youtube.com/watch?v=OlKztGlt8VA +# +# Title: OpenVPN-Mkii +# Description: Create a connection to a VPN-connection to an OpenVPN-server. Optionally: Send traffic from the clients through said tunnel. +# Author: Hak5, rf_bandit +# Version: 1.1 +# Category: remote-access +# Target: Any +# Net Mode: BRIDGE, NAT + +# Set to 1 to allow clients to use the VPN +FOR_CLIENTS=0 +# + +DNS_SERVER="8.8.8.8" + +# Cheap hack to set the DNS server +function setdns() { + while true + do + [[ ! $(grep -q "$DNS_SERVER" /tmp/resolv.conf) ]] && { + echo -e "search lan\nnameserver $DNS_SERVER" > /tmp/resolv.conf + } + sleep 5 + done +} + +function start() { + LED SETUP + DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) + if [ $FOR_CLIENTS = 1 ]; then /usr/bin/NETMODE NAT && /usr/bin/LED G SINGLE; else /usr/bin/NETMODE BRIDGE && /usr/bin/LED Y SINGLE; fi + + + sleep 3 + + # Make OpenVPN use the local configuration + uci set openvpn.vpn.config="${DIR}/config.ovpn" + uci commit + + # Start the OpenVPN server in the background + /etc/init.d/openvpn start + + # Start SSH Server + SSH_START + # Set DNS server + setdns & + + #LED ATTACK +} + +# Start the payload +start & From 296e33fcc23a9909eae1f15549759e534a10e6e4 Mon Sep 17 00:00:00 2001 From: rf-bandit <111388888+rf-bandit@users.noreply.github.com> Date: Mon, 10 Feb 2025 18:02:59 -0700 Subject: [PATCH 4/5] Create payload.sh fixed --- .../remote-access/openvpn-Mkii/payload.sh | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 payloads/remote-access/openvpn-Mkii/payload.sh diff --git a/payloads/remote-access/openvpn-Mkii/payload.sh b/payloads/remote-access/openvpn-Mkii/payload.sh new file mode 100644 index 0000000..ff05a30 --- /dev/null +++ b/payloads/remote-access/openvpn-Mkii/payload.sh @@ -0,0 +1,56 @@ +#!/bin/bash +# +# This payload is modified from a payload for the original Packet Squirrel to work on +# the Packet Squirrel Mark II. +# More info here: https://www.youtube.com/watch?v=OlKztGlt8VA +# +# Title: OpenVPN-Mkii +# Description: Create a connection to a VPN-connection to an OpenVPN-server. Optionally: Send traffic from the clients through said tunnel. +# Author: Hak5, rf_bandit +# Version: 1.1 +# Category: remote-access +# Target: Any +# Net Mode: BRIDGE, NAT + +# Set to 1 to allow clients to use the VPN +FOR_CLIENTS=0 +# + +DNS_SERVER="8.8.8.8" + +# Cheap hack to set the DNS server +function setdns() { + while true + do + [[ ! $(grep -q "$DNS_SERVER" /tmp/resolv.conf) ]] && { + echo -e "search lan\nnameserver $DNS_SERVER" > /tmp/resolv.conf + } + sleep 5 + done +} + +function start() { + LED SETUP + DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) + if [ $FOR_CLIENTS = 1 ]; then /usr/bin/NETMODE NAT && /usr/bin/LED G SINGLE; else /usr/bin/NETMODE BRIDGE && /usr/bin/LED Y SINGLE; fi + + + sleep 3 + + # Make OpenVPN use the local configuration + uci set openvpn.vpn.config="${DIR}/config.ovpn" + uci commit + + # Start the OpenVPN server in the background + /etc/init.d/openvpn start + + # Start SSH Server + SSH_START + # Set DNS server + setdns & + + #LED ATTACK +} + +# Start the payload +start & From c336c22ad554b9ccdab1393ece08a148a50ea0fa Mon Sep 17 00:00:00 2001 From: rf-bandit <111388888+rf-bandit@users.noreply.github.com> Date: Wed, 12 Feb 2025 12:27:44 -0700 Subject: [PATCH 5/5] Delete payloads/ /remote-access/openvpn-Mkii/payload.sh --- .../ /remote-access/openvpn-Mkii/payload.sh | 56 ------------------- 1 file changed, 56 deletions(-) delete mode 100644 payloads/ /remote-access/openvpn-Mkii/payload.sh diff --git a/payloads/ /remote-access/openvpn-Mkii/payload.sh b/payloads/ /remote-access/openvpn-Mkii/payload.sh deleted file mode 100644 index 7af220a..0000000 --- a/payloads/ /remote-access/openvpn-Mkii/payload.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -# -# This payload is modified from a payload for the original Packet Squirrel to work on -# the Packet Squirrel Mark II. -# More info here: https://www.youtube.com/watch?v=OlKztGlt8VA -# -# Title: OpenVPN-Mkii -# Description: Create a connection to a VPN-connection to an OpenVPN-server. Optionally: Send traffic from the clients through said tunnel. -# Author: Hak5, rf_bandit -# Version: 1.1 -# Category: remote-access -# Target: Any -# Net Mode: BRIDGE, NAT - -# Set to 1 to allow clients to use the VPN -FOR_CLIENTS=0 -# - -DNS_SERVER="8.8.8.8" - -# Cheap hack to set the DNS server -function setdns() { - while true - do - [[ ! $(grep -q "$DNS_SERVER" /tmp/resolv.conf) ]] && { - echo -e "search lan\nnameserver $DNS_SERVER" > /tmp/resolv.conf - } - sleep 5 - done -} - -function start() { - LED SETUP - DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) - if [ $FOR_CLIENTS = 1 ]; then /usr/bin/NETMODE NAT && /usr/bin/LED G SINGLE; else /usr/bin/NETMODE BRIDGE && /usr/bin/LED Y SINGLE; fi - - - sleep 3 - - # Make OpenVPN use the local configuration - uci set openvpn.vpn.config="${DIR}/config.ovpn" - uci commit - - # Start the OpenVPN server in the background - /etc/init.d/openvpn start - - # Start SSH Server - SSH_START - # Set DNS server - setdns & - - #LED ATTACK -} - -# Start the payload -start &