F5 Distributed Cloud > F5 Distributed Cloud: Web Application Security & Scanning Source | Edit on
Lab 1: Deploying and Managing F5 Distributed Cloud Web Application Firewall Configuration¶
Objective:
Explore and become familiar with the Distributed Cloud (XC) Console.
Review the F5 Distributed Cloud Load Balancer that has been provisioned.
Create a Web Application Firewall policy and attach to the F5 XC Load Balancer.
Narrative:
After consulting with your trusty F5 Solutions Engineer, you decide to adopt security services from F5 Distributed Cloud Web Application and API Protection (WAAP) suite. The lab provisioned for you has already deployed a F5 XC load balancer and been setup to route to your public cloud application. The F5 Distributed Cloud Application Delivery Network (ADN) will provide network connectivity for clients to first route to F5’s nearest Regional Edge (RE) location on the ADN utilizing IP Anycast. Once the client is connected to their nearest F5 RE, security controls can now be applied so that malicous traffic can be dropped at the F5 RE and valid traffic can then be passed to the ACME environment. This lab will be deployed in a SaaS only configuration with no on-premises (public or private cloud) elements.
Warning
If you are using multiple labs in one course, understand that some steps below may be redundant depending on labs deployed. To gain full benefits from this lab, please delete any objects created in your prior lab and continue with this lab as all necessary objects will be recreated.
Following the tasks in the prior Introduction Section, you should now be able to access the F5 Distributed Cloud Console, having set your Work Domain Roles and Skill levels. If you have not done so already, please login to your tenant for this lab using the Accept Inivitation link from your second email and proceed to Task 1.
Note
Expected Lab Time: 25 minutes
Lab 1 Summary–WAF Deployment: Deploy and configure an F5 Distributed Cloud Web Application Firewall policy on the application’s HTTP Load Balancer. You’ll see how to create a custom WAF policy, apply it to protect the web app, and test it with attack traffic (e.g. an attempted SQL injection) to confirm that malicious requests are detected and blocked. This establishes an immediate security baseline for the vulnerable application.
Task 1: Discover Your Animal (Namespace)¶
The following steps will help you identify your namespace and update your lab guide to reflect your namespace dynamically.
|
Current namespace: <namespace>
Note
You may have had a namespace from a previous lab, pleased update with the new.
Warning
Guide pages might need to be refreshed to get updated namespace to render.
Task 2: Exploring the F5 Distributed Console¶
The following steps will allow you to review the XC Load Balancer that was deployed and is currently advertising a globally available application. These steps will allow you to review the application, its DNS entry and the application target that is configured as the origin.
|
Task 3: Configure WAF Policy on the Load Balancer¶
The following steps will guide you through adding a Web Application Firewall (WAF) Policy. These steps will demonstrate various aspects of the configuration.
Note The “shared/base-appfw” policy is in the “shared namespace” which can be applied to multiple Load Balancer configurations across namespaces, reducing policy sprawl.
Note Automatic Attack Signatures Tuning is enabled which engages an automatic False Positive suppression engine. Any suppressed events are logged within Security Events. Note Attack Signatures Staging is disabled. This can be enabled should an Application Firewall with new or updated attack signatures be staged (monitored) for a period of prior to enforcement (blocking).
|
You’ve built your first WAF policy on F5 Distributed Cloud. This WAF policy can be applied to any additional load balancers deployed in this namespace. The F5 XC WAAP suite can be configured to protect applications across your on-prem data center, Azure, AWS, GCP and SAAS environments. This allows your team to uniformly manage application security across all of your public, private and SAAS applications. Now that you are familiar with how to build WAF policies on F5 Distributed Cloud, we can start getting our hands dirty with testing to ensure the ACME application is protected.
Task 4: Testing the WAF Policy & Reviewing Event Data¶
You will now perform basic testing of the Web Application Firewall (WAF) Policy. You will also review the generated event data to make additional configuration changes.
|
The ACME application is now being successfully protected by F5 Distributed Cloud.
Note As you have not run many requests, summary analytics may not be available in the dashboard view yet.
Note Security Event data may take 15-20 seconds to populate in the Console. Please force a refresh using the Refresh icon next to the Time Period selection in step 6.
Note The available Key list to search is dynamically updated based on the requests in the selected time view.
Note Individual forensic categories can be changed using the noted pencil icon to surface additional top data details.
Note
Note If you lost your 1 Hour Filter, re-apply using following the method described in the earlier task.
|
Upon forensic review, your application team has told you that last request from Support IDs from the testing performed in Task 3, Step 2 as shown is actually a valid request. You will need to create an exception for this so that traffic can successfully pass. This task can be quickly accomplished in the XC console.
Note Adding requestor/client to “Blocked or Trusted Clients” is also available.
Note If you get an error, you may need to add a Path RegEx ^/$
Note Rerunning the attack you just excluded, you will see that it is no longer blocked. |
Task 5: Understanding Exclusions and Customizing WAF Policy¶
In this task you will come to understand how exclusions are applied. You will also further customize the WAF policy just built to add a custom block response page.
Note This allows for policy reuse and reduces the need for specific application WAF Policies.
|
Sample Blocking Response Page to be copied:
<style>body { font-family: Source Sans Pro, sans-serif; }</style>
<html style="margin: 0;"><head><title>Rejected Request</title></head>
<body style="margin : 0;">
<div style="background-color: #046b99; height: 40px; width: 100%;"></div>
<div style="min-height: 100px; background-color: white; text-align: center;"></div>
<div style="background-color: #fdb81e; height: 5px; width: 100%;"></div>
<div id="main-content" style="width: 100%; ">
<table width="100%"><tr><td style="text-align: center;">
<div style="margin-left: 50px;">
<div style="margin-bottom: 35px;"><br/>
<span style="font-size: 40pt; color: #046b99;">Rejected Request</span>
</div><div style="font-size: 14pt;">
<p>The requested URL was rejected. Please consult with your administrator.</p>
<p>Your Support ID is: <span style="color:red; font-weight:bold">{{request_id}}</span></p>
<p><a href="javascript:history.back()">[Go Back]</a></p>
</div></div></td></tr></table></div>
<div style="background-color: #222222; position: fixed; bottom: 0px; height: 40px;
width: 100%; text-align: center;"></div>
</body></html>
Note If updated reponse doesn’t show, clear cache or use a private tab. |
You have now completed your first WAF policy deployment on F5 XC. This policy can be re-used for other applications in the ACME environment and the exclusions you configured are only applied to this specific application. New applications that utilize the WAF policy configured will not have these exclusions allowing you to quickly scale and manage exlusions on a per application basis while the policy can stay the same.
End of Lab 1: This concludes Lab 1. Feel free to review and test the configuration.
A brief presentation will be shared prior to the beginning of Lab 2.























































