Detection rules › Kusto

Network endpoint to host executable correlation

Status
available
Severity
medium
Time window
1d
Group by
shortFileName, suspectExeName
Source
github.com/Azure/Azure-Sentinel

'Correlates blocked URLs hosting [malicious] executables with host endpoint data to identify potential instances of executables of the same name having been recently run.

MITRE ATT&CK coverage

TacticTechniques
ExecutionT1204 User Execution

Event coverage

Rule body kusto

id: 01f64465-b1ef-41ea-a7f5-31553a11ad43
name: Network endpoint to host executable correlation
description: |
  'Correlates blocked URLs hosting [malicious] executables with host endpoint data to identify potential instances of executables of the same name having been recently run.
severity: Medium
status: Available
requiredDataConnectors:
  - connectorId: TrendMicro
    dataTypes:
      - CommonSecurityLog
  - connectorId: SecurityEvents
    dataTypes:
      - SecurityEvent
  - connectorId: WindowsSecurityEvents
    dataTypes: 
      - SecurityEvents 
  - connectorId: WindowsForwardedEvents
    dataTypes: 
      - WindowsEvent 
queryFrequency: 1d
queryPeriod: 1d
triggerOperator: gt
triggerThreshold: 0
tactics:
  - Execution
relevantTechniques:
  - T1204
query: |
  let endpointData = 
  (union isfuzzy=true
  (SecurityEvent
    | where EventID == 4688
    | extend shortFileName = tolower(tostring(split(NewProcessName, '\\')[-1]))
    ),
    (WindowsEvent
    | where EventID == 4688
    | extend  NewProcessName = tostring(EventData.NewProcessName)
    | extend shortFileName = tolower(tostring(split(NewProcessName, '\\')[-1]))
    | extend TargetUserName = tostring(EventData.TargetUserName)
    ));
  // Correlate suspect executables seen in TrendMicro rule updates with similar activity on endpoints
  CommonSecurityLog
  | where DeviceVendor =~ "Trend Micro"
  | where Activity =~ "Deny List updated" 
  | where RequestURL endswith ".exe"
  | project TimeGenerated, Activity , RequestURL , SourceIP, DestinationIP
  | extend suspectExeName = tolower(tostring(split(RequestURL, '/')[-1]))
  | join kind=innerunique (endpointData) on $left.suspectExeName == $right.shortFileName 
  | extend HostName = tostring(split(Computer, '.', 0)[0]), DnsDomain = tostring(strcat_array(array_slice(split(Computer, '.'), 1, -1), '.'))
entityMappings:
  - entityType: Account
    fieldMappings:
      - identifier: Name
        columnName: TargetUserName
  - entityType: Host
    fieldMappings:
      - identifier: HostName
        columnName: HostName
      - identifier: DnsDomain
        columnName: DnsDomain
  - entityType: IP
    fieldMappings:
      - identifier: Address
        columnName: DestinationIP
  - entityType: URL
    fieldMappings:
      - identifier: Url
        columnName: RequestURL
version: 1.1.6
kind: Scheduled

Stages and Predicates

Let binding: endpointData

let endpointData = (union isfuzzy=true
(SecurityEvent
  | where EventID == 4688
  | extend shortFileName = tolower(tostring(split(NewProcessName, '\\')[-1]))
  ),
  (WindowsEvent
  | where EventID == 4688
  | extend  NewProcessName = tostring(EventData.NewProcessName)
  | extend shortFileName = tolower(tostring(split(NewProcessName, '\\')[-1]))
  | extend TargetUserName = tostring(EventData.TargetUserName)
  ));

Stage 1: source

let endpointData

Stage 2: source

CommonSecurityLog

Stage 3: where

| where DeviceVendor =~ "Trend Micro"

Stage 4: where

| where Activity =~ "Deny List updated"

Stage 5: where

| where RequestURL endswith ".exe"

Stage 6: project

| project TimeGenerated, Activity , RequestURL , SourceIP, DestinationIP

Stage 7: extend

| extend suspectExeName = tolower(tostring(split(RequestURL, '/')[-1]))

Stage 8: join

| join kind=innerunique (endpointData) on $left.suspectExeName == $right.shortFileName

Stage 9: extend

| extend HostName = tostring(split(Computer, '.', 0)[0]), DnsDomain = tostring(strcat_array(array_slice(split(Computer, '.'), 1, -1), '.'))

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
Activityeq
  • Deny List updated
DeviceVendoreq
  • Trend Micro
EventIDeq
  • 4688 transforms: cased corpus 313 (splunk 283, kusto 30)
RequestURLends_with
  • .exe

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
Activityproject
DestinationIPproject
RequestURLproject
SourceIPproject
TimeGeneratedproject
suspectExeNameextend
DnsDomainextend
HostNameextend