-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhance: remove verb from the generic bf http filter (#1200)
* enhance: remove verb from the generic bf http filter * enhance: fix caddy test since now it picks up the second test subject * enhance: fix caddy test case again and add a negative test suite to otehrs * enhance: add a simply traefik test case * enhance: fix dumps * enhance: fix dumps part 2 * enhance: update index * enhance: stupid class
- Loading branch information
1 parent
59b6e7f
commit cda30eb
Showing
6 changed files
with
116 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
parsers: | ||
- ./parsers/s01-parse/crowdsecurity/traefik-logs.yaml | ||
- crowdsecurity/syslog-logs | ||
- crowdsecurity/dateparse-enrich | ||
- crowdsecurity/http-logs | ||
scenarios: | ||
- crowdsecurity/http-generic-bf | ||
postoverflows: | ||
- "" | ||
log_file: traefik_generic-bf.log | ||
log_type: traefik | ||
labels: {} | ||
ignore_parsers: true |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
len(results) == 1 | ||
"192.168.1.1" in results[0].Overflow.GetSources() | ||
results[0].Overflow.Sources["192.168.1.1"].IP == "192.168.1.1" | ||
results[0].Overflow.Sources["192.168.1.1"].Range == "" | ||
results[0].Overflow.Sources["192.168.1.1"].GetScope() == "Ip" | ||
results[0].Overflow.Sources["192.168.1.1"].GetValue() == "192.168.1.1" | ||
results[0].Overflow.Alert.Events[0].GetMeta("datasource_path") == "traefik_generic-bf.log" | ||
results[0].Overflow.Alert.Events[0].GetMeta("datasource_type") == "file" | ||
results[0].Overflow.Alert.Events[0].GetMeta("http_args_len") == "0" | ||
results[0].Overflow.Alert.Events[0].GetMeta("http_path") == "/" | ||
results[0].Overflow.Alert.Events[0].GetMeta("http_status") == "401" | ||
results[0].Overflow.Alert.Events[0].GetMeta("http_user_agent") == "-" | ||
results[0].Overflow.Alert.Events[0].GetMeta("http_verb") == "GET" | ||
results[0].Overflow.Alert.Events[0].GetMeta("log_type") == "http_access-log" | ||
results[0].Overflow.Alert.Events[0].GetMeta("service") == "http" | ||
results[0].Overflow.Alert.Events[0].GetMeta("source_ip") == "192.168.1.1" | ||
results[0].Overflow.Alert.Events[0].GetMeta("timestamp") == "2024-12-17T15:59:28Z" | ||
results[0].Overflow.Alert.Events[0].GetMeta("traefik_router_name") == "whoami-new@docker" | ||
results[0].Overflow.Alert.Events[0].GetMeta("user") == "fgjh" | ||
results[0].Overflow.Alert.Events[1].GetMeta("datasource_path") == "traefik_generic-bf.log" | ||
results[0].Overflow.Alert.Events[1].GetMeta("datasource_type") == "file" | ||
results[0].Overflow.Alert.Events[1].GetMeta("http_args_len") == "0" | ||
results[0].Overflow.Alert.Events[1].GetMeta("http_path") == "/" | ||
results[0].Overflow.Alert.Events[1].GetMeta("http_status") == "401" | ||
results[0].Overflow.Alert.Events[1].GetMeta("http_user_agent") == "-" | ||
results[0].Overflow.Alert.Events[1].GetMeta("http_verb") == "GET" | ||
results[0].Overflow.Alert.Events[1].GetMeta("log_type") == "http_access-log" | ||
results[0].Overflow.Alert.Events[1].GetMeta("service") == "http" | ||
results[0].Overflow.Alert.Events[1].GetMeta("source_ip") == "192.168.1.1" | ||
results[0].Overflow.Alert.Events[1].GetMeta("timestamp") == "2024-12-17T15:59:29Z" | ||
results[0].Overflow.Alert.Events[1].GetMeta("traefik_router_name") == "whoami-new@docker" | ||
results[0].Overflow.Alert.Events[1].GetMeta("user") == "fgjh" | ||
results[0].Overflow.Alert.Events[2].GetMeta("datasource_path") == "traefik_generic-bf.log" | ||
results[0].Overflow.Alert.Events[2].GetMeta("datasource_type") == "file" | ||
results[0].Overflow.Alert.Events[2].GetMeta("http_args_len") == "0" | ||
results[0].Overflow.Alert.Events[2].GetMeta("http_path") == "/" | ||
results[0].Overflow.Alert.Events[2].GetMeta("http_status") == "401" | ||
results[0].Overflow.Alert.Events[2].GetMeta("http_user_agent") == "-" | ||
results[0].Overflow.Alert.Events[2].GetMeta("http_verb") == "GET" | ||
results[0].Overflow.Alert.Events[2].GetMeta("log_type") == "http_access-log" | ||
results[0].Overflow.Alert.Events[2].GetMeta("service") == "http" | ||
results[0].Overflow.Alert.Events[2].GetMeta("source_ip") == "192.168.1.1" | ||
results[0].Overflow.Alert.Events[2].GetMeta("timestamp") == "2024-12-17T15:59:30Z" | ||
results[0].Overflow.Alert.Events[2].GetMeta("traefik_router_name") == "whoami-new@docker" | ||
results[0].Overflow.Alert.Events[2].GetMeta("user") == "fgjh" | ||
results[0].Overflow.Alert.Events[3].GetMeta("datasource_path") == "traefik_generic-bf.log" | ||
results[0].Overflow.Alert.Events[3].GetMeta("datasource_type") == "file" | ||
results[0].Overflow.Alert.Events[3].GetMeta("http_args_len") == "0" | ||
results[0].Overflow.Alert.Events[3].GetMeta("http_path") == "/" | ||
results[0].Overflow.Alert.Events[3].GetMeta("http_status") == "401" | ||
results[0].Overflow.Alert.Events[3].GetMeta("http_user_agent") == "-" | ||
results[0].Overflow.Alert.Events[3].GetMeta("http_verb") == "GET" | ||
results[0].Overflow.Alert.Events[3].GetMeta("log_type") == "http_access-log" | ||
results[0].Overflow.Alert.Events[3].GetMeta("service") == "http" | ||
results[0].Overflow.Alert.Events[3].GetMeta("source_ip") == "192.168.1.1" | ||
results[0].Overflow.Alert.Events[3].GetMeta("timestamp") == "2024-12-17T15:59:31Z" | ||
results[0].Overflow.Alert.Events[3].GetMeta("traefik_router_name") == "whoami-new@docker" | ||
results[0].Overflow.Alert.Events[3].GetMeta("user") == "fgjh" | ||
results[0].Overflow.Alert.Events[4].GetMeta("datasource_path") == "traefik_generic-bf.log" | ||
results[0].Overflow.Alert.Events[4].GetMeta("datasource_type") == "file" | ||
results[0].Overflow.Alert.Events[4].GetMeta("http_args_len") == "0" | ||
results[0].Overflow.Alert.Events[4].GetMeta("http_path") == "/" | ||
results[0].Overflow.Alert.Events[4].GetMeta("http_status") == "401" | ||
results[0].Overflow.Alert.Events[4].GetMeta("http_user_agent") == "-" | ||
results[0].Overflow.Alert.Events[4].GetMeta("http_verb") == "GET" | ||
results[0].Overflow.Alert.Events[4].GetMeta("log_type") == "http_access-log" | ||
results[0].Overflow.Alert.Events[4].GetMeta("service") == "http" | ||
results[0].Overflow.Alert.Events[4].GetMeta("source_ip") == "192.168.1.1" | ||
results[0].Overflow.Alert.Events[4].GetMeta("timestamp") == "2024-12-17T15:59:32Z" | ||
results[0].Overflow.Alert.Events[4].GetMeta("traefik_router_name") == "whoami-new@docker" | ||
results[0].Overflow.Alert.Events[4].GetMeta("user") == "fgjh" | ||
results[0].Overflow.Alert.Events[5].GetMeta("datasource_path") == "traefik_generic-bf.log" | ||
results[0].Overflow.Alert.Events[5].GetMeta("datasource_type") == "file" | ||
results[0].Overflow.Alert.Events[5].GetMeta("http_args_len") == "0" | ||
results[0].Overflow.Alert.Events[5].GetMeta("http_path") == "/" | ||
results[0].Overflow.Alert.Events[5].GetMeta("http_status") == "401" | ||
results[0].Overflow.Alert.Events[5].GetMeta("http_user_agent") == "-" | ||
results[0].Overflow.Alert.Events[5].GetMeta("http_verb") == "GET" | ||
results[0].Overflow.Alert.Events[5].GetMeta("log_type") == "http_access-log" | ||
results[0].Overflow.Alert.Events[5].GetMeta("service") == "http" | ||
results[0].Overflow.Alert.Events[5].GetMeta("source_ip") == "192.168.1.1" | ||
results[0].Overflow.Alert.Events[5].GetMeta("timestamp") == "2024-12-17T15:59:33Z" | ||
results[0].Overflow.Alert.Events[5].GetMeta("traefik_router_name") == "whoami-new@docker" | ||
results[0].Overflow.Alert.Events[5].GetMeta("user") == "fgjh" | ||
results[0].Overflow.Alert.GetScenario() == "LePresidente/http-generic-401-bf" | ||
results[0].Overflow.Alert.Remediation == true | ||
results[0].Overflow.Alert.GetEventsCount() == 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
192.168.1.1 - fgjh [17/Dec/2024:15:59:28 +0000] "GET / HTTP/2.0" 401 17 "-" "-" 108709 "whoami-new@docker" "-" 1ms | ||
192.168.1.1 - fgjh [17/Dec/2024:15:59:29 +0000] "GET / HTTP/2.0" 401 17 "-" "-" 108709 "whoami-new@docker" "-" 1ms | ||
192.168.1.1 - fgjh [17/Dec/2024:15:59:30 +0000] "GET / HTTP/2.0" 401 17 "-" "-" 108709 "whoami-new@docker" "-" 1ms | ||
192.168.1.1 - fgjh [17/Dec/2024:15:59:31 +0000] "GET / HTTP/2.0" 401 17 "-" "-" 108709 "whoami-new@docker" "-" 1ms | ||
192.168.1.1 - fgjh [17/Dec/2024:15:59:32 +0000] "GET / HTTP/2.0" 401 17 "-" "-" 108709 "whoami-new@docker" "-" 1ms | ||
192.168.1.1 - fgjh [17/Dec/2024:15:59:33 +0000] "GET / HTTP/2.0" 401 17 "-" "-" 108709 "whoami-new@docker" "-" 1ms | ||
192.168.1.1 - fgjh [17/Dec/2024:15:59:34 +0000] "GET / HTTP/2.0" 401 17 "-" "-" 108709 "whoami-new@docker" "-" 1ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters