Name:Windows Potential Cloudflared Tunnel Execution id:2e29b58e-0f5a-42fc-b435-0fdce8862831 version:3 date:None author:Raven Tait, Nasreddine Bencherchali, Splunk status:production type:Anomaly Description:This analytic detects Cloudflare Tunnel client execution by its process name or original executable name, including renamed copies, and by command lines that create token-authenticated or Quick Tunnels.
Threat actors have used cloudflared for covert command-and-control and persistent remote access, including renamed binaries and tunnels that expose local services through Cloudflare's edge.
The command-line signatures focus on token-backed `tunnel run`, Quick Tunnel commands that publish a loopback service with `--url`, and config-backed `tunnel --config ... run` commands. Data_source:
-Sysmon EventID 1
-Windows Event Log Security 4688
-CrowdStrike ProcessRollup2
search:| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime
from datamodel=Endpoint.Processes where
Processes.process_name IN ("cloudflared.exe") OR Processes.original_file_name IN ("cloudflared.exe") OR ( Processes.process="*tunnel*" Processes.process IN ("*--token*", "*--url*", "*--config*") )
| eval cloudflared_token_tunnel=if(has_exe_prefix=1 AND is_tunnel_cmd=1 AND has_run=1 AND has_token=1 AND token_tunnel_ordered=1, 1, 0)
| eval cloudflared_quick_tunnel=if(has_exe_prefix=1 AND is_tunnel_cmd=1 AND quick_tunnel_loopback=1 AND quick_tunnel_ordered=1, 1, 0)
| eval cloudflared_config_tunnel=if(has_exe_prefix=1 AND is_tunnel_cmd=1 AND has_run=1 AND has_config=1 AND config_tunnel_ordered=1, 1, 0)
| where process_name IN ("cloudflared.exe") OR original_file_name IN ("cloudflared.exe") OR cloudflared_token_tunnel=1 OR cloudflared_quick_tunnel=1 OR cloudflared_config_tunnel=1