Why Whitelisting Security Controls Can Lead to a Better Penetration Test

Why Whitelisting Security Controls Can Lead to a Better Penetration Test

When conducting a penetration test, being asked to whitelist a tester’s IP address from certain security controls might sound counterintuitive.

After all, aren’t those controls there to protect the application? They are. But depending on the objective of the penetration test, leaving them in place can actually prevent testers from properly assessing the security of the application itself.

The role of WAFs and rate limiting

Web Application Firewalls (WAFs) and rate limiting are two common security controls used to protect web applications.

A WAF can identify and block potentially malicious requests before they ever reach the application, while rate limiting restricts the number of requests that can be made within a certain period. Both are valuable layers of defence in a production environment. However, during a penetration test, they can also create a barrier between the tester and the application they are actually there to assess.

How Does a WAF Work? - Security Boulevard

Are you testing the WAF or the application?

A penetration test is typically conducted within a defined timeframe, with the goal of identifying vulnerabilities and misconfigurations within the application.

This principle is reflected in the Australian Signals Directorate’s Information Security Manual (ISM), which describes vulnerability assessments and penetration tests as security assessment activities designed to identify and triage vulnerabilities within systems and help organisations better understand their exposure to cyber threats. If a WAF blocks testing payloads before they reach the application’s underlying logic, however, the tester may spend valuable testing time interacting with the WAF rather than assessing the application itself. Rate limiting can create a similar problem by significantly slowing testing activity.

The result?

A vulnerability may exist within the application but remain undiscovered because the security control sitting in front of it prevented the tester from reaching the vulnerable functionality. This can create an incomplete picture of the application’s actual security posture.

Defence in depth still matters

Whitelisting a penetration tester does not mean WAFs, rate limiting or other security controls are ineffective or unnecessary.

Quite the opposite.

These controls are important components of a defence-in-depth security strategy. However, they should not be relied upon as the only protection against vulnerabilities within an application.

The OWASP Web Security Testing Guide (WSTG) notes that network-level components such as firewalls and intrusion prevention systems can have a significant impact on testing. It also explains that while WAFs can be effective against certain attack types, such as SQL injection and cross-site scripting, they can be less effective against vulnerabilities involving areas such as access control and business logic.

This distinction is important during penetration testing. The objective is not simply to determine whether a malicious request can pass through the WAF, but to understand how the application itself behaves when presented with unexpected or malicious input.

WAF bypass techniques and weaknesses also evolve over time. If an underlying application vulnerability has been masked by the WAF rather than remediated, a future bypass could expose that vulnerability to an attacker. The stronger approach is to ensure the application is secure at its core, while maintaining additional security controls as further layers of protection.

CyberSecurity Awareness — Going on the Defense

The Takeaway

Where the objective of a penetration test is to assess the security of the application itself, relevant security controls should generally be whitelisted for the tester’s authorised IP address. This gives the penetration tester direct access to assess the application’s functionality and underlying logic without unnecessary interference from controls such as WAFs or rate limiting.

The goal is not to make the penetration test easier.

It is to make sure we are testing the right thing.

More Blogs

May 31, 2021

Upgrading from AppLocker to Windows Defender Application Control (WDAC)

Windows Defender Application Control (WDAC), formerly known as Device Guard, is a Microsoft Windows secure feature that restricts executable code, including scripts run by enlightened Windows script hosts, to those that conform to the device code integrity policy. WDAC prevents the execution, loading and running of unwanted or malicious code, drivers and scripts. WDAC also… Continue reading Upgrading from AppLocker to Windows Defender Application Control (WDAC)

Read More
cyber security companies | penetration testing | managed security service provider | cyber security consultant
June 22, 2021

Bypassing LSA Protection (aka Protected Process Light) without Mimikatz on Windows 10

Starting with Windows 8.1 (and Server 2012 R2) Microsoft introduced a feature termed LSA Protection. This feature is based on the Protected Process Light (PPL) technology which is a defense-in-depth security feature that is designed to “prevent non-administrative non-PPL processes from accessing or tampering with code and data in a PPL process via open process… Continue reading Bypassing LSA Protection (aka Protected Process Light) without Mimikatz on Windows 10

Read More
cyber security companies | penetration testing | managed security service provider | cyber security consultant
June 7, 2020

Using Zeek to detect exploitation of Citrix CVE-2019-19781

Using the tool Zeek, formally known as bro, is a high-level packet analysis program. It originally began development in the 1990s and has a long history. It does not directly intercept or modify traffic, rather it passively observes it and creates high-level network logs. It can be used in conjunction with a SIEM to allow… Continue reading Using Zeek to detect exploitation of Citrix CVE-2019-19781

Read More