Detection rules › Sigma

Cloudflared Tunnels Related DNS Requests

Status
test
Severity
medium
Log source
category dns_query, product windows
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects DNS requests to Cloudflared tunnels domains. Attackers can abuse that feature to establish a reverse shell or persistence on a machine.

Known false positives

  • Legitimate use of cloudflare tunnels will also trigger this.

MITRE ATT&CK coverage

Telemetry coverage

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

Rule body

title: Cloudflared Tunnels Related DNS Requests
id: a1d9eec5-33b2-4177-8d24-27fe754d0812
related:
    - id: 7cd1dcdc-6edf-4896-86dc-d1f19ad64903
      type: similar
status: test
description: |
    Detects DNS requests to Cloudflared tunnels domains.
    Attackers can abuse that feature to establish a reverse shell or persistence on a machine.
references:
    - https://www.guidepointsecurity.com/blog/tunnel-vision-cloudflared-abused-in-the-wild/
    - Internal Research
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-12-20
tags:
    - attack.command-and-control
    - attack.t1071.001
    - attack.t1572
logsource:
    category: dns_query
    product: windows
detection:
    selection:
        QueryName|endswith:
            - '.v2.argotunnel.com'
            - 'protocol-v2.argotunnel.com'
            - 'trycloudflare.com'
            - 'update.argotunnel.com'
    condition: selection
falsepositives:
    - Legitimate use of cloudflare tunnels will also trigger this.
level: medium

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    QueryName|endswith:
        - '.v2.argotunnel.com'
        - 'protocol-v2.argotunnel.com'
        - 'trycloudflare.com'
        - 'update.argotunnel.com'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
QueryNameends_with
  • .v2.argotunnel.com
  • protocol-v2.argotunnel.com
  • trycloudflare.com
  • update.argotunnel.com
field:"QueryName" kind:ends_with