Skip to main content
Legia

Cybersecurity

What Determines the Cost of Penetration Testing

The cost of penetration testing is not determined by the number of findings, but by the scope and the testing time. This guide explains the factors and the data to prepare before requesting a quote.

SEO and Content Specialist

6 min read Reviewed by Legia Cybersecurity Team

An open padlock on a keyboard in blue light

Short answer: the cost of penetration testing is determined by the tester’s working time, and that time is determined by scope: how many websites or applications are tested, how large the applications are, how many user roles are included, the chosen method (black box, grey box, or white box), whether testing happens in production, and extras such as a social engineering simulation. The number of findings does not determine the cost. Also make sure retesting after fixes is included in the quote.

Questions about the cost of penetration testing usually come up while a budget is being prepared, or when two quotes with very different figures have to be compared. Both are hard to answer without understanding what is actually being counted. This guide explains the factors that raise or lower the cost, how to compare quotes fairly, and the data to prepare so the quote you receive is accurate. It deliberately gives no figures: the amount can only be calculated once the scope is clear.

Why is penetration testing cost calculated from scope?

Penetration testing is manual work: the tester maps the application, tries to break in, proves the impact, then writes a report. The cost follows the number of working days needed, and that number depends on scope. The Penetration Testing Execution Standard (PTES), one of the methodologies referenced in the OWASP Web Security Testing Guide, treats time estimation as a key part of the scoping stage, before testing starts.

That is why a good quote is always preceded by questions about your system. A quote that comes out immediately without any questions is usually a fixed package, and its content needs closer checking: how many days of manual testing are actually covered.

Illustration: security testing

The main factors that determine penetration testing cost

FactorWhy it affects costWhat you need to prepare
Number of websites or web applicationsEach application is mapped and tested separatelyA list of addresses and the functions of each application
Size of the applicationMore dynamic pages, forms, uploads, and APIs mean more input points to testAn estimate of the number of dynamic pages and a list of APIs
Number of login systems and user rolesEach role is tested for whether it can exceed its rightsA list of roles (for example customer, staff, admin) and test accounts
Testing methodGrey box and white box take time to work through accounts, documentation, or source codeThe method decision, documentation, code access if white box
Production or copy environmentTesting in production is more careful and often scheduled outside working hoursThe environment decision and the testing time window
Social engineering simulationSeparate work with its own written approvalLeadership approval and the list of targets
RetestingTesting again after fixes takes extra working daysMake sure it is included, and for how long it remains available

The first five factors and the social engineering factor are the basis of calculation used on Legia’s Penetration Testing service page. The PTES pre-engagement questionnaire for web applications asks similar questions: the number of applications, the number of login systems, the approximate number of static and dynamic pages, whether source code and documentation are available, and whether role-based testing is wanted.

Testing method: its effect on cost and results

The method determines how much information the tester is given, and therefore affects both the time and the kind of flaws that can be found.

  • Black box: the tester starts with no information. Part of the time goes into mapping what could have been provided at the start.
  • Grey box: the tester is given regular user accounts, so access-control flaws between users are tested too. Time increases with the number of roles.
  • White box: the tester gets code and documentation access. The examination is the most thorough, and its time depends on the size of the code reviewed.

A method with less information is not automatically more economical, because mapping time increases while flaw coverage may decrease. A full comparison of the three is in the article Black Box, Grey Box, or White Box.

Factors outside the application that are often forgotten

Some things do not show up in the application list but still affect the schedule and the cost:

  • The testing time window. PTES notes that some customers ask for testing outside business hours. A narrow window makes testing take more calendar days.
  • Cloud and hosting provider permission. The rules differ by provider. AWS, for example, allows testing of a number of services without prior approval, but prohibits certain activities such as denial of service attacks and request flooding. Shared hosting providers may have stricter rules.
  • Scope changes mid-way. PTES calls scope creep a major risk and recommends putting every addition in a new statement of work. Applications or modules added after testing has started almost always add cost.
  • Readiness on your side. Late test accounts, a copy environment that is not ready, or emergency contacts who cannot be reached leave the tester waiting.

How to compare two quotes

Very different figures usually mean the work itself is different. Compare the following, not just the final figure:

QuestionWhy it matters
How many days of manual testing are covered?Automated scanning alone is not penetration testing
Which method, and how many user roles are tested?Grey box with one role is very different from three roles
What does the report contain?Reproduction steps and the attack path make findings fixable
Is retesting included, and for how long?PTES recommends writing a retesting deadline into the contract
How is the report kept confidential?The report is a map of the gaps in your system

How to reduce cost without lowering quality

  1. Start with the most important systems, such as applications that store customer data or are exposed to the internet, rather than testing everything at once.
  2. Use grey box for applications with user accounts, to save the time spent mapping from scratch.
  3. Prepare test accounts, documentation, and emergency contacts before the start date. The full list is in the article Preparing for Penetration Testing.
  4. Lock the scope in writing before testing starts.
  5. Consider Vulnerability Assessment to map flaws across many assets at once, then penetration testing only on the most critical systems.

How Legia calculates it

At Legia, the cost of Penetration Testing is calculated from the number and size of the websites tested, not from the number of findings. The basis of calculation: the number of websites or web applications, the method used, the number of user roles tested, the need to test in production, and a social engineering simulation if requested. The scope is locked in writing before testing starts, and retesting after fixes is included. The whole process usually takes 3 to 6 weeks, with the testing itself taking 5 to 10 working days. Testing currently focuses on websites and web applications, including the APIs they use. Other security services are on the Cyber Security page.

Frequently asked questions

Can the cost of penetration testing go up if there are many findings?

It should not. What is counted is the testing time within the agreed scope. What can add cost is a wider scope, for example applications or modules added mid-way.

Why can two providers’ quotes differ so much?

Usually because the content differs: the number of days of manual testing, the method, the number of roles tested, the report contents, or whether retesting is included. Ask both for a written scope breakdown, then compare them using the table above.

Is retesting usually charged separately?

It depends on the provider. Ask from the start whether retesting is included, how many times, and until when it can be requested. At Legia, retesting after fixes is included in the package.

Can vulnerability assessment replace penetration testing?

Not fully. Vulnerability assessment maps flaws as widely as possible without exploiting them, while penetration testing proves the real impact of specific flaws. The two are often used one after the other.

Sources

Category Cybersecurity

Keep reading

Related articles

All Articles