HackproofHacks
Fundamentals

What Is Penetration Testing? Types, Methodology and What You Get

Penetration testing is an authorised, manual attempt to break into your own systems the way a real attacker would, followed by a written report of what worked, how to reproduce it and how to fix it. It differs from a vulnerability scan because a person chains weaknesses together and tests business logic that software cannot judge.

A penetration test is a controlled attack. A tester is given written permission and a defined scope, then tries to reach data or functions they should not be able to reach, using the same techniques a criminal would. The value is the evidence: every finding is proven with steps you can repeat, so your team can fix it and confirm the fix.

This guide covers how a test runs, the main types, the standards testers work from, and what a useful report looks like, so you can judge a quote or a report on its merits.

How a penetration test runs

Every reputable engagement follows the same arc, whatever the target. The names vary between firms, but the work does not.

  1. 1

    Scoping and rules of engagement

    You and the tester agree what is in scope (applications, APIs, IP ranges, user roles), what is off limits, the testing window and who to call if something breaks. This is also where permission is documented.

  2. 2

    Reconnaissance

    The tester maps the attack surface: subdomains, exposed services, technologies, API endpoints and public leaks. Much of this is passive and never touches your servers.

  3. 3

    Testing and exploitation

    Weaknesses are probed and, where safe, exploited to prove impact. For web targets this centres on broken access control, authentication flaws, injection and business-logic abuse.

  4. 4

    Post-exploitation analysis

    The tester checks how far one finding can be pushed: whether a low-privilege account can reach another tenant, whether a leaked key opens other systems.

  5. 5

    Reporting

    Findings are written up with severity, reproduction steps, evidence and remediation advice, plus a plain-language summary for non-technical readers.

  6. 6

    Retest

    After your team fixes the issues, the tester confirms each fix and updates the report. Many compliance audits expect this evidence.

Black box, grey box and white box testing

The three types describe how much the tester knows before starting. None is better in the abstract. The right choice depends on what you want to learn.

TypeWhat the tester starts withBest for
Black boxOnly the target name or URL, like an outside attackerSeeing what an unauthenticated attacker can reach from the internet
Grey boxNormal user accounts and basic documentationMost web app and API tests: efficient and realistic for a logged-in attacker
White boxSource code, architecture diagrams and admin accessThe deepest coverage, often paired with a code review

What gets tested

  • Web applications: access control, authentication, session handling, injection and logic flaws, usually mapped to the OWASP Top 10.
  • APIs: object-level authorisation, mass assignment, rate limiting and token handling.
  • External networks: exposed services, outdated software and misconfigured infrastructure reachable from the internet.
  • Cloud environments: IAM permissions, storage exposure and misconfigured services.
  • Mobile apps: local data storage, transport security and the backend API the app talks to.

Standards testers work from

Good testers follow published methodology, not improvisation. The OWASP Web Security Testing Guide is the standard reference for web applications, NIST SP 800-115 describes technical security testing in general, and the Penetration Testing Execution Standard (PTES) lays out the phases of an engagement. Ask any vendor which one they follow. A vague answer is a warning sign.

Penetration test vs vulnerability scan

A scanner compares your systems to a list of known issues and reports matches. A penetration tester asks what an attacker could actually do. Scanners miss broken access control and logic flaws entirely because those depend on how your application is meant to behave. Scans are a useful routine check. They are not a substitute for a test.

When you need one

  • A customer, auditor or investor has asked for an independent test (common with SOC 2, ISO 27001, PCI DSS and HIPAA).
  • You are about to launch a product that handles logins, payments or personal data.
  • You shipped a major change to authentication, billing or multi-tenant logic.
  • It has been more than a year since the last test.

Frequently asked questions

Is penetration testing legal?

Yes, when it is authorised in writing by the owner of the systems and kept within the agreed scope. Testing a system you have no permission to test is a crime in most countries, which is why scoping and a signed agreement come first.

How long does a penetration test take?

A focused web application or API test typically takes one to two weeks of testing, plus time for reporting and scheduling. Larger scopes with several applications, roles or environments take longer.

Will a penetration test break my systems?

Testers avoid destructive actions and agree a testing window and safe-handling rules in advance. Risk is low but not zero, which is why production tests are scoped carefully and you get an emergency contact.

How often should I run a penetration test?

At least once a year, and after major changes to authentication, payments, permissions or architecture. Compliance frameworks often expect an annual test.

What is the difference between a pentest and a red team exercise?

A penetration test looks for as many weaknesses as possible in a defined scope. A red team exercise pursues a specific goal, such as reaching customer data, using any approach including social engineering, and also tests whether your team detects and responds.

Related guides

Related services

Ready to scope your test?

Book a free 30-minute scoping call. We agree the scope, timeline, and a fixed price up front, with no obligation and no surprises for your deadline.