Detection rules › Kusto
Detect CVE exploits on network for which a device is vulnerable
This detection query can be used to find specific CVE exploits passing on the wire for which the device is vulnerable. This query should have a very high TP rate, and can be considered as a 'High severity' query.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution | T1203 Exploitation for Client Execution |
| Privilege Escalation | T1068 Exploitation for Privilege Escalation |
| Lateral Movement | T1210 Exploitation of Remote Services |
References
Event coverage
| Provider | Event/ActionType | Title |
|---|---|---|
| Sysmon | Event ID 3 | Network connection |
| Security-Auditing | Event ID 5156 | The Windows Filtering Platform has permitted a connection. |
| Defender-DeviceNetworkEvents | any | Network activity (any) |
Rule body yaml
// Get all the TVM data
let tvm_data = DeviceTvmSoftwareVulnerabilities
| distinct DeviceName, SoftwareName, SoftwareVendor, SoftwareVersion, CveId, VulnerabilitySeverityLevel;
// Get CVE signatures on the network
DeviceNetworkEvents
| where ActionType contains "NetworkSignatureInspected"
| extend AdditionalFields = todynamic(AdditionalFields)
| extend SignatureName = tostring(AdditionalFields.SignatureName),
SignatureMatchedContent = tostring(AdditionalFields.SignatureMatchedContent),
SamplePacketContent = tostring(AdditionalFields.SamplePacketContent)
| where SignatureName contains "CVE"
// Join the TVM data of the related device
| join kind=inner tvm_data on DeviceName
// Check if the server is vulnerable to the detected CVE in network traffic
| where SignatureName == CveId
| project-away DeviceName1
Stages and Predicates
Let binding: tvm_data
let tvm_data = DeviceTvmSoftwareVulnerabilities
| distinct DeviceName, SoftwareName, SoftwareVendor, SoftwareVersion, CveId, VulnerabilitySeverityLevel;
Stage 1: source
DeviceNetworkEvents
Stage 2: where
| where ActionType contains "NetworkSignatureInspected"
Stage 3: extend
| extend AdditionalFields = todynamic(AdditionalFields)
Stage 4: extend
| extend SignatureName = tostring(AdditionalFields.SignatureName),
SignatureMatchedContent = tostring(AdditionalFields.SignatureMatchedContent),
SamplePacketContent = tostring(AdditionalFields.SamplePacketContent)
Stage 5: where
| where SignatureName contains "CVE"
Stage 6: join
| join kind=inner tvm_data on DeviceName
Stage 7: where
| where SignatureName == CveId
Stage 8: project-away
| project-away DeviceName1
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 |
|---|---|---|
ActionType | contains |
|
SignatureName | contains |
|
SignatureName | eq |
|
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 |
|---|---|
AdditionalFields | extend |
SamplePacketContent | extend |
SignatureMatchedContent | extend |
SignatureName | extend |