On the Attacker Linux VM, create an SSH tunnel to Redirector-1:

ubuntu@teamserver ~> ssh -N -R 8443:localhost:443 -i ssh-user ssh-user@10.10.5.39

Where:

-   `-N` stops the session from dropping in to a shell.
-   `-R` is _remote-port:host:host-port_.  This will bind port 8443 on the target (the redirector) and any traffic hitting that port will be redirected to 127.0.0.1:443 of the Team Server VM.  The Cobalt Strike listener binds to all interfaces (0.0.0.0), so this will cause the traffic to hit the listener.
-   `-i` is the private SSH key for the _ssh-user_ account.

  

The command will just appear to freeze the terminal, there is no output (apart from any errors).  You can press `Ctrl + C` any time to close the session.

Now if you list the listening ports on Redirector-1, you'll see port 8443 bound by the SSH daemon:

ubuntu@redirector-1 ~> sudo ss -ltnp
State         Recv-Q        Send-Q               Local Address:Port               Peer Address:Port       Process
LISTEN        0             128                      127.0.0.1:8443                    0.0.0.0:*           users:(("sshd",pid=16799,fd=11))

  

You can now `curl localhost:8443` on Redirector-1 and it will hit the Cobalt Strike listener.

ubuntu@redirector-1 ~> curl -v -k https://localhost:8443
*   Trying 127.0.0.1:8443...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: C=UK; ST=London; O=ACME Corp; CN=acmecorp.uk
*  start date: May 26 11:26:09 2022 GMT
*  expire date: May 26 11:26:09 2023 GMT
*  issuer: C=UK; ST=London; O=ACME Corp; CN=acmecorp.uk
*  SSL certificate verify result: self signed certificate (18), continuing anyway.
> GET / HTTP/1.1
> Host: localhost:8443
> User-Agent: curl/7.68.0
> Accept: */*
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< Date: Thu, 26 May 2022 15:08:24 GMT
< Content-Type: text/plain
< Content-Length: 0
<
* Connection #0 to host localhost left intact

  

We'll see the request hit the CS web log.

05/26 15:08:24 visit (port 443) from: 127.0.0.1
	Request: GET /
	Response: 404 Not Found
	curl/7.68.0

  

You can also verify that you're unable to hit the listener when using Team Server IP directly.

ubuntu@redirector-1 ~> curl -v -k https://10.10.0.69
*   Trying 10.10.0.69:443...
* TCP_NODELAY set
* connect to 10.10.0.69 port 443 failed: Connection timed out
* Failed to connect to 10.10.0.69 port 443: Connection timed out
* Closing connection 0
curl: (28) Failed to connect to 10.10.0.69 port 443: Connection timed out

  

You now have a working reverse port forward over an SSH tunnel.