Why you should not trust the cloud WAF?
A web application firewall (WAF) or WAF appliance provides security by operating through an application or service thus blocking malicious calls, inputs, and outputs that do not meet the policy of a firewall. Today due to increasing cloud architecture, multiple cloud providers are giving their own managed WAF which is deeply integrated with their technologies such as load balancing, etc.
WAF can be distributed into three broad categories:
The first category, Host-based web application firewalls (HWAF) is installed as the modules for a web server. It is a significantly cheaper solution compared to hardware-based WAFs, which are meant for small web applications. However, there is extensive resource utilization hence is results in performance problems.
The second category is Network-based web application firewalls (NWAF) which are traditionally hardware-based and provide latency reduction benefits due to the local installation. This means NWAF is installed close to the application server and is easy to access.
The next category, that has many differences from the first & the second one, is cloud-based WAFs, As the name says, these firewalls are based on the cloud. Cloud WAFs are very much similar to the regular WAF but it is being used to prevent attacks on the cloud environment.
Here we will be talking about cloud-based WAF.
Plus, cloud-based WAF technology is :
By using cloud WAFs, clients need not make any software or hardware changes and tunings to their system, and can successfully protect their websites from threats, by applying custom rules and deciding on the aggressiveness of the protection.
Currently, there is something called a managed rule set which is provided and managed by cloud providers, called a managed rule set. Each cloud provider uses its custom config for running the cloud WAF rule engine. Hence result depends on different cloud providers.
Security Features of Cloud WAF:
A cloud WAF can be deployed on the top of the CDN solution, Application Load Balancers, API Gateway. For example, the AWS WAF works with Amazon CloudFront, 4 our global content delivery network (CDN) service, and the Application Load Balancer option for Elastic Load Balancing.
WAFs can operate under different models, including the blacklisting approach (negative security), whitelisting approach (positive security), and hybrid approach.
If HEADER, User-Agent CONTAINS Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:92.0) Gecko/20100101 Firefox/92.0
This approach can be easily bypassed as attackers can always modify/spoof the payloads and it also doesn’t protect from any kind of zero-day attacks.
QUERY_STRING URL_DECODE CONTAINS target=https://example.com.
There are multiple testing methodologies either Blackbox Penesting or Grey box Pentesting can be performed for any of the cloud provider’s WAF. Web application firewalls provide a smart response based on rules to all the potential threats which can impact the network.
The web services over the cloud are increasing hence the WAF provided and implemented by cloud providers needs to be tested. Also as a customer, each customer should be aware of the level of protection they are paying for. Blindly we cannot support any WAF without testing. Hence it becomes really important to understand the WAF bypass in a penetration test.
The solution must protect web applications at the HTTP/HTTPS layer. We will be learning about cloud WAF to detect/prevent OWASP Top Ten Threats.
Later in this series, we will be examining a practical approach to bypassing WAFs as a part of our penetration test, and of course, the theory behind working and mitigation in cloud WAFs.
Reference: