Detection rules › Splunk

Ngrok Reverse Proxy on Network

Status
production
Severity
low
Group by
DNS.answer_count, DNS.query_count, DNS.vendor_product, QueryName, dns.answers.name, dns.response.code, src_ip
Author
Michael Haag, Splunk
Source
github.com/splunk/security_content

The following analytic detects DNS queries to common Ngrok domains, indicating potential use of the Ngrok reverse proxy tool. It leverages the Network Resolution datamodel to identify queries to domains such as ".ngrok.com" and ".ngrok.io". While Ngrok usage is not inherently malicious, it has been increasingly adopted by adversaries for covert communication and data exfiltration. If confirmed malicious, this activity could allow attackers to bypass network defenses, establish persistent connections, and exfiltrate sensitive data, posing a significant threat to the network's security.

Known false positives

  • False positives will be present based on organizations that allow the use of Ngrok. Filter or monitor as needed.

MITRE ATT&CK coverage

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 22: DNSEvent (DNS query)

Rule body

name: Ngrok Reverse Proxy on Network
id: 5790a766-53b8-40d3-a696-3547b978fcf0
version: 10
creation_date: '2022-11-16'
modification_date: '2026-05-13'
author: Michael Haag, Splunk
status: production
type: Anomaly
description: The following analytic detects DNS queries to common Ngrok domains, indicating potential use of the Ngrok reverse proxy tool. It leverages the Network Resolution datamodel to identify queries to domains such as "*.ngrok.com" and "*.ngrok.io". While Ngrok usage is not inherently malicious, it has been increasingly adopted by adversaries for covert communication and data exfiltration. If confirmed malicious, this activity could allow attackers to bypass network defenses, establish persistent connections, and exfiltrate sensitive data, posing a significant threat to the network's security.
data_source:
    - Sysmon EventID 22
search: |-
    | tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Network_Resolution
      WHERE DNS.query IN ("*.ngrok.com","*.ngrok.io", "ngrok.*.tunnel.com", "korgn.*.lennut.com")
      BY DNS.answer DNS.answer_count DNS.query
         DNS.query_count DNS.reply_code_id DNS.src
         DNS.vendor_product
    | `drop_dm_object_name("DNS")`
    | `security_content_ctime(firstTime)`
    | `security_content_ctime(lastTime)`
    | `ngrok_reverse_proxy_on_network_filter`
how_to_implement: The Network Resolution Datamodel will need to have data mapped to it regarding DNS queries. Modify query as needed to use another source.
known_false_positives: False positives will be present based on organizations that allow the use of Ngrok. Filter or monitor as needed.
references:
    - https://www.cisa.gov/uscert/sites/default/files/publications/aa22-320a_joint_csa_iranian_government-sponsored_apt_actors_compromise_federal%20network_deploy_crypto%20miner_credential_harvester.pdf
intermediate_findings:
    entities:
        - field: src
          type: system
          score: 20
          message: An endpoint, $src$, is beaconing out to the reverse proxy service of Ngrok.
analytic_story:
    - Reverse Network Proxy
    - CISA AA22-320A
    - CISA AA24-241A
asset_type: Endpoint
mitre_attack_id:
    - T1572
    - T1090
    - T1102
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: network
security_domain: network

Stages and Predicates

Stage 1: tstats

| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Network_Resolution
  WHERE DNS.query IN ("*.ngrok.com","*.ngrok.io", "ngrok.*.tunnel.com", "korgn.*.lennut.com")
  BY DNS.answer DNS.answer_count DNS.query
     DNS.query_count DNS.reply_code_id DNS.src
     DNS.vendor_product

Stage 2: search

| `drop_dm_object_name("DNS")`

Stage 3: search

| `security_content_ctime(firstTime)`

Stage 4: search

| `security_content_ctime(lastTime)`

Stage 5: search

| `ngrok_reverse_proxy_on_network_filter`

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
DNS.queryin
  • "*.ngrok.com"
  • "*.ngrok.io"
  • "korgn.*.lennut.com"
  • "ngrok.*.tunnel.com"
field:"QueryName" kind:in