Query Details
// 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)
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:
DeviceInfo to find devices that are exposed to the internet. This is determined by checking if the IsInternetFacing field is true and if there is a non-empty PublicIP.DeviceIds for these internet-facing devices.Find Nginx-Ingress Processes:
DeviceProcessEvents to 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.Summarize and Filter Results:
arg_max(TimeGenerated, *)) for each DeviceId.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.

Steven Lim
Released: March 25, 2025
Tables
Keywords
Operators