Start TCP Redirector via API

Description

Creates a TCP listener in the current process that proxies any connections to the local port to the remote IP and port.

Overview

This script creates a TCP redirector on the specified LHost and LPort and waits for new connections. For each new connection, the redirector will establish a new TCP connection to the specified RHost and RPort. It will the redirect traffic to and from both the incomning and outgoing connections to each other, essentially creating a proxy.

Arguments

Parameter Type Description
LHost string The listening interface IP on the current system.
LPort int The listening port on the current system.
RHost string The destination host to proxy connections to.
RPort int The destination port to proxy connections to.

Dependencies

  • lateral

Limitations

  • The Windows Firewall will prevent connections to the localhost that are below port 5000.

Example Text Output

Example of successful redirector setup.

LocalHost LocalPort RemoteHost    RemotePort IsRunning
--------- --------- ----------    ---------- ---------
0.0.0.0        5000 192.168.1.103       3389      True
Scroll to Top