Detection rules › Sigma

Cloudflared Portable Execution

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

Detects the execution of the "cloudflared" binary from a non standard location.

Known false positives

  • Legitimate usage of Cloudflared portable versions

MITRE ATT&CK coverage

TacticTechniques
Command & Control

Telemetry coverage

Rule body

title: Cloudflared Portable Execution
id: fadb84f0-4e84-4f6d-a1ce-9ef2bffb6ccd
status: test
description: |
    Detects the execution of the "cloudflared" binary from a non standard location.
references:
    - https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/do-more-with-tunnels/trycloudflare/
    - https://github.com/cloudflare/cloudflared
    - https://www.intrinsec.com/akira_ransomware/
    - https://www.guidepointsecurity.com/blog/tunnel-vision-cloudflared-abused-in-the-wild/
    - https://github.com/cloudflare/cloudflared/releases
author: Nasreddine Bencherchali (Nextron Systems)
tags:
    - attack.command-and-control
    - attack.t1090.001
date: 2023-12-20
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|endswith: '\cloudflared.exe'
    filter_main_admin_location:
        Image|contains:
            - ':\Program Files (x86)\cloudflared\'
            - ':\Program Files\cloudflared\'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Legitimate usage of Cloudflared portable versions
level: medium

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_*

Stage 1: selection

selection:
    Image|endswith: '\cloudflared.exe'

Stage 2: not filter_main_admin_location

filter_main_admin_location:
    Image|contains:
        - ':\Program Files (x86)\cloudflared\'
        - ':\Program Files\cloudflared\'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
Imagematch:\Program Files (x86)\cloudflared\excludes:Image field:"Image" value:":\Program Files (x86)\cloudflared\"
Imagematch:\Program Files\cloudflared\excludes:Image field:"Image" value:":\Program Files\cloudflared\"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Imageends_with
  • \cloudflared.exe corpus 2 (sigma 2)
field:"Image" kind:ends_with value:"\cloudflared.exe"