Detection rules › Kusto
Network endpoint to host executable correlation
'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
| Tactic | Techniques |
|---|---|
| Execution | T1204 User Execution |
Event coverage
| Provider | Event | Title |
|---|---|---|
| Security-Auditing | Event ID 4688 | A new process has been created. |
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.
| Field | Kind | Values |
|---|---|---|
Activity | eq |
|
DeviceVendor | eq |
|
EventID | eq |
|
RequestURL | ends_with |
|
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.
| Field | Source |
|---|---|
Activity | project |
DestinationIP | project |
RequestURL | project |
SourceIP | project |
TimeGenerated | project |
suspectExeName | extend |
DnsDomain | extend |
HostName | extend |