Hunting CVE 2025 31324
Query
// https://www.bleepingcomputer.com/news/security/over-1-200-sap-netweaver-servers-vulnerable-to-actively-exploited-flaw/
let InternetFacing =
DeviceInfo
| where IsInternetFacing == true and isnotempty(PublicIP)
| distinct DeviceId;
DeviceProcessEvents
| where TimeGenerated > ago(90d)
| where InitiatingProcessVersionInfoProductName has "netweaver"
| summarize arg_max(TimeGenerated, *) by DeviceId
| where DeviceId has_any(InternetFacing)Explanation
This KQL (Kusto Query Language) query is designed to identify potentially vulnerable SAP NetWeaver servers that are exposed to the internet. Here's a simplified breakdown of what the query does:
-
Identify Internet-Facing Devices:
- The query first looks at the
DeviceInfotable to find devices that are internet-facing (i.e., they have a public IP address). - It filters these devices by checking if the
IsInternetFacingfield is true and thePublicIPfield is not empty. - It then creates a distinct list of these internet-facing devices by their
DeviceId.
- The query first looks at the
-
Find NetWeaver Processes:
- The query then examines the
DeviceProcessEventstable to find events from the last 90 days (TimeGenerated > ago(90d)). - It filters these events to find processes where the
InitiatingProcessVersionInfoProductNamecontains "netweaver", indicating they are related to SAP NetWeaver.
- The query then examines the
-
Summarize Recent Events:
- For each device, it summarizes the most recent event (
arg_max(TimeGenerated, *)) to get the latest process information for each device.
- For each device, it summarizes the most recent event (
-
Filter for Internet-Facing Devices:
- Finally, it filters the summarized results to only include devices that are in the list of internet-facing devices identified earlier.
In summary, this query identifies the most recent SAP NetWeaver-related processes running on devices that are exposed to the internet, which could potentially be vulnerable to exploitation.
Details

Steven Lim
Released: May 1, 2025
Tables
DeviceInfoDeviceProcessEvents
Keywords
DeviceInfoDeviceProcessEventsDeviceIdTimeGeneratedPublicIPInitiatingProcessVersionInfoProductName
Operators
let|where==andisnotemptydistinct>agohassummarizearg_maxbyhas_any