-
-
Notifications
You must be signed in to change notification settings - Fork 252
Agent Side Proxy and Port Mapping
jm33-m0 edited this page Oct 22, 2024
·
5 revisions
You can launch a SOCKS5 proxy server on the agent side with randomly generated username and password, then map its port back to the Control Center (CC). Suppose your CC can be reached via the IP address 1.2.3.4
, the resulting proxy configuration URL would be:
socks5://username:password@1.2.3.4:port
You can then use this proxy to access network resources on the agent side.
- Type
use run_proxy
. - Set the
port
you want (e.g.,8080
). - Type
run
. The agent will send back the generated username and password. - Now, you can use the proxy with the URL format:
socks5://username:password@1.2.3.4:8080
.
If DNS over HTTPS (DoH) is enabled, the SOCKS5 server on the agent side will use it to resolve domain names.
To map a port from the agent side to the C2 side:
- Type
use port_fwd
. - Set the protocol to
tcp
orudp
(Note:udp
is currently not supported for reverse port mapping). - Set the destination address in the format
ip:port
. - Specify a port that emp3r0r listens to on the localhost.
To reverse the direction of port mapping (from C2 to agent):
- Type
set switch reverse
to change the direction. - Configure other necessary options as required.