Status DataClose notification

What Is Penetration Testing? How It Works, What You Get, and When to Test

Alex Horlan
Alex Horlan
СТО HackenProof

Penetration testing (pen testing) is an authorized, simulated cyberattack in which security experts try to exploit weaknesses in your applications, APIs, networks, or cloud, then report what they broke, how they did it, and how to fix it. Unlike an automated scan, a pentest shows what a real attacker could actually do with your systems.


What Is Penetration Testing?

A penetration test is a time-boxed security assessment in which ethical hackers attack your systems the way a real adversary would, but with your permission, within an agreed scope, and with every step documented. NIST SP 800-115 defines it as security testing in which evaluators "mimic real-world attacks in an attempt to identify ways to circumvent the security features of an application, system, or network."

In plain terms, pen testing means hiring skilled attackers to break in before someone else does. They chain weaknesses together, escalate access, and show exactly how far an intruder could get.

What is the primary goal of penetration testing?

The goal is to prove real, exploitable risk rather than list theoretical vulnerabilities. A scanner can tell you that a server runs an outdated library. A pentester tells you that the outdated library, combined with a misconfigured API and a weak password policy, lets an outsider read your customers' payment data. That difference is what lets your team prioritize fixes by business impact.

How a pentest differs from a real attack

Real attack Penetration test

Permission

None

Written authorization from the system owner

Scope

Anything reachable

Agreed targets, techniques, and exclusions

Timing

Unannounced, open-ended

Time-boxed test window

Outcome

Data theft, fraud, downtime

A report with evidence and fixes

Damage

Intentional

Avoided by design (rules of engagement)


Why Companies Invest in Penetration Testing

Companies pentest because finding a flaw yourself costs a fraction of what an attacker's version of the same discovery costs. According to IBM's 2026 Cost of a Data Breach report, the global average breach now costs $4.99 million, up 12% year over year, and $6.3 million in the financial sector. A pentest typically costs a small fraction of that.

The benefits of penetration testing go beyond avoiding breaches:

  • Find exploitable flaws before attackers do. Pentesters surface the business-logic bugs, access-control gaps and chained exploits that automated tools miss.
  • Pass audits and meet regulators. PCI DSS, DORA and many crypto licensing regimes expect regular penetration testing, and SOC 2 and ISO 27001 auditors look for it as evidence.
  • Close enterprise deals faster. Security questionnaires from large customers routinely ask for a recent third-party pentest report or attestation letter.
  • Satisfy investors, partners and insurers. Due diligence teams and cyber insurers increasingly ask how, and how recently, your security was tested.
  • Validate big changes. A new product, a major release, a cloud migration or an acquisition all change your attack surface overnight.
  • Prioritize security spend. A pentest ranks risks by real-world impact, so engineering time goes to the fixes that matter.

How Does Penetration Testing Work? The 5 Stages

Most penetration tests follow five stages, from agreeing on the scope to confirming the fixes. Established methodologies such as PTES and the OWASP Web Security Testing Guide describe the same basic flow. Your team is actively involved at the start and end; the middle is the testers' work.

1. Scoping and rules of engagement

You and the provider agree on what gets tested (domains, apps, APIs, cloud accounts), what's off-limits, the test window, the access level and who to call if something breaks. Your role: name the assets that matter most, share credentials or documentation if it's a grey- or white-box test, and sign the authorization.

2. Reconnaissance

Testers map the attack surface: subdomains, exposed services, technologies, API endpoints, user roles and any leaked information. The better the map, the more realistic the attack.

3. Discovery and exploitation

This is the core of the work. Testers combine automated tools with manual techniques to find weaknesses, then try to exploit them: bypassing authentication, escalating privileges, accessing other users' data, or chaining low-severity issues into a serious one.

4. Validation and reporting

Every finding is reproduced and confirmed, rated by severity and documented with evidence and fix guidance. Good providers share confirmed critical issues as soon as they are found rather than waiting for the final report.

