What is penetration testing?

Penetration testing (a pen test) is an authorised, simulated attack on an application, network or cloud setup by security testers to find and prove exploitable weaknesses before real attackers do, with a report of findings and fixes.

Also called pen test, pentest, pen testing, ethical hacking, VAPTUpdated

Automated scanners find known patterns. They don't notice that changing an order ID in a URL shows another customer's invoice, or that a discount code can be applied twice by sending two requests at once. Penetration testing puts a skilled person in the attacker's seat, with written permission and an agreed scope, to find weaknesses like these and prove they can be exploited. A pen test is a point-in-time check. It complements continuous testing such as SAST and DAST in the pipeline. It doesn't replace it.

Types of penetration test

  • Web application and API: authentication, authorisation, business logic, injection, session handling. The most common test for software products.
  • Mobile app: local storage, certificate pinning, reverse engineering, and the APIs behind the app.
  • Network and infrastructure: external (from the internet) and internal (from inside the network).
  • Cloud configuration: IAM, storage exposure, network rules, secrets.
  • Black, grey or white box: testers get no information, a normal user account, or source code and architecture. Grey box gives the best coverage per day for most products.

Penetration testing methodology

Most testers follow a published methodology such as the OWASP Web Security Testing Guide, NIST SP 800-115 or PTES. The phases are similar:

  1. Scoping and rules of engagement: targets, test accounts, dates, what's off limits, emergency contacts.
  2. Reconnaissance: mapping endpoints, roles, technologies and data flows.
  3. Vulnerability discovery: automated scans plus manual testing.
  4. Exploitation: proving impact safely, for example reading one record rather than dumping a table.
  5. Reporting: each finding with severity, evidence, steps to reproduce and a fix.
  6. Retest: confirming the fixes work.

Example: a lending app's pre-launch test

A grey-box test of a loan app's API, using two borrower accounts, finds:

Finding Severity What the tester did
Broken object-level authorisation Critical Changed GET /loans/10482/statement to /loans/10483/statement and downloaded another borrower's statement
Race condition on referral bonus High Sent 20 parallel redeem requests; the bonus was credited 3 times
No rate limit on OTP verification High Tried 1,000 codes in under two minutes
Verbose error messages Low Stack traces revealed framework versions
The team adds object-level checks to every endpoint, a unique constraint on redemptions and rate limiting on OTP attempts. The retest confirms the fixes, and an automated test is added for each finding so it can't come back.

When it's required

  • PCI DSS v4.0.1 requirement 11.4 asks for internal and external penetration tests at least once every 12 months and after significant changes, by a qualified, organisationally independent tester.
  • SOC 2 and ISO 27001 don't set a fixed interval, but auditors and enterprise customers usually expect a recent report.
  • HIPAA: HHS's January 2025 proposed Security Rule update would require yearly penetration tests. It is still a proposal.
  • India: some government, regulated and ABDM work requires testing by CERT-In empanelled auditors.
  • EU finance: under DORA, some financial entities must run threat-led penetration testing (TLPT).

Pen test vs VAPT vs vulnerability scan

A vulnerability scan is automated and lists possible issues. VAPT (vulnerability assessment and penetration testing), the term common in India, combines a scan with manual exploitation. A pen test focuses on proving real impact. For budgeting and scoping, see QA, test automation and penetration testing cost, or our quality engineering work.

Any idea in mind? Let's make it real.

Tell us what you're building. You'll hear back from an engineer, not a sales team, usually within one working day.

Book a 30-min call