Windows: Detect cloudflared tunnel cleanup command execution

Flags Windows executions of cloudflared with tunnel cleanup and connector/config parameters.

FreeReviewedSigma · Medium · v2
Product
windows
Category
process_creation
Author
Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2023-05-17
Updated
2026-07-31
title: "Windows: Detect cloudflared tunnel cleanup command execution"
id: 7dedfc57-b869-4d45-8399-9f8c1baf2734
status: test
description: This rule matches process executions where the command line includes the cloudflared tunnel cleanup operation and related parameters for configuration and connector identification. Cleanup behavior can indicate attempts to remove or reset tunnel state, which may be used during operational changes, redeployments, or evasive activity. Telemetry relies on Windows process creation events that capture full command-line arguments.
references:
  - https://github.com/cloudflare/cloudflared
  - https://developers.cloudflare.com/cloudflare-one/connections/connect-apps
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_cloudflared_tunnel_cleanup.yml
author: Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2023-05-17
modified: 2023-12-21
tags:
  - attack.command-and-control
  - attack.t1102
  - attack.t1090
  - attack.t1572
logsource:
  category: process_creation
  product: windows
detection:
  selection:
    CommandLine|contains|all:
      - " tunnel "
      - "cleanup "
    CommandLine|contains:
      - "-config "
      - "-connector-id "
  condition: selection
falsepositives:
  - Legitimate usage of Cloudflared.
level: medium
license: DRL-1.1
related:
  - id: 7050bba1-1aed-454e-8f73-3f46f09ce56a
    type: derived