Iniciar sesión

Practice: wildcards, ranges and networks

14 min · 2 ejercicio(s)

Cheat sheet

You want KQL
Starts with process.parent.name: WINWORD*
Field exists file.path: *
Numeric range http.response.body.bytes > 50000
Inclusive range http.response.status_code >= 500
Date window @timestamp >= "2026-03-11T02:00:00Z" and @timestamp < "2026-03-11T03:00:00Z"
IP network (CIDR) source.ip: 10.10.0.0/16
Windows path file.path: C\:\\Windows\\Temp\\*

Escaping

In KQL these characters are special: \ ( ) : < > " *. Escape them with a backslash when they are part of the value. A Windows path therefore needs double backslashes and an escaped colon: C\:\\Users\\*.

Dates

Use ISO 8601 with a time zone (Z for UTC). Without a zone, Kibana uses the browser time zone, which makes shared queries ambiguous. Prefer half-open windows (>= start, < end) so events exactly on the boundary are not counted twice.

Performance

Leading wildcards (*powershell) are expensive on large indices and are disabled in many clusters. Prefer a trailing wildcard, a wildcard field type, or ES|QL string functions.

Ejercicios prácticos de esta lección

Resuelve estos ejercicios con una consulta en el laboratorio Elasticsearch real. Inicia sesión gratis para acceder al laboratorio, las pistas y la corrección automática.

  1. 1. Programs from the user profile

    Legitimate software rarely runs from a user profile. Return all events whose process.executable starts with C:\Users\. Your query is graded by its result.

  2. 2. Heavy pages

    How many web responses were larger than 50,000 bytes (http.response.body.bytes)?