On this page
A SaaS company needs a pentest report to close an enterprise deal. It buys “a penetration test”. The vendor checks three IP addresses, flags a weak TLS setting and sends a clean report. Two months later, a customer’s admin changes an ID in an API call and downloads another tenant’s invoices.
The test wasn’t fake. It was the wrong type. Nobody ever looked at the API.
That is the most common mistake we see on scoping calls: buying a pentest by name instead of by risk. There are several types of penetration testing, and each answers a different question about how an attacker could hurt you. This guide covers the seven that matter most, what each finds, and which you need first.
Key takeaways
- Pentest types are defined by what gets tested. Black-box, grey-box and white-box describe how much testers know, which is a separate choice.
- Test first where your data lives and where attackers are most likely to get in. For most SaaS companies that is the web app and its API.
- A mobile test without its backend, or an external test without asset discovery, leaves the likeliest entry point untested.
- Most companies need two or three types combined, not all seven.
Three ways to classify penetration tests
Lists online name three, five, nine or ten types. They don’t contradict each other. They sort by different things:
- By target: what testers attack, such as a web app, API, mobile app, network, cloud account or your staff. This decides your scope.
- By knowledge: what testers know going in. Black-box (nothing), grey-box (user accounts and some documentation) or white-box (source code). The UK NCSC’s penetration testing guidance calls the two ends closed-box and open-box testing. See black-box vs white-box vs grey-box testing for the trade-offs.
- By position: external (from the internet) or internal (as if an attacker already has a foothold).
“Grey-box API test” is a complete description. “A pentest” is not.
1. Web application penetration testing
What it tests: customer portals, admin panels, SaaS dashboards, checkout flows and anything else people use through a browser.
The question it answers: can a user, or an outsider, do something the application should never allow?
The high-impact findings are rarely exotic: broken access control (one customer reading another’s data), business logic flaws (a discount applied twice, a refund for an order never paid), weak session handling and injection. Scanners struggle with the first two because the request looks normal. Only the context is wrong.
Good testers follow a methodology such as the OWASP Web Security Testing Guide and test every user role, not just the default one.
You need it when: you run a customer-facing web app, handle payments or personal data, or a customer asks for pentest evidence. Our web application penetration testing page shows what a typical scope covers.
2. API penetration testing
What it tests: REST and GraphQL endpoints, including the ones your front end never calls.
The question it answers: does the API enforce the rules the interface implies?
A button may be greyed out for a normal user while the endpoint behind it still accepts the call. The OWASP API Security Top 10 (2023) ranks Broken Object Level Authorization first: the API returns any record you request by ID without checking it belongs to you. Excess data in responses (API3) and admin functions open to ordinary users (API5) also make the top five.
You need it when: your product is a single-page or mobile app backed by an API, or you offer a public or partner API. Our API penetration testing checklist shows what a thorough test covers, and the API penetration testing page explains how we scope it.
3. Mobile application penetration testing
What it tests: your Android and iOS apps, how they store data and talk to the network, and the backend API behind them.
The question it answers: what can someone learn or change by taking your app apart?
Common findings include hardcoded API keys, tokens or personal data in insecure local storage, weak certificate validation and, most often, a backend that trusts whatever the app sends. The OWASP MASVS groups mobile controls into areas such as storage, cryptography, authentication, network and resilience, and is the usual scoping reference.
A mobile test that stops at the app binary misses where the damage usually happens. Always scope the API with it.
You need it when: your app handles accounts, payments, health data or anything regulated. See mobile app pentesting on Android vs iOS for platform differences.
4. External network penetration testing
What it tests: everything reachable from the internet: web servers, VPNs, firewalls, mail, remote access and exposed admin interfaces.
The question it answers: can an outsider get a foothold?
Verizon’s 2025 Data Breach Investigations Report found that credential abuse (22%) and exploitation of vulnerabilities (20%) were the two leading initial access vectors, with exploitation up 34% on the previous year and a focus on zero-days aimed at perimeter devices and VPNs. Check your edge devices against CISA’s Known Exploited Vulnerabilities catalog, which lists flaws confirmed to be under active attack.
An external test is only as good as its target list. Hand over five IP addresses and forget the staging server on a subdomain, and the test never sees it. Start with attack surface discovery so the scope matches what attackers can find.
You need it when: you run VPNs, remote access gateways or any self-hosted, internet-facing service.
5. Internal network and Active Directory penetration testing
What it tests: what an attacker can reach once inside: workstations, servers, file shares and, above all, Active Directory.
The question it answers: if one laptop or account is compromised, how far does the damage spread?
Internal tests usually start from an assumed-breach position: a standard user account or a device on the office network. The NCSC describes this as scenario-driven testing, with examples such as a lost laptop or an unauthorised device on the internal network. Typical findings are weak service account passwords, excessive permissions, legacy protocols, flat networks and paths from an ordinary user to domain admin.
You need it when: you run an office network, a Windows domain or on-premises servers. Read internal vs external network penetration testing, or see our network penetration testing service, which covers both.
6. Cloud penetration testing
What it tests: your cloud accounts: identity and access policies, storage, network rules, serverless functions and how they connect.
The question it answers: can a leaked key or an over-permissive role give an attacker more than it should?
Cloud findings are mostly configuration and identity: roles that can do far more than their job needs, public storage, secrets in environment variables. The provider secures its infrastructure; how you configure your account is on you.
Providers also set testing rules. AWS’s penetration testing policy, for example, allows testing of listed services without prior approval, prohibits denial-of-service testing and requires approval for phishing simulations and red team exercises.
You need it when: most of your infrastructure runs in AWS, Azure or Google Cloud, many teams hold their own access, or a credential has leaked.
7. Social engineering penetration testing
What it tests: people and processes: phishing, phone pretexting, help desk password resets and sometimes physical entry.
The question it answers: can an attacker talk their way in?
MITRE ATT&CK lists phishing as technique T1566 under initial access, covering attachments, links, third-party services and voice calls. The useful findings are process gaps, not click rates: a help desk that resets passwords without verifying the caller, or staff who approve an unexpected MFA prompt.
Agree written rules on scope, allowed pretexts and reporting without shaming individuals. Also know which staff credentials already circulate: our guide to employee passwords on the dark web explains why, and XposeFinder monitors dark web breach sources for credentials linked to your domain.
You need it when: you have had a phishing incident, rely on a help desk for account recovery, or approve payments by email.
What about wireless, IoT, physical and red teaming?
Most businesses need these later or not at all. Wireless testing checks Wi-Fi encryption and guest isolation. IoT testing matters if you build connected devices. Physical testing usually sits inside a social engineering engagement. Red teaming is a stealthy, goal-based exercise that also tests detection and response. Buy it once regular pentests come back mostly clean, not before.
Types of penetration testing compared
| Type | Main question | Typical high-impact findings | Start here if you… |
|---|---|---|---|
| Web application | Can users do what the app should forbid? | Broken access control, logic flaws | Run a customer-facing web app |
| API | Does the API enforce the UI’s rules? | Object-level authorization flaws, excess data | Have a single-page app, mobile app or public API |
| Mobile | What leaks when the app is taken apart? | Hardcoded secrets, a backend that trusts the client | Ship an Android or iOS app |
| External network | Can an outsider get a foothold? | Unpatched edge devices, forgotten hosts | Have internet-facing infrastructure |
| Internal and AD | How far does one stolen account go? | Weak service accounts, paths to domain admin | Run an office network or Windows domain |
| Cloud | Can one key or role give away too much? | Over-permissive roles, public storage | Run most workloads in the cloud |
| Social engineering | Can someone talk their way in? | Weak help desk checks, careless MFA approvals | Had a phishing incident |
Which type of penetration test do you need first?
Follow your data and your most likely attacker. Work through these questions in order:
- Where does your sensitive data live? Behind a web app and API, test those first. On file servers and in a Windows domain, start with the network.
- How would an attacker most likely get in? For SaaS, through the application. For an office-based business, through phishing or an exposed VPN.
- What changed recently? A new product, API version or cloud migration deserves a focused test.
- Who is asking? Customer questionnaires usually want the product tested. Insurers and regulators may want the network too.
- What did your last test skip? Last year’s scope gaps often hold this year’s best findings.
Common starting combinations
- Early-stage SaaS: grey-box web app and API. See penetration testing for startups and SaaS.
- Fintech or health app: mobile plus API, with every user role in scope.
- Office-based company on Windows: external network plus internal and Active Directory.
- After a phishing incident: social engineering plus internal network, to see what the stolen account could reach.
Combining types in one engagement means one scoping exercise, one report and one retest cycle. Our penetration testing cost guide explains what drives the price.
Where AI-powered pentesting fits
AI is strongest at the repetitive parts of every type above: mapping assets, adapting scans and sorting noise. Deciding whether a finding matters to your business, and proving it safely, is still human work.
WhyXpose is an AI-powered pentesting platform built on that split:
- AI-guided recon and scanning. AI agents plan and run recon and scan pipelines, then choose next steps based on what they find.
- AI triage of findings. False positives are dropped and the rest ranked by risk before an expert looks.
- AI-drafted reports and fixes, reviewed and corrected by our testers.
- Expert verification. Certified penetration testers and CVE holders verify every finding with a reproducible proof of concept and a CVSS 3.1 score, then retest after you fix it.
We test web apps, APIs, Android and iOS apps, and external and internal networks including Active Directory. Findings are tracked to the fix in our vulnerability management platform, with one-click PDF reports. WhyXpose is verified under the Cyber Verification Programs for Anthropic Claude and OpenAI Codex, and also runs self-hosted open-source AI models. We have secured 1,000+ companies to date, and our research team monitors the internet for new vulnerabilities and exposures every single day, reporting them privately through responsible disclosure. More in AI penetration testing.
Frequently asked questions
What are the main types of penetration testing?
By target: web application, API, mobile, external network, internal network, cloud and social engineering testing. Wireless, IoT and physical testing are more specialised.
What are the three types of penetration testing?
“Three types” usually means the approaches: black-box (no prior knowledge), grey-box (accounts and some documentation) and white-box (source code). They describe how much testers know, not what they test. Grey-box is usually the best value for web apps, APIs and mobile apps.
Which type of penetration test should I do first?
Test whatever holds your most sensitive data and faces your most likely attacker. For SaaS and mobile products, that is usually the application and its API. For office-based businesses on Windows, it is usually the perimeter and Active Directory.
Is a vulnerability scan a type of penetration test?
No. A scan checks automatically for known issues and does not prove they can be exploited. A pentest has people exploit and chain weaknesses to show real impact. See penetration testing vs vulnerability scanning.
How often should each type of penetration test be done?
A common baseline is once a year for each type in scope, plus after significant changes such as a new application or cloud migration. Teams that ship weekly benefit from smaller, more frequent tests. See how often you should do a penetration test.
Not sure which type fits your systems? Talk to a pentester and request a discovery call, or get a demo to see AI-guided recon and expert-verified findings across web, API, mobile and network tests.
Put this guide into practice
Web, API, mobile and network pentests by certified testers, with a verified proof of concept for every finding.
Explore pentest services