Types of Penetration Testing

Penetration tests are classified three ways. By tester knowledge: black box, grey box and white box. By target: external network, internal network, web application, API, mobile application, cloud, AI and LLM applications and social engineering. By approach: vulnerability assessment, penetration test and red team. Most organizations need two or three types.

Sherlock Forensics has run penetration tests since 2010. The first question most buyers ask is which type they need. The answer depends on what you want tested, how much the tester should know going in and how adversarial the test should be. Those three questions give the three ways every penetration test is classified.

Three Ways to Classify a Penetration Test

ClassificationTypes it coversQuestion it answers
By tester knowledgeBlack box, grey box, white boxHow much does the tester know before starting?
By targetExternal network, internal network, web application, API, mobile application, cloud, AI and LLM applications, social engineeringWhich part of the attack surface is tested?
By approachVulnerability assessment, penetration test, red teamHow deep and how adversarial is the test?

A real engagement sits somewhere on all three axes at once. A typical SaaS test is a grey box web application and API penetration test, for example, while a red team is usually black box and spans several targets.

Black Box, Grey Box and White Box Testing

When people ask for the three types of penetration testing, they usually mean these. The difference is how much information and access the tester gets before the test begins.

Black box testing
The tester starts with only what an outside attacker would have: a company name, a domain or a range of IP addresses. It shows what an attacker can find and exploit from zero knowledge. The trade-off is time: hours spent on discovery are hours not spent testing deeper, so a black box test covers less of each system for the same budget. Use it for external perimeter tests and when you want an attacker's view of your exposure.
Grey box testing
The tester gets partial knowledge, typically user accounts at one or more privilege levels and a short description of the architecture. This is the most common choice for web application and API tests because it measures what a logged-in user or a stolen account can reach. It balances realism against coverage.
White box testing
The tester gets full access to source code, architecture diagrams, configuration and administrative credentials. It finds the most issues per hour of testing, including flaws a black box tester would never reach. It suits pre-release reviews of code-heavy applications. It says less about what an outsider would find first.

Types of Penetration Testing by Target

Each target type uses its own methodology and catches a different class of weakness. Most organizations need more than one. For what each type costs in Canada, see the penetration testing pricing guide.

External Network Penetration Testing

An external network penetration test targets your internet-facing infrastructure: public IP addresses, firewalls, mail servers, DNS servers, VPN gateways and any other service reachable from the internet. The tester simulates an attacker with no prior access probing your perimeter from outside.

When to use it: any organization with public-facing infrastructure. PCI DSS also requires one every year. External tests find misconfigured services, unpatched software, weak encryption and exposed management interfaces. Sherlock Forensics runs external network penetration tests remotely.

Internal Network Penetration Testing

An internal network penetration test simulates an attacker who already has a foothold inside your network, perhaps through a phished employee, a compromised VPN credential or a rogue insider. The tester works from inside the perimeter and tries to escalate privileges, move laterally between systems and reach sensitive data.

When to use it: you run an office network, an Active Directory environment or internal services that only employees should reach. Internal tests reveal weak network segmentation, privilege escalation paths, insecure internal services and poor credential handling. Internal testing needs VPN access or a device such as ShadowTap shipped to your office. See how the ShadowTap internal penetration test works.

Web Application Penetration Testing

Web application penetration testing covers the features users reach through a browser: login pages, dashboards, forms, file uploads, search and payment flows. It is the most common type of penetration test because web applications are the largest attack surface for most organizations.

When to use it: before a major release, when a customer security questionnaire asks for a recent test and for SOC 2 evidence. The tester follows the OWASP Web Security Testing Guide, checking for injection, broken authentication, broken access control, security misconfiguration and cross-site scripting. Manual testing of business logic matters most, because automated scanners cannot tell what your application is supposed to do. Web application tests at Sherlock Forensics start at $1,500 USD for quick audits.

API Penetration Testing

API penetration testing examines the interfaces your frontend, mobile app and third-party integrations use to exchange data. APIs carry authentication, data retrieval and business logic, often with less scrutiny than the web frontend.

