Detection rules › Sigma

Cloudflared Tunnel Execution

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

Detects execution of the "cloudflared" tool to connect back to a tunnel. This was seen used by threat actors to maintain persistence and remote access to compromised networks.

MITRE ATT&CK coverage

TacticTechniques
Command & ControlT1090 Proxy, T1102 Web Service, T1572 Protocol Tunneling

Event coverage

Rule body yaml

title: Cloudflared Tunnel Execution
id: 9a019ffc-3580-4c9d-8d87-079f7e8d3fd4
status: test
description: Detects execution of the "cloudflared" tool to connect back to a tunnel. This was seen used by threat actors to maintain persistence and remote access to compromised networks.
references:
    - https://blog.reconinfosec.com/emergence-of-akira-ransomware-group
    - https://github.com/cloudflare/cloudflared
    - https://developers.cloudflare.com/cloudflare-one/connections/connect-apps
author: Janantha Marasinghe, Nasreddine Bencherchali (Nextron Systems)
date: 2023-05-17
modified: 2023-12-20
tags:
    - attack.command-and-control
    - attack.t1102
    - attack.t1090
    - attack.t1572
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        CommandLine|contains|all:
            - ' tunnel '
            - ' run '
        CommandLine|contains:
            - '-config '
            - '-credentials-contents '
            - '-credentials-file '
            - '-token '
    condition: selection
falsepositives:
    - Legitimate usage of Cloudflared tunnel.
level: medium

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    CommandLine|contains|all:
        - ' tunnel '
        - ' run '
    CommandLine|contains:
        - '-config '
        - '-credentials-contents '
        - '-credentials-file '
        - '-token '

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
CommandLinematch
  • run corpus 2 (sigma 2)
  • tunnel corpus 3 (sigma 3)
  • -config corpus 3 (sigma 3)
  • -credentials-contents corpus 2 (sigma 2)
  • -credentials-file corpus 2 (sigma 2)
  • -token corpus 2 (sigma 2)