5. Remediation and retest

Your engineers fix the issues. The testers then retest to confirm each fix works and update the report. Your role: fix, then request the retest before the report goes to an auditor or customer.

For how HackenProof runs these stages, from a scoping call to a fixed-price quote and a branded final report, see our penetration testing services.


Types of Penetration Testing

Pentests are classified in two ways: by how much the testers know going in, and by what they attack. Most engagements combine one access level with one or more targets, for example a grey-box test of a web app and its API.

By access level: black-box, grey-box and white-box

Type What testers get What it simulates Choose it when

Black-box

Nothing beyond a target URL or IP range

An external attacker with no inside knowledge

You want an outsider's view of your perimeter

Grey-box

A standard user account, partial documentation

A malicious customer or a compromised account

You want realistic depth on a limited budget (the most common choice)

White-box

Source code, architecture diagrams, admin credentials

An insider or an attacker who has already gained access

You need maximum coverage before a launch or audit

Black-box testing is the most realistic, but testers spend much of the window on reconnaissance. White-box testing finds the most issues per hour. HackenProof offers all three white-box, grey-box and black-box pentests.

By target

  • Web and mobile applications: authentication, session handling, access control and the OWASP Top 10 on web, iOS and Android apps.
  • APIs: REST and GraphQL authorization, broken object-level access (IDOR), rate limiting and data exposure.
  • Cloud infrastructure: IAM misconfigurations, exposed storage and privilege escalation in AWS, GCP or Azure.
  • Networks: external tests of internet-facing systems, and internal tests of what an attacker could reach once inside.
  • Blockchain and Web3: dApps, bridges, wallet interactions and the off-chain infrastructure around them, often paired with smart contract and blockchain audits.
  • AI applications and agents: prompt injection, data leakage and abuse of the tools and permissions an LLM agent is given.
  • Social engineering and physical: phishing campaigns and on-site access attempts that test people and processes, not just technology.

What Do You Get From a Penetration Test?

The end result of a penetration test is a report: a record of what was tested, what was found, how serious each issue is and how to fix it. It is also the document your auditors, customers and board will read, so its quality matters as much as the testing itself.

A good pentest report includes:

  1. Executive summary: overall risk posture and finding counts by severity, in language a non-technical reader can act on.
  2. Scope and methodology: the assets, dates, access level and standards followed (for example PTES and OWASP).
  3. Findings list: every confirmed issue with an ID, title, severity and status.
  4. Finding details: description, affected assets, evidence or proof of concept, business impact and step-by-step remediation guidance.
  5. Retest results: confirmation that each fix works, so the report shows resolved issues rather than an open list.

What this looks like in practice

HackenProof's sample penetration test report covers a four-week test (February 21 to March 19, 2026) of a trading platform's web apps, mobile apps, APIs and WebSocket services. It followed PTES and the OWASP Web Security Testing Guide, OWASP Top 10 (2021) and OWASP API Security Top 10 (2023). Four researchers found 28 issues: 8 High, 8 Medium and 12 Low, all resolved by the end of the engagement.

ID Finding Severity Status

TEST-30

Active API credentials exposed in public SDK sample

High

Resolved

TEST-25

IDOR vulnerability allows unauthorized bonus recovery

High

Resolved

TEST-21

OS command injection via unsanitized user input

Medium

Resolved

TEST-15

Lack of rate limit on listing application

Low

Resolved

The IDOR (insecure direct object reference) finding shows why manual testing matters. No scanner flags "a user can claim bonuses that belong to someone else" because the request looks perfectly valid. It takes a human who understands the business logic to see that it is money walking out the door. Every finding in a HackenProof engagement goes through vulnerability triage before it reaches your team, so you only act on confirmed, reproducible issues.


How Often Should You Run a Penetration Test?

