Hunting Ingress Nightmare CVSS 98
Query
// https://www.wiz.io/blog/ingress-nginx-kubernetes-vulnerabilities
let InternetFacing =
DeviceInfo
| where IsInternetFacing == true and isnotempty(PublicIP)
| distinct DeviceId;
DeviceProcessEvents
| where InitiatingProcessCommandLine has "nginx-ingress"
| summarize arg_max(TimeGenerated, *) by DeviceId
| where DeviceId has_any(InternetFacing)Explanation
This KQL (Kusto Query Language) query is designed to identify potentially vulnerable devices running the "nginx-ingress" process 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 a dataset called
DeviceInfoto find devices that are exposed to the internet. This is determined by checking if theIsInternetFacingfield istrueand if there is a non-emptyPublicIP. - It then creates a list of unique
DeviceIds for these internet-facing devices.
- The query first looks at a dataset called
-
Find Nginx-Ingress Processes:
- The query then examines another dataset called
DeviceProcessEventsto find processes where the command line includes "nginx-ingress". This indicates that the device is running the Nginx Ingress Controller, which is a component often used in Kubernetes environments.
- The query then examines another dataset called
-
Summarize and Filter Results:
- For each device running "nginx-ingress", it summarizes the data to get the most recent event (
arg_max(TimeGenerated, *)) for eachDeviceId. - Finally, it filters these results to only include devices that are in the list of internet-facing devices identified earlier.
- For each device running "nginx-ingress", it summarizes the data to get the most recent event (
In summary, this query identifies devices that are both running the "nginx-ingress" process and are exposed to the internet, potentially highlighting systems that could be vulnerable to certain security risks.
Details

Steven Lim
Released: March 25, 2025
Tables
DeviceInfoDeviceProcessEvents
Keywords
DeviceInfoDeviceProcessEventsDeviceIdPublicIPTimeGeneratedInitiatingProcessCommandLine
Operators
let|where==andisnotemptydistincthassummarizearg_maxbyhas_any