Explore the methodology, scope, and types of web application penetration testing in 2024. Learn to identify & address web app vulnerabilities & security threats.
SHARE
back to BLOG

Web Application Penetration Testing Guide: Tools & Techniques

James Harrison

Explore the methodology, scope, and types of web application penetration testing services in 2024. Learn to identify and address web app vulnerabilities and security threats.

According to recent statistics, 28% of all business activity is now conducted online and 71% of businesses have a web application. But these routes to market bring their own risks.

Frequent changes, updates and upgrades to websites and web apps leave them exposed to vulnerabilities.

According to Verizon, web application attacks make up 26% of breaches, and are now the second most common attack vector.

With so much business now conducted online, protecting your digital assets from attack is critical – but how do you go about it? The simple answer is with ongoing monitoring and regular web application penetration testing. Let's dive in.

What is web application penetration testing?  

Web application penetration testing, or pentesting, is where a security expert or security team tests a web application's security defenses by simulating attacks that a hacker might carry out.

Unlike a hacker, these ‘ethical' testers do this safely and legally, with the rules of engagement and the scope of the assessment agreed with the client beforehand.

What's the difference between web application penetration testing and vulnerability scanning?

Web application penetration testing is a manual, in-depth security test that evaluates your security posture at a specific point-in-time. An experienced penetration tester can find issues that are not detectable by machines, for example, by chaining several minor weaknesses together to discover a hidden critical vulnerability.

On the other hand, vulnerability scanning is automated and involves running thousands of security checks against your web app, producing a list of vulnerabilities with corresponding remediation advice. Web application vulnerability scanners can help you automate your security checks and provide continuous protection in the periods between manual in-depth tests.

The two services complement each other, so ideally you should do both for optimal web application security.

It’s important to point out though that penetration testers typically perform web app vulnerability scanning as part of a web application penetration testing service, so if you’re just getting started and want to gain an overview of the state of your security, you will benefit from running automated scanning first. Learn more about penetration testing vs vulnerability scanning.

Why is web application pentesting important?

Cybercrime is increasing, with attacks on web apps becoming more automated and indiscriminate.

Given the value of information that web apps can transmit and store, it's no wonder they're a target, and breaches can have far-reaching consequences, from fines and financial costs – the average cost of a data breach now stands at $4.35m – to damaged reputations.

Web app penetration testing is also integral to compliance. If you're found to be non-compliant with mandatory standards such as HIPAA or PCI, or in breach of contract by failing to adhere to ISO 27001 or SOC 2, lost business is the least of your worries because fines can be big. All of these standards require you to manage vulnerabilities and find and fix any weaknesses. Web application penetration testing will help you identify these threats so you can repair them before criminals can pounce.

Fixing every vulnerability can feel daunting, but a penetration testing report will include a list of vulnerabilities with a risk rating to gauge the severity of the weakness. By taking into account the application and the context in which the weakness can be exploited, and by which types of user, these risk ratings should help you prioritize your remediation efforts to where they matter most.

Depending on your IT environment, other types of penetration testing may also be important, such as external infrastructure testing, internal penetration testing, and API pen testing. Learn more about the different types of penetration testing.

Common web application security vulnerabilities

Web application vulnerabilities can range from low-risk issues like the disclosure of version information, all the way up to malicious code injection into the core functionality of your application.

Here are five of the most common types of attack that a web application penetration test can detect, and their potential impact:

SQL injection

In SQL injection attacks, attackers exploit vulnerabilities to execute malicious code in your database, carry out data theft, and potentially access everything else on your internal systems by backdooring the server.

XSS (cross site scripting)

A XSS attack occurs when an attacker is able to exploit flaws in how web applications handle user input. Malicious code is injected into trusted websites, which can lead to impactful consequences, such as hijacking of user accounts, especially when used with social engineering attacks.

Path traversal

These allow attackers to read files held on a system, allowing them to read source code, sensitive information, and capture credentials held within configuration files, and can even lead to remote code execution. The impact can range from malware execution to an attacker gaining full control of a compromised machine.