Run a penetration test at least once a year, and again after any significant change to your systems. That baseline mirrors PCI DSS, which requires internal and external pentests "at least once every 12 months" and "after a significant infrastructure or application upgrade or change." Most other frameworks and customer questionnaires expect a similar cadence.

Significant changes that should trigger an extra test:

  • Launching a new product, app or public API
  • A major release that touches authentication, payments or access control
  • Migrating to a new cloud provider or architecture
  • An acquisition or integration of another company's systems
  • A serious security incident, once it is contained

If you ship weekly, an annual test is a snapshot of a system that no longer exists by the time the report lands. High-change teams usually pair periodic pentests with continuous coverage, such as a bug bounty program, so that new code keeps getting tested between formal engagements.


Which Regulations Require Penetration Testing?

Framework Explicitly required? Minimum frequency Notes

PCI DSS v4.0.1

Yes (Req. 11.4)

Every 12 months and after significant changes

Service providers must also test segmentation every 6 months

DORA (EU financial entities)

Yes

Yearly testing of systems supporting critical or important functions; threat-led penetration testing (TLPT) at least every 3 years for designated entities

Applies since January 2025, including crypto-asset service providers licensed under MiCA

NYDFS Part 500 (New York)

Yes

Annually

Covers banks, insurers and other NYDFS-licensed firms

VARA (Dubai)

Yes

Annually and before launching new systems

Technology & Information Rulebook

MAS (Singapore)

Yes

Annually

Technology Risk Management (TRM) Guidelines

SOC 2

No

Annual in practice

CC4.1 lists penetration testing as one possible evaluation, and auditors expect one

ISO/IEC 27001:2022

No

Annual in practice

Commonly used as evidence for Annex A controls 8.8 and 8.29

HIPAA

Not yet

Every 12 months, if the proposed update passes

The Security Rule update proposed in January 2025 was still not final in September 2026

NIS2 (EU)

No

Set by national law

Article 21 requires assessing the effectiveness of security measures, and pentests are the usual evidence

Three points buyers often get wrong:

If you run a crypto exchange or another virtual-asset business, see our overview of crypto exchange regulations by jurisdiction. The regulator table on our pentest page covers 14 jurisdictions, from Japan's FSA to Saudi Arabia's CMA.

Regulations change often. Check the current text with your compliance team or auditor before you plan your testing calendar around it.


Penetration Testing vs. Vulnerability Scanning, Red Teaming and Bug Bounty

These four approaches answer different questions, and mature security programs use more than one. A scan asks what might be wrong, a pentest proves what is exploitable, a red team tests whether you would notice, and a bug bounty keeps testing continuously.

Vulnerability scanning Penetration testing Red teaming Bug bounty

Goal

List known weaknesses

Prove exploitable risk in a defined scope

Test detection and response against a realistic adversary

Continuous discovery from a large pool of researchers

Who

Automated tools

A small team of vetted experts

A specialist offensive team

Many independent researchers

Depth

Broad, shallow

Deep, time-boxed

Deep, goal-driven, stealthy

Varies, often very deep on high-value targets

Cadence

Weekly to monthly

Yearly and after major changes

Every 1–3 years

Always on

Pricing

Subscription

Fixed price per engagement

Fixed price per engagement

Pay per valid finding

Best for

Hygiene between tests

Compliance, launches, audit evidence

Mature teams testing their SOC

Fast-shipping products with a large attack surface

Penetration testing vs. vulnerability scanning

A vulnerability scan is automated and matches your systems against known issues. It is cheap and fast, but it produces false positives and cannot judge business logic. A pentest uses those tools as a starting point, then has humans confirm, exploit and chain what they find. Standards such as PCI DSS require both: quarterly scans and annual pentests.

Penetration testing vs. red teaming

A pentest tries to find as many exploitable issues as possible in a defined scope. A red team engagement pursues one objective, such as reaching customer data, by any means, often including phishing, while staying undetected. It tests your people and monitoring as much as your code, and makes most sense once regular pentesting is already in place.

Penetration testing vs. bug bounty

