Secure Socket Funneling (SSF)

Outil réseau fournissant du port forwarding, un proxy SOCKS dynamique, et des shells distants, le tout multiplexé sur une seule connexion TCP/TLS chiffrée. Network tool providing port forwarding, dynamic SOCKS proxying, and remote shells, all multiplexed over a single encrypted TCP/TLS connection.

↗ https://github.com/securesocketfunneling/ssf

Overview

SSF (Secure Socket Funneling) is a cross-platform pivoting tool that bundles local/remote port forwarding, a dynamic SOCKS proxy, and shell execution into a single multiplexed, TLS-encrypted TCP connection between a client and server binary. It’s a useful alternative to chaining multiple SSH tunnels when SSH isn’t available on a pivot host, or when you want everything (proxy + forwards + shell) running over one connection instead of several.

Common Usage

On the pivot/relay host — start the server, listening for the client connection

ssfd -p 8011

On the attacker host — connect out and open a dynamic SOCKS5 proxy on 1080

ssf -D 1080 <pivot_host>:8011

Local port forward: reach an internal RDP server through the pivot

ssf -L 3389:10.10.20.5:3389 <pivot_host>:8011

Remote port forward: expose a local listener to the internal network

ssf -R 4444:127.0.0.1:4444 <pivot_host>:8011

Combine SOCKS proxy and a forward in one session

ssf -D 1080 -L 8080:10.10.20.5:80 <pivot_host>:8011
# /etc/proxychains4.conf — route tools through the SOCKS proxy above
[ProxyList]
socks5  127.0.0.1  1080

Tips

  • SSF uses a JSON config file (ssf.json/ssfd.json) for more complex setups (multiple forwards, TLS cert pinning) instead of stacking CLI flags
  • Traffic is TLS-encrypted end to end, which helps it blend in on networks doing basic protocol inspection compared to plaintext SOCKS
  • Great for engagements where only a single outbound TCP port is usable from a compromised host
Help / Man page
Server: ssfd [options] [-p port]
Client: ssf [options] <host>:<port>

Options:
  -p, --port PORT          server listening port (server only)
  -D, --socks PORT          start a dynamic SOCKS5 proxy on local PORT
  -L, --local L_PORT:HOST:R_PORT   local port forward
  -R, --remote R_PORT:HOST:L_PORT  remote port forward
  -c, --config FILE         use a JSON config file instead of CLI flags
  -x, --shell                 spawn a remote shell over the connection
  -v, --verbose               verbose logging

Vue d’ensemble

SSF (Secure Socket Funneling) est un outil de pivoting multiplateforme qui regroupe le port forwarding local/distant, un proxy SOCKS dynamique et l’exécution de shell dans une seule connexion TCP multiplexée et chiffrée en TLS entre un client et un binaire serveur. C’est une alternative utile au chaînage de plusieurs tunnels SSH quand SSH n’est pas disponible sur un hôte de pivot, ou quand on souhaite faire tourner tout (proxy + forwards + shell) sur une seule connexion plutôt que plusieurs.

Utilisation courante

# Sur l'hôte pivot/relais : démarrer le serveur, en attente de la connexion du client
ssfd -p 8011

# Sur l'hôte attaquant : se connecter et ouvrir un proxy SOCKS5 dynamique sur 1080
ssf -D 1080 <pivot_host>:8011

# Port forward local : atteindre un serveur RDP interne via le pivot
ssf -L 3389:10.10.20.5:3389 <pivot_host>:8011

# Port forward distant : exposer un listener local au réseau interne
ssf -R 4444:127.0.0.1:4444 <pivot_host>:8011

# Combiner proxy SOCKS et un forward dans une même session
ssf -D 1080 -L 8080:10.10.20.5:80 <pivot_host>:8011
# /etc/proxychains4.conf : router les outils à travers le proxy SOCKS ci-dessus
[ProxyList]
socks5  127.0.0.1  1080

Conseils

  • SSF utilise un fichier de config JSON (ssf.json/ssfd.json) pour les configurations plus complexes (forwards multiples, pinning de certificat TLS) plutôt que d’empiler des flags CLI
  • Le trafic est chiffré en TLS de bout en bout, ce qui aide à se fondre dans le trafic sur des réseaux effectuant une inspection protocolaire basique, comparé au SOCKS en clair
  • Idéal pour les missions où un seul port TCP sortant est utilisable depuis un hôte compromis
Aide / Page de manuel
Server: ssfd [options] [-p port]
Client: ssf [options] <host>:<port>

Options:
  -p, --port PORT          server listening port (server only)
  -D, --socks PORT          start a dynamic SOCKS5 proxy on local PORT
  -L, --local L_PORT:HOST:R_PORT   local port forward
  -R, --remote R_PORT:HOST:L_PORT  remote port forward
  -c, --config FILE         use a JSON config file instead of CLI flags
  -x, --shell                 spawn a remote shell over the connection
  -v, --verbose               verbose logging