You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 29, 2024. It is now read-only.
In this step, you will configure the WAF Security Automation Solution. Once you have configured the HTTP Flood Protection and Probe/Scanner Log Parser, you will test this new configuration.
The HTTP Flood protection provided by the Security Automation Solution can be configured. In this step, you will explore the possible configuration options. [See the documentation](https://docs.aws.amazon.com/solutions/latest/aws-waf-security-automations/appendix-c.html) for a complete list
8
+
9
+
6
10
The HTTP Flood log parser comes with some extensions points, they are:
7
11
8
12
* Request Threshold: the maximum acceptable requests per five minutes per IP address.
9
13
* Block Period: the period (in minutes) to block applicable IP addresses.
10
14
* Ignored Suffixes: requests accessing this type of resource will not count to request threshold. By default, this list is empty.
11
15
* URI List: use this to define a custom request threshold and block period for specifics URLs. By default, this list is empty.
12
16
13
-
The goal now is to apply customizations and check how it affects the log parser behavior.
17
+
The goal now is to apply customisations and check how it affects the log parser behavior.
18
+
14
19
20
+
### 2.1.2 Customising the HTTP Log Parser
15
21
16
-
### 2.1.2 Customising the Parser
22
+
In this step you will edit the configuration file for the HTTP Log parser. This configuration is used by the Lambda Log Parser when processing log files.
17
23
18
24
* Go to the S3 bucket used for WAF Logs Bucket. To check it's name, go to stack's Outputs tab and search for the value defined for WafLogBucket;
19
25
* Download the configuration file `<stack_name>-waf_log_conf.json`;
@@ -39,11 +45,17 @@ Here is a sample of changed file:
39
45
```
40
46
41
47
### 2.1.3 Testing the new rules
42
-
Let's test your HTTP flood protection. We will use [Apache AB](https://httpd.apache.org/docs/2.4/programs/ab.html).
43
48
44
-
> ⚠️ **Warning**: Do not run the benchmarking tool from your local machine!
49
+
To test the HTTP Flood protection you customised earlier in this step, you will generate a large number of requests. The Flood Protection should add the source IP of the requests to a deny list.
45
50
46
-
We will use [Systems Manager Session Manager](https://console.aws.amazon.com/systems-manager/session-manager/start-session) to connect to the instance and run the `ab` benchmarking tool.
51
+
We will use [Apache AB](https://httpd.apache.org/docs/2.4/programs/ab.html).
52
+
Apache AB is a tool for benchmarking a web server. You will use it to generate a specified number of HTTP requests against your sample Application
53
+
54
+
> ⚠️ **Warning**: Do not run the benchmarking tool from your local machine! \
55
+
> Doing so will generate a large amount of traffic on your local network. \
56
+
> Use the EC2 instance of the Sample Web App to perform the requests against the external endpoint.
57
+
58
+
You will use [Systems Manager Session Manager](https://console.aws.amazon.com/systems-manager/session-manager/start-session) to connect to the instance and run the `ab` benchmarking tool. Apache AB is pre-installed on the instance.
47
59
48
60
Run against your endpoint 50,000 requests, with concurrency 100.
Now we will customise our Scanner and Probe rules. These use Amazon Athena.
66
-
The solutions refer to the Athena by a saved query ID. As Athena don't allow you to change saved queries, the process to apply customizations to Athena query is by creating a new query and updating the Athena log parser event to use the new query ID.
77
+
Now you will customise our Scanner and Probe rules. These use Amazon Athena to query the logs generated by an application.
78
+
The solutions refer to Athena by a saved query ID. As Athena doesn't allow you to change saved queries, you need to create a new query and update the Athena log parser event to use the new query ID.
79
+
80
+
By customising the query performed by Athena, you can specify the rules for blocking scanners and probes. For further details, [see the documentation](https://docs.aws.amazon.com/solutions/latest/aws-waf-security-automations/appendix-d.html)
67
81
68
82
### 2.2.1
69
83
* Navigate to the Amazon Athena console, select the Saved Queries tab;
70
-
* Select the query you want to customize (ScannersProbesLogParser);
84
+
* Select the query you want to customise (ScannersProbesLogParser);
0 commit comments