Ngrok Reverse Proxy on Network
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.
- Type: Anomaly
- Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
- Datamodel: Network_Resolution
- Last Updated: 2024-05-24
- Author: Michael Haag, Splunk
- ID: 5790a766-53b8-40d3-a696-3547b978fcf0
Annotations
ATT&CK
Kill Chain Phase
- Command and Control
NIST
- DE.AE
CIS20
- CIS 13
CVE
Search
1
2
3
4
5
6
| 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.src DNS.query DNS.answer
| `drop_dm_object_name("DNS")`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `ngrok_reverse_proxy_on_network_filter`
Macros
The SPL above uses the following Macros:
ngrok_reverse_proxy_on_network_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Required fields
List of fields required to use this analytic.
- DNS.src
- DNS.query
- DNS.answer
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.
Associated Analytic Story
RBA
Risk Score | Impact | Confidence | Message |
---|---|---|---|
50.0 | 50 | 100 | An endpoint, $src$, is beaconing out to the reverse proxy service of Ngrok. |
The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.
Reference
Test Dataset
Replay any dataset to Splunk Enterprise by using our replay.py
tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
source | version: 2