Name:Ngrok Reverse Proxy Usage id:6cc718a3-57ed-40e2-aa5d-5b329fa148aa version:1 date:None author:Michael Haag, Nasreddine Bencherchali, Splunk status:production type:Anomaly Description:This analytic detects ngrok execution on Linux and Windows by process name, regardless of command line, and detects renamed ngrok binaries through combinations of ngrok-specific command-line behavior.
The command-line logic correlates authentication setup with TCP tunneling to RDP or SMB ports, identifies configured all-tunnel startup patterns, and recognizes the Invoke-Ngrok wrapper.
Threat actors have used ngrok to expose internal services, maintain persistence, move laterally, and proxy command-and-control traffic.
Review the collected commands, parent process, user, endpoint, and approved tunnel configuration to determine whether the use is authorized. Data_source:
-CrowdStrike ProcessRollup2
-Sysmon EventID 1
-Sysmon for Linux EventID 1
-Windows Event Log Security 4688
search:| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime values(Processes.action) as action values(Processes.original_file_name) as original_file_name values(Processes.parent_process) as parent_process values(Processes.parent_process_exec) as parent_process_exec values(Processes.parent_process_guid) as parent_process_guid values(Processes.parent_process_id) as parent_process_id values(Processes.parent_process_name) as parent_process_name values(Processes.parent_process_path) as parent_process_path values(Processes.process) as process values(Processes.process_exec) as process_exec values(Processes.process_guid) as process_guid values(Processes.process_hash) as process_hash values(Processes.process_id) as process_id values(Processes.process_integrity_level) as process_integrity_level values(Processes.process_name) as process_name values(Processes.process_path) as process_path values(Processes.user_id) as user_id values(Processes.vendor_product) as vendor_product FROM datamodel=Endpoint.Processes WHERE ( Processes.process_name IN ("ngrok", "ngrok.exe") OR Processes.original_file_name IN ("ngrok", "ngrok.exe") OR Processes.process IN ( "*-authtoken*", "*-config*-region*", "*-hostname*-region*", "*-protocol*tcp*", "*-region*-config*", "*-region*-hostname*", "*-region*-subdomain*", "*-subdomain*-region*", "*config add-authtoken*", "*fileserver*", "*Invoke-Ngrok*", "*start*--all*", "*tcp *" ) )
| where has_ngrok_process_name = 1 OR has_ngrok_original_file_name = 1 OR has_start_all = 1 OR (has_auth_setup = 1 AND has_tcp_tunnel = 1 AND has_sensitive_port = 1) OR (has_config = 1 AND has_region = 1 AND has_tunnel_command = 1) OR (has_region = 1 AND has_tunnel_command = 1 AND has_endpoint_option = 1) OR (has_invoke_ngrok = 1 AND has_fileserver = 1) OR (has_fileserver = 1 AND has_auth_setup = 1)