Detection rules › Sigma

Curl.EXE Execution With Custom UserAgent

Status
test
Severity
medium
Log source
product windows, category process_creation
Author
frack113
Source
github.com/SigmaHQ/sigma

Detects execution of curl.exe with custom useragent options

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Curl.EXE Execution With Custom UserAgent
id: 3286d37a-00fd-41c2-a624-a672dcd34e60
status: test
description: Detects execution of curl.exe with custom useragent options
references:
    - https://curl.se/docs/manpage.html
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1071.001/T1071.001.md#atomic-test-2---malicious-user-agents---cmd
author: frack113
date: 2022-01-23
modified: 2023-02-21
tags:
    - attack.command-and-control
    - attack.t1071.001
    - detection.threat-hunting
logsource:
    category: process_creation
    product: windows
detection:
    selection_curl:
        - Image|endswith: '\curl.exe'
        - Product: 'The curl executable'
    selection_opt:
        CommandLine|contains:
            - ' -A '
            - ' --user-agent '
    condition: all of selection_*
falsepositives:
    - Scripts created by developers and admins
    - Administrative activity
level: medium

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_curl

selection_curl:
    - Image|endswith: '\curl.exe'
    - Product: 'The curl executable'

Stage 2: selection_opt

selection_opt:
    CommandLine|contains:
        - ' -A '
        - ' --user-agent '

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
  • --user-agent corpus 2 (sigma 2)
  • -A corpus 5 (sigma 5)
Imageends_with
  • \curl.exe corpus 30 (sigma 30)
Producteq
  • The curl executable corpus 5 (sigma 5)