Sshuttle
Last updated
Was this helpful?
Last updated
Was this helpful?
sshuttle
is a tool that creates a VPN-like tunnel over SSH. It transparently routes traffic to specified subnets through an SSH connection. It requires root
privileges on the client (attacker) machine and Python 3 on the SSH server (pivot host).
Particularly useful when classic dynamic port forwarding is cumbersome to manage.
recap:
Got a reverse shell on CONFLUENCE01
(192.168.125.63
) via CVE-2022-26134.
We can SSH to PGDATABASE01
(10.4.125.215
) from CONFLUENCE01
.
Our goal is to access the following internal networks: 10.4.125.0/24
and 172.16.125.0/24
.
We can set up a port forward on CONFLUENCE01
, forwarding local port 2222
to PGDATABASE01:22
using socat
. This makes PGDATABASE01
’s SSH service available on CONFLUENCE01:2222
.