network_traffic(opens in a new tab or window)
nginx(opens in a new tab or window)
apache(opens in a new tab or window)
from logs-network_traffic.http-*, logs-network_traffic.tls-*, logs-nginx.access-*, logs-apache.access-*, logs-apache_tomcat.access-*, logs-iis.access-*
| where
(url.original is not null or url.full is not null) and
http.request.method == "GET" and
http.response.status_code in (404, 403)
| eval Esql.url_text = case(url.original is not null, url.original, url.full)
| eval Esql.url_lower = to_lower(Esql.url_text)
| keep
@timestamp,
event.dataset,
http.request.method,
http.response.status_code,
source.ip,
agent.id,
host.name,
Esql.url_lower
| stats
Esql.event_count = count(),
Esql.url_lower_count_distinct = count_distinct(Esql.url_lower),
Esql.host_name_values = values(host.name),
Esql.agent_id_values = values(agent.id),
Esql.http_request_method_values = values(http.request.method),
Esql.http_response_status_code_values = values(http.response.status_code),
Esql.url_path_values = values(Esql.url_lower),
Esql.event_dataset_values = values(event.dataset)
by source.ip
| where
Esql.event_count > 500 and Esql.url_lower_count_distinct > 250
Install detection rules in Elastic Security
Detect Web Server Discovery or Fuzzing Activity in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(opens in a new tab or window).