Broken authentication

This is an umbrella term for weaknesses in session management and credential management, where attackers masquerade as a user and use hijacked session IDs or stolen login credentials to access user accounts and use their permissions to exploit web app vulnerabilities.

Security misconfiguration

These vulnerabilities can include unpatched flaws, expired pages, unprotected files or directories, outdated software, or running software in debug mode.

How is penetration testing performed for web applications? 

Penetration testing methodology will differ slightly depending on the vendor. But these are the most common steps performed as part of the penetration testing process. 

Step 1: Planning and Preparation 

Firstly, your penetration testing vendor will help you determine the scope of your test. To establish this, they will often need to get a demo of the target system and gather information about your environment and business context of the application.  

Step 2: Reconnaissance 

In the reconnaissance phase, the pen tester will gather information about the application by exploring each feature from the perspective of each user.  They'll also map out important information such as the technologies in use, and take notes on notable features like file uploads and features taking user input which could be susceptible to injection attacks. 

Step 3: Vulnerability Enumeration 

In this step, the pen tester will manually explore the target system in-depth with an intercepting proxy to determine how the application behaves. They’ll use their experience to hone in on areas of the application which may be vulnerable to application layer weaknesses, and test them both manually and with automated scanners. This stage should include phases which test the various classes of weakness, such as authentication & authorization weaknesses, injection weaknesses, front-end weaknesses, and business logic mistakes.  

Step 4: Exploitation 

In the exploitation phase, the pen tester will attempt to exploit the identified vulnerabilities to  prove they could be exploited by an attacker. This step should include putting together ‘Proof of Concept’ examples and evidence, so it can be clearly demonstrated how the attack could be carried out.  

Step 5: Analysis and Reporting 

The pen tester will then analyze the results from the vulnerability enumeration phase to validate and prioritize vulnerabilities. This step involves assessing the potential impact and likelihood of successful exploitation for each identified vulnerability. 

A detailed report will be delivered that includes a summary of the penetration test, identified vulnerabilities, exploitation success, and recommendations for remediation. 

Should you consider continuous or point-in-time web app penetration testing?

This depends entirely on your needs – it's not as simple as point-in-time or continuous.

