Skip to content

Commit b15a5f8

Browse files
authored
Add network domain tag and modify ESQL queries
1 parent b18fcd4 commit b15a5f8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

rules/cross-platform/reconnaissance_web_server_unusual_spike_in_error_response_codes.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ severity = "medium"
2323
tags = [
2424
"Domain Scope: Single",
2525
"Domain: Web",
26+
"Domain: Network",
2627
"OS: Linux",
2728
"OS: macOS",
2829
"OS: Windows",
@@ -46,13 +47,17 @@ from
4647
logs-iis.access-*
4748
| where
4849
@timestamp > now() - 1 hours and
50+
(url.original is not null or url.full is not null) and
4951
http.request.method == "GET" and
5052
http.response.status_code in (
5153
500, // Internal Server Error
5254
502, // Bad Gateway
5355
503, // Service Unavailable
5456
504 // Gateway Timeout
5557
)
58+
| eval Esql_url_text = case(url.original is not null, url.original, url.full)
59+
| eval Esql_url_lower = to_lower(Esql_url_text)
60+
5661
| keep
5762
@timestamp,
5863
event.dataset,
@@ -61,7 +66,8 @@ from
6166
url.path,
6267
source.ip,
6368
agent.id,
64-
host.name
69+
host.name,
70+
Esql_url_lower
6571
| stats
6672
Esql.event_count = count(),
6773
Esql.http_response_status_code_count = count(http.response.status_code),
@@ -70,7 +76,7 @@ from
7076
Esql.agent_id_values = values(agent.id),
7177
Esql.http_request_method_values = values(http.request.method),
7278
Esql.http_response_status_code_values = values(http.response.status_code),
73-
Esql.url_path_values = values(url.path),
79+
Esql.url_path_values = values(Esql_url_lower),
7480
Esql.event_dataset_values = values(event.dataset)
7581
by source.ip
7682
| where

0 commit comments

Comments
 (0)