Skip to content

Latest commit

 

History

History
129 lines (72 loc) · 4.26 KB

T1090.001.md

File metadata and controls

129 lines (72 loc) · 4.26 KB

T1090.001 - Internal Proxy

Adversaries may use an internal proxy to direct command and control traffic between two or more systems in a compromised environment. Many tools exist that enable traffic redirection through proxies or port redirection, including [HTRAN](https://attack.mitre.org/software/S0040), ZXProxy, and ZXPortMap. (Citation: Trend Micro APT Attack Tools) Adversaries use internal proxies to manage command and control communications inside a compromised environment, to reduce the number of simultaneous outbound network connections, to provide resiliency in the face of connection loss, or to ride over existing trusted communications paths between infected systems to avoid suspicion. Internal proxy connections may use common peer-to-peer (p2p) networking protocols, such as SMB, to better blend in with the environment.

By using a compromised internal system as a proxy, adversaries may conceal the true destination of C2 traffic while reducing the need for numerous connections to external systems.

Atomic Tests


Atomic Test #1 - Connection Proxy

Enable traffic redirection.

Note that this test may conflict with pre-existing system configuration.

Supported Platforms: macOS, Linux

Inputs:

Name Description Type Default Value
proxy_server Proxy server URL (host:port) url 127.0.0.1:8080
proxy_scheme Protocol to proxy (http or https) string http

Attack Commands: Run with sh!

export #{proxy_scheme}_proxy=#{proxy_server}

Cleanup Commands:

unset http_proxy
unset https_proxy


Atomic Test #2 - Connection Proxy for macOS UI

Enable traffic redirection on macOS UI (not terminal). The test will modify and enable the "Web Proxy" and "Secure Web Proxy" settings in System Preferences => Network => Advanced => Proxies for the specified network interface.

Note that this test may conflict with pre-existing system configuration.

Supported Platforms: macOS

Inputs:

Name Description Type Default Value
proxy_server Proxy server URL (host) string 127.0.0.1
proxy_port Proxy server port string 8080
interface Protocol to proxy (http or https) string Wi-Fi

Attack Commands: Run with sh!

networksetup -setwebproxy #{interface} #{proxy_server} #{proxy_port}
networksetup -setsecurewebproxy #{interface} #{proxy_server} #{proxy_port}

Cleanup Commands:

networksetup -setwebproxystate #{interface} off
networksetup -setsecurewebproxystate #{interface} off


Atomic Test #3 - portproxy reg key

Adds a registry key to set up a proxy on the endpoint at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PortProxy\v4tov4 Upon execution there will be a new proxy entry in netsh netsh interface portproxy show all

Supported Platforms: Windows

Inputs:

Name Description Type Default Value
connectaddress Specifies the IPv4 address to which to connect. Acceptable values are IP address, computer NetBIOS name, or computer DNS name. If an address is not specified, the default is the local computer. string 127.0.0.1
connectport Specifies the IPv4 port, by port number or service name, to which to connect. If connectport is not specified, the default is the value of listenport on the local computer. string 1337
listenport Specifies the IPv4 port, by port number or service name, on which to listen. string 1337

Attack Commands: Run with powershell! Elevation Required (e.g. root or admin)

netsh interface portproxy add v4tov4 listenport=#{listenport} connectport=#{connectport} connectaddress=#{connectaddress}

Cleanup Commands:

netsh interface portproxy delete v4tov4 listenport=#{listenport} -ErrorAction Ignore | Out-Null