Detection rules › Kusto

Execution of software vulnerable to webp buffer overflow of CVE-2023-4863

Status
available
Severity
informational
Time window
1h
Source
github.com/Azure/Azure-Sentinel

This query looks at device, process, and network events from Defender for Endpoint that may be vulnerable to buffer overflow defined in CVE-2023-4863. Results are not an indicator of malicious activity.

MITRE ATT&CK coverage

Event coverage

Rule body kusto

id: 26e81021-2de6-4442-a74a-a77885e96911
name: Execution of software vulnerable to webp buffer overflow of CVE-2023-4863
description: |
    'This query looks at device, process, and network events from Defender for Endpoint that may be vulnerable to buffer overflow defined in CVE-2023-4863. Results are not an indicator of malicious activity.'
severity: Informational
status: Available
kind: Scheduled
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
  - Execution
relevantTechniques:
  - T1203
tags:
  - CVE-2023-4863
requiredDataConnectors:
  - connectorId: MicrosoftThreatProtection
    dataTypes:
      - DeviceProcessEvents
      - DeviceNetworkEvents
      - DeviceEvents
      - DeviceTvmSoftwareVulnerabilities
query: |-
  //CVE-2023-4863 Process activity with .webp files on devices where CVE-2023-4863 is unpatched
  //This query shows all process activity with .webp files on vulnerable machines and is not an indicator of malicious activity
  let VulnDevices = DeviceTvmSoftwareVulnerabilities
      | where CveId == "CVE-2023-4863"
      | distinct DeviceId;
  union DeviceProcessEvents, DeviceNetworkEvents, DeviceEvents
  | where DeviceId in (VulnDevices) and (InitiatingProcessCommandLine has(".webp") or ProcessCommandLine has(".webp"))
  | extend Name = tostring(split(AccountUpn, "@")[0]), UPNSuffix = tostring(split(AccountUpn, "@")[1])
  | extend HostName = tostring(split(DeviceName, ".")[0]), DomainIndex = toint(indexof(DeviceName, '.'))
  | extend HostNameDomain = iff(DomainIndex != -1, substring(DeviceName, DomainIndex + 1), DeviceName)
entityMappings:
- entityType: Host
  fieldMappings:
    - identifier: FullName
      columnName: DeviceName
    - identifier: HostName
      columnName: HostName
    - identifier: DnsDomain
      columnName: HostNameDomain
- entityType: Account
  fieldMappings:
    - identifier: FullName
      columnName: AccountUpn
    - identifier: Name
      columnName: Name
    - identifier: UPNSuffix
      columnName: UPNSuffix
- entityType: IP
  fieldMappings:
    - identifier: Address
      columnName: LocalIP
- entityType: Process
  fieldMappings:
    - identifier: ProcessId
      columnName: ProcessId
- entityType: Process
  fieldMappings:
    - identifier: ProcessId
      columnName: InitiatingProcessId
- entityType: Process
  fieldMappings:
    - identifier: CommandLine
      columnName: ProcessCommandLine
suppressionEnabled: false
incidentConfiguration:
  createIncident: false
  groupingConfiguration:
    enabled: false
    reopenClosedIncident: false
    lookbackDuration: PT5H
    matchingMethod: Selected
    groupByEntities:
    - Account
    groupByAlertDetails: []
    groupByCustomDetails: []
suppressionDuration: PT5H
alertDetailsOverride:
  alertDisplayNameFormat: Possible exploitation of CVE-2023-4863
  alertDynamicProperties: []
eventGroupingSettings:
  aggregationKind: SingleAlert
version: 1.1.2

Stages and Predicates

Let binding: VulnDevices

let VulnDevices = DeviceTvmSoftwareVulnerabilities
    | where CveId == "CVE-2023-4863"
    | distinct DeviceId;

union (3 sources)

Each leg below queries one source; the rule matches if any leg does. Sources: DeviceProcessEvents, DeviceNetworkEvents, DeviceEvents

Leg 1: DeviceProcessEvents

Leg 2: DeviceNetworkEvents

Leg 3: DeviceEvents

Applied to the combined result

| where DeviceId in (VulnDevices) and (InitiatingProcessCommandLine has(".webp") or ProcessCommandLine has(".webp")) | extend Name = tostring(split(AccountUpn, "@")[0]), UPNSuffix = tostring(split(AccountUpn, "@")[1]) | extend HostName = tostring(split(DeviceName, ".")[0]), DomainIndex = toint(indexof(DeviceName, '.')) | extend HostNameDomain = iff(DomainIndex != -1, substring(DeviceName, DomainIndex + 1), DeviceName)

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
DeviceIdin
  • VulnDevices transforms: cased
InitiatingProcessCommandLinematch
  • .webp transforms: term
ProcessCommandLinematch
  • .webp transforms: term corpus 2 (sigma 1, kusto 1)

Output fields

Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.

FieldSource
Nameextend
UPNSuffixextend
DomainIndexextend
HostNameextend
HostNameDomainextend