Defense in Depth of a Single HTTP Parameter
By Red Siege | August 8, 2024
by Douglas Berdeaux, Senior Security Consultant
As cybersecurity professionals, we adhere to standard practices that ensure that we are absolutely as thorough as possible in our hunt for security vulnerabilities and, arguably more importantly: demonstrating the impact of identified vulnerabilities to prove the risk. If we don’t, then we are not penetration testing. That is more likely a vulnerability scan. If we are tasked with testing a single HTTP GET parameter for security weaknesses, then, what exactly does that mean? Well, it may seem simple, but it’s usually not. In fact, the assessment of a parameter is almost never limited to the parameter itself. Let’s consider the following example.
It’s Monday morning. We plop down into our chairs ready to hack the planet in our shiny new engagement only to see the scope of a single HTTP GET parameter, “foobarbaz.” OK, so we begin banging away at our keyboards and using automated tools to identify weaknesses in “foobarbaz” in a technique referred to as “fuzzing.” During this process, we identify that we can inject HTML into “foobarbaz” that gets reflected into and rendered on the HTTP response page. Awesome! OK, well now what? Well, after even more banging away at the key caps, through a lot of evasion techniques and trial and error, we finally get execution of a remotely hosted malicious JavaScript file. Hooray! 😊
As we continue in the process of vulnerability analysis, we might conjure up a few questions, such as:
What took so long to fully exploit the vulnerability?
Maybe we just hurdled over a web application firewall, perhaps.
Maybe we thwarted some secure coding practices.
How did we confirm that we can execute our malicious JavaScript?
Well, surely by reviewing the HTTP response page that executed our code.
Why did the execution of our code occur on the HTTP response page?
Does the page rely on an outdated application component that is allowing our injection attack to execute?
Did the developers make use of unsafe functions within a web application framework?
Why didn’t the Content Security Policy set by the server block our remotely hosted JavaScript file?
Perhaps there wasn’t one or it was lax in security.
Is the target web application accessible over a plain-text protocol?
Is there a lack of HTTP Strict Transport Security (HSTS)?
Can we exploit this XSS vulnerability without a valid session and generate an unauthenticated exploit for the application?
If a valid session is required, would it be possible to exploit this XSS vulnerability in a social engineering attack against the target’s employees to hijack sessions?
Are the target web application’s cookies accessible via JavaScript?
If so, can we forward the session data to an untrusted server?
This is not a complete list by any means, and should be left up to the imagination to carry on. But, as we can see, a simple single parameter test has unrolled many layers to expose other aspects (and possible weaknesses) of the target web application, that may be directly linked to our successful exploitation of the XSS vulnerability in “foobarbaz.” The questions in the list above pose topics of potential issues such as service misconfigurations, session management issues, authorization issues, web application firewall tuning issues, secure coding practice issues, and coding flaws in the HTTP response page that executed our code. Each one of these aspects of the web application requires review by the tester and if vulnerabilities are identified, new attack chains might be possible. For instance, what if we can exploit the fact that our input wasn’t properly validated or sanitized on the HTTP response page to perform client-side template injection?
When penetration testers identify exploitable vulnerabilities with parameters, such as our simple XSS example, we almost always identify issues within the code or the underlying technologies of the web application. This is why defense in depth is absolutely necessary to protect our web application data from falling into the hands of threat actors. Imagine if a social engineering attack via phishing that relied on the exploitation of our newly identified XSS vulnerability worked and we gained access to the web application as an administrator role. That would be devastating, right? Now, consider that if the web application had a few layers of security, we most likely wouldn’t have identified anything within the assessment window as we were tasked with assessing a single HTTP GET parameter.
A strict Content Security Policy HTTP security header would have stopped the execution of our remotely hosted script. This should be considered a second line of defense against XSS, though. If secure coding practices were also enforced and the use of anchored regular expression pattern matching were in place, we most likely would not have uncovered the reflected XSS vulnerability at all. Finally, if the web application firewall were tuned to block all XSS attempts, well, we’d be in the dark for sure.
About Douglas Berdeaux, Senior Security Consultant

Douglas was a manager of a Red Team for a consulting company and has performed penetration testing for clients with high security maturity on internal networks, internal and externally facing web applications, and desktop applications. Douglas was a full-stack enterprise-class web developer for close to a decade building, securing, and testing the security of business-critical web and mobile applications. He has taught cybersecurity as an adjunct professor for Duquesne University and has published multiple books and articles about penetration testing, hardware hacking, and programming.
Certifications:
OSWP, OSCP
Related Stories
View MoreBy Red Siege | November 5, 2026
by Jason Downey This is Dig Dug. A Red Siege tool for avoiding av/edr can offer valuable solutions for penetration testers and red teamers. If you spend any amount of […]
Learn MoreBy Red Siege | October 5, 2026
by Stuart Rorer Most weeks, the tests I run are fairly routine: web applications, externals, and internals with a tight scope. But mobile application assessments have a way of getting […]
Learn MoreBy Red Siege | October 1, 2026
by Mike Saunders The AWS ReadOnlyAccess policy might be providing more access than you’re intending to grant. On a recent assessment, we observed widespread use of IAM roles with the […]
Learn More