Any pentester worth his salt will ask what's driving your test. For example, if it's operational security, then continuous vulnerability scanning with human triage (like Intruder's Vanguard solution) could be the best choice because it ensures your security posture is assessed continually.

If you're making an acquisition, then point-in-time web app penetration testing may be better so you can understand any potential risks. Manual testing may also be specifically required to fulfill compliance requirements.

Other variables to think about is how you deliver software; if it's within a DevOps environment, then continuous testing is the only way to go. Your app will have frequent code deployments and updates which could introduce a vulnerability. Continuous testing will help trap these earlier than a once-a-year or point-in-time test. Let's look at both in more detail.

Point-in-time testing of web applications

Point-in-time penetration testing for web applications involves a security expert manually simulating various attack scenarios to assess the robustness of a web application's defenses. As mentioned already, they'll make detailed notes of their findings throughout their investigation and produce a list of recommendations.  

While many operations or services are becoming automated, penetration testing is one activity where humans still have the upper hand. This is because human hackers have the advantage of understanding the application's context.

For example, which users should and shouldn't be able to access which types of data, and which parts of the application are more or less sensitive. Plus, they're expert problem solvers and savvy spotters when it comes to recognizing potential vulnerabilities, coming up with creative solutions for maximum protection against malicious activity.  

But while these penetration tests can add a deeper layer of assurance to your company's security posture, it's only for a particular point in time - hence the name. The minute a developer writes insecure code, a component of the application is misconfigured, or a component of the app is changed, a whole host of new vulnerabilities may emerge that your pentest report didn't cover.

The solution is a form of pentesting that occurs far more frequently…

Continuous testing of web applications

These annual or six-monthly penetration tests provide in-depth assessments of your exposure at a particular point in time, but attack surfaces rarely stay the same for long.

Continuous penetration testing for web applications is increasingly necessary to close the gaps between these point-in-time assessments.

Sometimes known as automated penetration testing, continuous testing enables you to get an almost real-time assessment of your web app's security status so you can stay ahead of potential threats.

It's worth remembering that true penetration testing can't be fully automated - yet - but Intruder's new Premium plan goes further by providing rapid response to threats found ‘in the wild', prioritized scans of new and emerging threats, and best-in-class customer support – to provide continuous coverage of your digital assets.

For optimal web application security, a combination of continuous, automated vulnerability scanning and point-in-time penetration testing is best. This will give you unparalleled human expertise with continuous coverage of your systems so you can be sure your online assets are protected at all times.  

Automated web application security testing tools

If you're looking to get started with web application security testing, the following automated scanners will help you quickly identify any vulnerabilities. If you're looking for manual tools, read our our top penetration testing tools recommendations.

Intruder

Intruder's dynamic application security testing (DAST) scanner continuously monitors your web apps (whether its a single page or multi page app) and APIs for 75+ application vulnerabilities. This includes checks for OWASP Top 10 vulnerabilities, XSS, SQL injection, CWE/SANS Top 25, remote code execution, OS command injection, and more. It synchronizes with your cloud services, running hourly checks for new IP addresses or hostnames, and integrates with your CI/CD pipeline, compliance tools, ticketing tools and more.

Probely

Probely is a DAST scanner that claims to only report security vulnerabilities that matter. This reduces the risk of false positives, which are generated with simple instructions on how to fix the most pressing vulnerabilities. It integrates with your CI/CD pipeline and supports two-way sync with your issue tracking platform.

Acunetix

Acunetix uses a blend of dynamic application security testing (DAST) and interactive application security testing (IAST), providing extensive reach to protect sensitive data. This includes hard-to-scan places like password-protected areas and multi-level forms. The scheduling makes it simple to schedule one-time or recurring scans and the automations make it easy to prioritize high-risk areas.

Acunetix Web Vulnerability Scanner

How to choose a web app pentesting vendor

Start by looking for a web application penetration testing provider who has experience of your industry and the technologies your web app uses. If they aren't familiar with your current tools or tech stack, their testing may miss critical issues.

If you aren't sure, ask about the methodologies and techniques they use during the web application penetration testing process, as well as their overall approach to security. Transparency is key; you want a vendor who will be upfront and honest about their findings and recommendations.  

It's possible you'll be presented with a host of cybersecurity qualifications such as OffSec OSCP, CREST CCT APP, SANS, or LPT (Master). They're all valuable and demonstrate expertise, but there's no substitute for experience.  

Ultimately, the best option for your business should be a well-rounded approach: a team with the right expertise, proven experience, and a range of services to meet your needs. For more information, check out our guide to choosing a pen testing company.

Protect your web application with Intruder

With Intruder's continuous web application scanning technology and pentesting expertise, you can secure your web app easily no matter how big or small your organization is, with:  

Web application pen testing is a critical security practice for every business with a web presence. With the right automation and expertise in place, any business can carry out successful web application pentests and assure customers they take cybersecurity seriously.

Try Intruder today and protect your web applications or choose a time to chat with us for more information.

Release Date
Level of Ideal
Comments
Before CVE details are published
🥳
Limited public information is available about the vulnerability.

Red teamers, security researchers, detection engineers, threat actors have to actively research type of vulnerability, location in vulnerable software and build an associated exploit.

Tenable release checks for 47.43% of the CVEs they cover in this window, and Greenbone release 32.96%.
Day of CVE publish
😊
Vulnerability information is publicly accessible.

Red teamers, security researchers, detection engineers and threat actors now have access to some of the information they were previously having to hunt themselves, speeding up potential exploit creation.

Tenable release checks for 17.12% of the CVEs they cover in this window, and Greenbone release 17.69%.
First week since CVE publish
😐
Vulnerability information has been publicly available for up to 1 week.

The likelihood that exploitation in the wild is going to be happening is steadily increasing.

Tenable release checks for 10.9% of the CVEs they cover in this window, and Greenbone release 20.69%.
Between 1 week and 1 month since CVE publish
🥺
Vulnerability information has been publicly available for up to 1 month, and some very clever people have had time to craft an exploit.

We’re starting to lose some of the benefit of rapid, automated vulnerability detection.

Tenable release checks for 9.58% of the CVEs they cover in this window, and Greenbone release 12.43%.
After 1 month since CVE publish
😨
Information has been publicly available for more than 31 days.

Any detection released a month after the details are publicly available is decreasing in value for me.

Tenable release checks for 14.97% of the CVEs they cover over a month after the CVE details have been published, and Greenbone release 16.23%.

With this information in mind, I wanted to check what is the delay for both Tenable and Greenbone to release a detection for their scanners. The following section will focus on vulnerabilities which:

These are the ones where an attacker can point their exploit code at your vulnerable system and gain unauthorised access.

We’ve seen previously that Tenable have remote checks for 643 critical vulnerabilities, and OpenVAS have remote checks for 450 critical vulnerabilities. Tenable release remote checks for critical vulnerabilities within 1 month of the details being made public 58.4% of the time, but Greenbone release their checks within 1 month 76.8% of the time. So, even though OpenVAS has fewer checks for those critical vulnerabilities, you are more likely to get them within 1 month of the details being made public. Let’s break that down further.

In Figure 10 we can see the absolute number of remote checks released on a given day after a CVE for a critical vulnerability has been published. What you can immediately see is that both Tenable and OpenVAS release the majority of their checks on or before the CVE details are made public; Tenable have released checks for 247 CVEs, and OpenVAS have released checks for 144 CVEs. Then since 2010 Tenable have remote released checks for 147 critical CVEs and OpenVAS 79 critical CVEs on the same day as the vulnerability details were published. The number of vulnerabilities then drops off across the first week and drops further after 1 week, as we would hope for in an efficient time-to-release scenario.

Figure 10: Absolute numbers of critical CVEs with a remote check release date from the date a CVE is published

While raw numbers are good, Tenable have a larger number of checks available so it could be unfair to go on raw numbers alone. It’s potentially more important to understand the likelihood that OpenVAS or Tenable will release a check of a vulnerability on any given day after a CVE for a critical vulnerability is released. In Figure 11 we can see that Tenable release 61% their checks on or before the date that a CVE is published, and OpenVAS release a shade under 50% of their checks on or before the day that a CVE is published.

Figure 11: Percentage chance of delay for critical vulnerabilities

So, since 2010 Tenable has more frequently released their checks before or on the same day as the CVE details have been published for critical vulnerabilities. While Tenable is leading at this point, Greenbone’s community feed still gets a considerable percentage of their checks out on or before day 0.

I thought I’d go another step further and try and see if I could identify any trend in each organisations release delay, are they getting better year-on-year or are their releases getting later? In Figure 12 I’ve taken the mean delay for critical vulnerabilities per year and plotted them. The mean as a metric is particularly influenced by outliers in a data set, so I expected some wackiness and limited the mean to only checks released 180 days prior to a CVE being published and 31 days after a CVE being published. These seem to me like reasonable limits, as anything greater than 6 months prior to CVE details being released is potentially a quirk of the check details and anything after a 1-month delay is less important for us.

What can we take away from Figure 12?

Figure 12: Release delay year-on-year (lower is better)

With the larger number of checks, and still being able to release a greater percentage of their remote checks for critical vulnerabilities Tenable could win this category. However, the delay time from 2019 and 2020 going to OpenVAS, and the trend lines being so close, I am going to declare this one a tie. It’s a tie.

The takeaway from this is that both vendors are getting their checks out the majority of the time either before the CVE details are published or on the day the details are published. This is overwhelmingly positive for both scanning solutions. Over time both also appear to be releasing remote checks for critical vulnerabilities more quickly.

Written by

James Harrison

Recommended articles

Ready to get started with your 14-day trial?
try for free