Reconnaissance (TA0043)(external, opens in a new tab or window)
nginx(external, opens in a new tab or window)
apache(external, opens in a new tab or window)
text code block:from logs-nginx.access-*, logs-apache.access-*, logs-apache_tomcat.access-*, logs-iis.access-* | where http.request.method == "GET" and http.response.status_code in ( 500, // Internal Server Error 502, // Bad Gateway 503, // Service Unavailable 504 // Gateway Timeout ) | eval Esql.url_original_to_lower = to_lower(url.original) | keep @timestamp, event.dataset, http.request.method, http.response.status_code, source.ip, agent.id, host.name, Esql.url_original_to_lower, data_stream.namespace | stats Esql.event_count = count(), Esql.http_response_status_code_count = count(http.response.status_code), Esql.http_response_status_code_values = values(http.response.status_code), 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_original_to_lower), Esql.event_dataset_values = values(event.dataset), Esql.data_stream_namespace_values = values(data_stream.namespace) by source.ip, agent.id | where Esql.http_response_status_code_count > 10
Install detection rules in Elastic Security
Detect Web Server Potential Spike in Error Response Codes 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(external, opens in a new tab or window).