A pentest gives you guaranteed coverage of a defined scope within fixed dates, at a fixed price, with a report your auditor will accept. A bug bounty gives you continuous testing by far more researchers than any pentest team, and you pay only for valid results (see how bug bounty programs work). They complement each other: the pentest provides depth and audit evidence at set points, and the bounty catches what ships in between. HackenProof runs both, so you can combine them under one platform.


How to Choose a Penetration Testing Provider

The right provider is the one whose testers match your technology and whose report your auditors and customers will accept. Price matters, but a cheap test that misses a critical bug is the most expensive option. Ask every shortlisted provider these questions:

  1. Who will actually test our systems, and how are they vetted? Look for named, experienced testers with a track record, not an anonymous junior team.
  2. Which methodology do you follow? Expect a recognized standard such as PTES, the OWASP testing guides or NIST SP 800-115.
  3. How much of the work is manual? Automated tools are a starting point. Business-logic and access-control flaws need humans.
  4. Can we see a sample report? Check that it has a readable executive summary, clear severity ratings and actionable fixes.
  5. Is a retest included? Without one, your report lists open issues instead of resolved ones.
  6. Will the report satisfy our auditor or regulator? Ask about attestation letters and mapping to SOC 2, ISO 27001, PCI DSS or DORA.
  7. How fast can you start, and how will we see findings? Critical issues should reach you as soon as they are confirmed, not weeks later in a PDF.
  8. Do you know our stack? Web3, AI agents, fintech APIs and mobile apps each need specialist skills.

What drives the price of a pentest?

Pentest pricing depends mostly on scope: the number of applications, endpoints, user roles and environments in play. Access level matters too, since white-box tests take longer but find more, and so do the need for a retest, compliance-specific reporting and how quickly you need to start. A clear scoping call before the quote is the best protection against both overpaying and under-testing.


Is Penetration Testing Being Replaced by AI?

No, but AI is changing how it's done. AI-powered tools now speed up reconnaissance, triage and the discovery of common vulnerability patterns, which frees human testers to spend more time on deep work. Attackers use the same tools: IBM's 2026 report found that AI-driven attacks added an average of $1 million to the cost of a breach.

What AI still can't do reliably is understand intent. The IDOR in the sample report above, a valid-looking request that pays out someone else's bonus, only looks wrong to someone who understands how the business is supposed to work. Chained exploits and authorization flaws have the same problem. The strongest approach combines both: AI security agents for speed and breadth, and expert testers for depth and judgment.


FAQ

What is a pen test in simple terms?

A pen test is a hired, legal hacking exercise. Security experts try to break into your applications or networks the way a criminal would, then tell you exactly what they got into and how to close the gaps.

How long does a penetration test take?

Most pentests involve one to three weeks of active testing, depending on scope. Large multi-platform engagements can run a month: the web, mobile and API test in HackenProof's sample report ran four weeks. Scoping, reporting and the retest add time on either side.

Yes, when the system owner authorizes it in writing and the testers stay within the agreed scope. The same activity without permission is unauthorized access and a crime in most countries, which is why the rules of engagement are signed before any testing starts.

Can a pentest break my production systems?

It's rare. Rules of engagement exclude destructive techniques such as denial-of-service attacks unless you ask for them, and fragile systems can be tested in staging instead. A good provider also names a contact who can pause testing immediately if something behaves unexpectedly.

Does SOC 2 require penetration testing?

Not explicitly. The SOC 2 criteria list penetration testing as one possible way to evaluate controls, but auditors expect to see one, and most enterprise customers will ask for your latest pentest report during security reviews.

What's the difference between a pentest and a vulnerability assessment?

A vulnerability assessment identifies and ranks potential weaknesses, mostly with automated tools. A penetration test goes further: experts actively exploit those weaknesses to prove what an attacker could really do, which removes false positives and shows real business impact.

Share article:
More topics:

Read more on HackenProof Blog