When to use it: your application exposes a REST API, a GraphQL API or any other programmatic interface. Testing follows the OWASP API Security Top 10. Common findings include broken object-level authorization (reading another user's data by changing an ID), excessive data exposure and missing rate limits. Many API flaws cannot be found by testing the web frontend alone. SaaS platforms can pair API testing with SaaS penetration testing, which adds tenant isolation checks.

Mobile Application Penetration Testing

Mobile application penetration testing examines iOS and Android apps: the application binary, data stored on the device, network traffic and authentication. Typical findings are credentials stored in plaintext, hardcoded secrets in the binary, weak certificate validation and sensitive data leaking through backups or screenshots.

When to use it: your mobile app handles sensitive data or business functions. The reference methodology is the OWASP Mobile Application Security Testing Guide (MASTG).

Cloud Security Testing

Cloud security testing examines AWS, Azure or Google Cloud environments for misconfigurations: overly permissive IAM policies, exposed storage buckets, insecure serverless functions and network rules that allow unrestricted access. Under the shared responsibility model the provider secures the platform, but your configuration is yours to secure.

When to use it: your infrastructure runs on a public cloud, especially after a migration. Common findings include storage buckets with public read access, roles with excessive permissions, unencrypted databases and logging that misses critical events. Sherlock Forensics delivers cloud security assessments against your live configuration.

AI and LLM Application Testing

AI and LLM application testing targets features built on large language models: chat assistants, retrieval systems and agents that call tools. The main risks are prompt injection, sensitive data disclosure through model output, insecure handling of model output and excessive agent permissions.

When to use it: before you launch an AI feature that touches customer data or can take actions. Testing maps to the OWASP Top 10 for LLM Applications. Sherlock Forensics offers AI and ML security testing, including prompt injection testing.

Social Engineering and Phishing

Social engineering testing evaluates your human defences. The most common form is a simulated phishing campaign: the testing team sends realistic phishing emails and measures who clicks, who enters credentials and who reports the attempt. Vishing (phone-based pretexting) tests whether staff will hand over access or information to a convincing caller.

When to use it: your staff can reach sensitive systems or data, which covers almost every organization. Phishing remains one of the most common initial access vectors in real breaches. Testing shows whether your email controls catch malicious messages and whether awareness training is working. Sherlock Forensics runs phishing and vishing campaigns remotely.

Vulnerability Assessment vs Penetration Test vs Red Team

The third classification is approach: how deep the test goes and whether it also tests your ability to detect an attack. A vulnerability scan is not a penetration test. A penetration test is not a red team.

ApproachGoalDepthTests detectionTypical length
Vulnerability assessmentList known weaknessesBroad automated scanning with triageNoDays
Penetration testProve which weaknesses can be exploited and how far they leadManual exploitation within an agreed scopeRarelyDays to a few weeks
Red teamTest whether defenders detect and stop a targeted attackObjective-based, under agreed rules of engagementYesSeveral weeks
Purple teamImprove detection with defenders working alongside the attackersAttack techniques run one at a time and reviewed togetherYes, liveDays to weeks
Assumed breachMeasure what an attacker can do after the first footholdStarts inside, focused on lateral movement and privilege escalationOftenDays to weeks

Red Team Assessment

A red team assessment simulates a targeted attack against your organization over several weeks. Instead of listing every vulnerability, the red team pursues defined objectives, such as reaching a payment system or a senior executive's mailbox, combining technical exploitation, phishing and custom tooling under agreed rules of engagement. Techniques are usually mapped to MITRE ATT&CK.

When to use it: your security program is mature and you want to test detection and response, not just find vulnerabilities. A red team answers one question: if a skilled attacker targeted us, would we notice and how far would they get? Sherlock Forensics runs red team engagements for organizations that are ready for that test.

Comparison Table: Which Penetration Test Do You Need?

TypeWhat it testsTypical triggerKnowledge levelStandard
External networkInternet-facing hosts and servicesPCI DSS 11.4.3, cyber insurance renewal, acquisition due diligenceBlack or grey boxNIST SP 800-115
Internal networkActive Directory, segmentation, lateral movementPCI DSS 11.4.2, SOC 2 audit, office network changeGrey boxNIST SP 800-115
Web applicationAuthentication, access control, business logicNew release, SOC 2, customer security questionnaireGrey or white boxOWASP WSTG
APIObject-level authorization, data exposure, rate limitsAPI launch, new partner integrationGrey boxOWASP API Security Top 10
Mobile applicationOn-device storage, the app binary, network trafficApp store releaseGrey or white boxOWASP MASTG
CloudIAM, storage exposure, network rulesCloud migration, SOC 2White box (read-only configuration access)Provider security benchmarks
AI and LLM applicationPrompt injection, data disclosure, agent permissionsLaunching an AI featureGrey boxOWASP Top 10 for LLM Applications
Social engineeringStaff response to phishing and vishingAwareness program review, insurer requestBlack boxAgreed scenario and rules of engagement
Red teamDetection and response across several targetsMature security program, board requestBlack boxMITRE ATT&CK

For a guided side-by-side comparison of assessment types, use the interactive decision guide. The methodology behind every type traces back to NIST SP 800-115, the federal technical guide to security testing.

How Often Each Type Is Required

Only some frameworks set a testing frequency. The clearest is PCI DSS. Requirement 11.4 of PCI DSS v4.0.1 (PCI Security Standards Council, June 2024) requires:

  • Internal penetration testing (11.4.2): at least once every 12 months and after any significant infrastructure or application upgrade or change.
  • External penetration testing (11.4.3): at least once every 12 months and after any significant infrastructure or application upgrade or change.
  • Segmentation testing (11.4.5): if segmentation is used to reduce PCI scope, the segmentation controls are tested at least once every 12 months and after any change to them.
  • Service providers (11.4.6): segmentation controls are tested at least once every six months and after any change to them.

SOC 2 and ISO 27001 expect evidence that security controls are tested, but neither standard sets a penetration testing frequency. Your auditor will ask what was tested, when and what was fixed, so plan the test around the audit period. See SOC 2 penetration testing and PCI DSS 4.0 penetration testing for how Sherlock Forensics maps reports to each framework.

Frequently Asked Questions

What are the 3 types of penetration testing?

The three types are usually black box, grey box and white box testing, which differ by how much the tester knows before starting. Black box starts with nothing, grey box with user-level access and white box with full access to code and configuration. Penetration tests are also classified by target (network, web, API, cloud) and by approach (vulnerability assessment, penetration test, red team).

How many types of penetration testing are there?

There is no fixed number. By target there are eight common types: external network, internal network, web application, API, mobile application, cloud, AI and LLM applications and social engineering. Red team assessments combine several of them. Most organizations need two or three types, chosen by their attack surface and compliance requirements.

What is the difference between a vulnerability scan and a penetration test?

A vulnerability scan is automated and lists known weaknesses by software version and signature. A penetration test is performed by a person who confirms which weaknesses can actually be exploited, chains them together and tests business logic that scanners cannot understand. Scans suit continuous monitoring, while a penetration test shows how far an attacker could get.

What is a red team assessment?

A red team assessment is an objective-based simulation of a targeted attack, run under agreed rules of engagement over several weeks. Instead of listing every vulnerability, the red team pursues a goal such as reaching a payment system or an executive mailbox and measures whether your security team detects and contains the activity.

Which penetration test does PCI DSS require?

PCI DSS v4.0.1 Requirement 11.4 requires internal and external penetration testing at least once every 12 months and after any significant change, with application-layer testing included. If segmentation is used to reduce scope, segmentation controls must be tested at least once every 12 months (every six months for service providers).

Scope Your Penetration Test

Sherlock Forensics penetration testing is delivered remotely across Canada. Quick audits start at $1,500 USD, standard penetration tests are $5,000 USD and comprehensive assessments with internal testing via ShadowTap start at $12,000 USD. Not sure which type fits? Order online or ask for a free scoping consultation.

Make Sherlock Forensics your preferred source in Google Search