Detection rules › Sigma

Communication To Ngrok Tunneling Service Initiated

Status
test
Severity
high
Log source
product windows, category network_connection
Author
Florian Roth (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects an executable initiating a network connection to "ngrok" tunneling domains. Attackers were seen using this "ngrok" in order to store their second stage payloads and malware. While communication with such domains can be legitimate, often times is a sign of either data exfiltration by malicious actors or additional download.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 3Network connection

Rule body yaml

title: Communication To Ngrok Tunneling Service Initiated
id: 1d08ac94-400d-4469-a82f-daee9a908849
related:
    - id: 18249279-932f-45e2-b37a-8925f2597670
      type: similar
status: test
description: |
    Detects an executable initiating a network connection to "ngrok" tunneling domains.
    Attackers were seen using this "ngrok" in order to store their second stage payloads and malware.
    While communication with such domains can be legitimate, often times is a sign of either data exfiltration by malicious actors or additional download.
references:
    - https://twitter.com/hakluke/status/1587733971814977537/photo/1
    - https://ngrok.com/docs/secure-tunnels/tunnels/ssh-reverse-tunnel-agent
author: Florian Roth (Nextron Systems)
date: 2022-11-03
modified: 2024-02-02
tags:
    - attack.exfiltration
    - attack.command-and-control
    - attack.t1567
    - attack.t1568.002
    - attack.t1572
    - attack.t1090
    - attack.t1102
    - attack.s0508
logsource:
    category: network_connection
    product: windows
detection:
    selection:
        DestinationHostname|contains:
            - 'tunnel.us.ngrok.com'
            - 'tunnel.eu.ngrok.com'
            - 'tunnel.ap.ngrok.com'
            - 'tunnel.au.ngrok.com'
            - 'tunnel.sa.ngrok.com'
            - 'tunnel.jp.ngrok.com'
            - 'tunnel.in.ngrok.com'
    condition: selection
falsepositives:
    - Legitimate use of the ngrok service.
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    DestinationHostname|contains:
        - 'tunnel.us.ngrok.com'
        - 'tunnel.eu.ngrok.com'
        - 'tunnel.ap.ngrok.com'
        - 'tunnel.au.ngrok.com'
        - 'tunnel.sa.ngrok.com'
        - 'tunnel.jp.ngrok.com'
        - 'tunnel.in.ngrok.com'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
DestinationHostnamematch
  • tunnel.ap.ngrok.com corpus 2 (sigma 2)
  • tunnel.au.ngrok.com corpus 2 (sigma 2)
  • tunnel.eu.ngrok.com corpus 2 (sigma 2)
  • tunnel.in.ngrok.com corpus 2 (sigma 2)
  • tunnel.jp.ngrok.com corpus 2 (sigma 2)
  • tunnel.sa.ngrok.com corpus 2 (sigma 2)
  • tunnel.us.ngrok.com corpus 2 (sigma 2)