Cloudflare Tunnel is a legitimate service: the lightweight cloudflared agent creates an outbound-only, encrypted tunnel from a host to Cloudflare’s edge, exposing an internal service to the internet without inbound firewall rules or a public IP. TryCloudflare is the free, no-account variant that spins up an ephemeral, randomly named subdomain for a one-time tunnel. Two distinct abuse patterns are documented: ephemeral TryCloudflare tunnels for commodity malware delivery and C2 staging (Proofpoint, delivering AsyncRAT and XWorm), and named or persistent tunnels on compromised hosts for stealthy, resilient remote access and data theft (GuidePoint). Both exploit that the tunnel is outbound-only, TLS-encrypted and terminates on trusted Cloudflare infrastructure.
Pattern A: TryCloudflare Delivery
Proofpoint reported a financially motivated cluster, first observed in February 2024, abusing ephemeral TryCloudflare tunnels to deliver malware. The chain runs from a phishing email to a URL or internet-shortcut file, to a WebDAV share behind a TryCloudflare-proxied endpoint, to an LNK or VBS, to a command script, to PowerShell that downloads the final payload — families across waves include AsyncRAT, XWorm, VenomRAT, GuLoader, Remcos and PureLogs. The ephemeral tunnel needs no account and leaves a random *.trycloudflare.com hostname, defeating static domain blocklists. T1566.002 T1204.001 T1102
Pattern B: Persistent Named Tunnels
- Threat actors run
cloudflaredon compromised hosts for persistent, stealthy access and exfiltration; starting a named tunnel can require only a token on the command line, leaving little config on disk. T1572 T1090.002 - Persistence via scheduled task, Run key or a system service to relaunch the agent. T1053.005 T1543.003
- Masquerading: Medusa ransomware renamed
cloudflared.exetosvchost.exe, and BlackSuit operators used names likeWGUpdater.exe— so filename alone is not a reliable signal. T1036.005
Transport
cloudflared connects outbound to Cloudflare’s edge over QUIC (UDP 7844), falling back to HTTP/2 over TCP 7844 if UDP is blocked. Cloudflare’s own connectivity-test host is region1.v2.argotunnel.com; seeing that host and port alone is not malicious — context is everything.
MITRE ATT&CK Mapping
cloudflared is a legitimate signed binary; this is dual-use abuse, mapped analyst-side.
| Tactic | Technique | Usage |
|---|---|---|
| Command and Control | T1572 Protocol Tunneling | Core technique |
| Command and Control | T1090.002 External Proxy | Routing through Cloudflare edge |
| Command and Control | T1102 Web Service | trycloudflare.com staging |
| Defense Evasion | T1036.005 Match Legitimate Name | Renaming cloudflared.exe |
| Persistence | T1543.003 Windows Service | Auto-start tunnel |
| Initial Access | T1566.002 Spearphishing Link | Delivery chain |
Detection & Mitigation
- Inventory and allowlist
cloudflared; alert on any install or execution outside approved hosts, especially from user-writable paths, and detect masquerading by signature rather than filename. - Monitor and, where feasible, restrict outbound port 7844 (UDP and TCP) from hosts that should not tunnel; hunt for
*.trycloudflare.comin DNS and proxy logs. - At the mail gateway, block and inspect
.URL,.LNKand.vbsattachments and WebDAV retrievals, and disable the WebClient service where WebDAV is not required to break the shortcut-to-WebDAV step. Deploy published Sigma and Elastic detection rules for cloudflared tunnel execution.
Detect Tunneled C2 and Exfiltration
Mjolnir Security helps organisations detect abuse of legitimate tunneling services for C2 and data theft.
- Managed Detection and Response Monitoring for unauthorized cloudflared execution, port 7844 egress and trycloudflare.com staging.
- Threat Hunting as a Service Hunting for masqueraded tunnel binaries and shortcut-to-WebDAV delivery chains.
- 24/7 Incident Response Containment when tunneled access or exfiltration is detected. Call +1 833 403 5875.
Stay ahead of emerging threats. Get notified when we publish new intelligence reports and advisories.
Subscribe to Alerts