Types of penetration testing differ in two ways: how much the tester knows before starting, and which part of the organisation is being tested, and choosing the right type is what makes a test useful. A penetration test that probes the wrong system, or starts with the wrong level of knowledge, answers a question nobody asked. This guide explains the main types of penetration testing, what each one covers, and how to pick the right mix for your organisation.
The first distinction is about knowledge. Black-box, white-box and grey-box tests differ only in what the tester is told in advance, and that single choice changes how deep the test can go. The second distinction is about target: network, web application, mobile, cloud and social engineering tests each probe a different part of the attack surface.
Most mature security programmes use several types together. No single test covers everything, and the combination matters more than any one engagement.
Key takeaways
- Black-box, white-box and grey-box tests differ in how much the tester knows in advance.
- Network, web application, mobile, cloud, API and social engineering tests each cover a different target.
- External tests simulate an outsider; internal tests simulate an attacker who is already inside.
- The right type follows the question you need answered, not the test that sounds most impressive.
- A mature programme combines several types across the year rather than relying on one annual test.
Black-box, white-box and grey-box testing
Black-box testing gives the tester almost no information in advance, mirroring an outside attacker who must discover everything from scratch. The tester starts with a company name or a domain and works outward, mapping the public footprint, probing for weaknesses and trying to break in. The result is realistic, but the test can be slow, because time is spent on discovery rather than on deep exploitation.
White-box testing is the opposite. The tester receives source code, architecture diagrams, credentials and network maps, and can go straight to the hardest problems. This is the most thorough approach, and it is the best choice when the goal is to find as many flaws as possible in a specific application or system. It is less realistic as an attack simulation, but realism is not always the point.
Grey-box testing sits between the two. The tester starts with partial knowledge, such as a standard user account or an internal network diagram, which mirrors an attacker who has gained a foothold or a malicious insider. It balances realism with depth, and it is a common choice for web applications, where a tester with a user account can probe the features real users can reach.
Best for: black-box for external realism, white-box for thorough application review, and grey-box for insider-threat and authenticated-user scenarios.
External and internal network testing
External network testing looks at an organisation from the internet’s point of view. The tester probes public IP addresses, open ports and exposed services, looking for the way in. Common findings include unpatched services, misconfigured firewalls and remote access systems with weak authentication. This is the test most organisations think of first, and it answers the question of whether an outsider can get in.
Internal network testing assumes the attacker is already inside, whether through a compromised laptop, a malicious insider or a successful phishing email. The tester works from inside the network, testing how far they can move, what data they can reach, and whether internal systems are segmented from each other. The findings are often more serious than external ones, because internal systems are rarely hardened to the same degree.
The two tests complement each other. A strong external posture means little if an attacker who gets in can move freely, and strong internal controls matter less if the front door is wide open. Running both gives a complete picture of the network, and our guide to cloud identity security explains why access controls matter on both sides of the boundary.
Web application penetration testing
Web application testing focuses on a single application rather than on the network around it. The tester probes authentication, session handling, access control, input validation and business logic, looking for flaws such as SQL injection, cross-site scripting and broken access control. The OWASP Web Security Testing Guide, or WSTG, is the standard reference for this work, and the OWASP Top 10 lists the most critical web application risks.
Business logic flaws are what make web application tests valuable. A scanner can find a missing security header, but only a human tester notices that a discount code can be applied twice, or that a checkout step can be skipped. These flaws are specific to the application, so they need a tester who understands how the application is supposed to work.
Web tests usually run as grey-box or white-box engagements, with a test account and sometimes source code, because the goal is depth rather than realism. They are the most common type of penetration test for organisations that sell or deliver services online, and they should run before every major release, not just once a year.
Best for: any organisation with a customer-facing web application, especially one that handles payments, personal data or accounts.

Mobile, API and cloud testing
Mobile application testing covers the app itself and the services behind it. Testers examine how the app stores data on the device, whether it communicates securely, and whether its backend APIs enforce the same rules the app does. A common finding is an API that trusts the app completely, so anyone who calls the API directly can bypass the app’s checks.
API testing deserves attention on its own, because modern applications are often little more than a user interface over a set of APIs. Testers probe authentication, authorisation and rate limiting on each endpoint, looking for the ones that were never meant to be public. Our guide to inference endpoint security shows how the same problems appear in AI services.
Cloud penetration testing is different again, because the tester is probing a shared environment with strict rules. Cloud providers set limits on what testers may do, and the test must stay within the customer’s own resources. Common findings include over-permissive identity roles, publicly exposed storage and misconfigured network rules, and the work overlaps heavily with cloud configuration review.
Social engineering and physical testing
Social engineering tests target people rather than technology. Phishing simulations are the most common form, sending realistic emails to staff and measuring who clicks, who reports the message and who enters credentials. The results show whether security awareness training is working, and they identify the teams that need more help.
More advanced engagements include vishing, where the tester phones staff pretending to be IT support, and pretexting, where the tester invents a plausible reason to ask for access. These tests are sensitive, and they need careful handling so staff are not humiliated by the results. The goal is to improve the organisation, not to catch individuals out.
Physical testing checks whether someone can walk into a building, tailgate through a door or plug a device into a network port. It is less common than other types, but it matters for organisations with sensitive sites. A strong digital posture is of limited use if a stranger can walk in and take a laptop.
Comparing the main types
| Type | What it tests | Tester knowledge | Best for |
|---|---|---|---|
| Black-box | External exposure | Almost none | Realistic outsider simulation |
| White-box | Deep application review | Full access | Maximum coverage |
| Grey-box | Authenticated features | Partial | Insider and user scenarios |
| External network | Public services and ports | Varies | Can an outsider get in? |
| Internal network | Lateral movement | Varies | Damage after a breach |
| Web application | App logic and flaws | Usually grey or white | Customer-facing apps |
| Mobile and API | Apps and their backends | Usually grey or white | Mobile-first products |
| Social engineering | People and processes | Planned scenarios | Testing awareness training |
The table shows why the knowledge level and the target are separate choices. The same web application can be tested black-box, grey-box or white-box, and the results will differ each time. Scope both choices deliberately, and record them in the rules of engagement.
How to choose the right mix: a decision framework
- Start from the risk, not the test: ask what an attacker would target and what would hurt most if it broke.
- Test customer-facing applications every year, and before every major release.
- Run external network testing annually, and internal testing at least as often.
- Choose white-box or grey-box when you want depth; choose black-box when you want realism.
- Add API testing whenever a new service or integration ships.
- Run phishing simulations quarterly, and track reporting rates as well as click rates.
- Revisit the mix after incidents, mergers or major infrastructure changes.
A useful rule is to spend the budget where the risk is. An organisation with a single web application and no public servers gains little from an elaborate external network test, while one with a large cloud footprint needs cloud testing more than it needs another web test. The framework above keeps the choice tied to the business, not to fashion.
Frequently asked questions
Which type of penetration testing should I start with?
Start with the system that matters most to your business. For most organisations that is the customer-facing web application, tested as a grey-box engagement, plus an external network test.
Is black-box testing the most realistic?
Yes, for an external attacker, because the tester starts with the same lack of knowledge. The trade-off is depth, since time spent on discovery is time not spent exploiting what is found.
What is the difference between internal and external testing?
External testing simulates an attacker on the internet trying to get in, while internal testing simulates an attacker who is already inside the network, testing how far they can move and what they can reach.
Do I need social engineering testing?
Most organisations benefit from phishing simulations, because people remain a common way in. More intrusive social engineering tests are optional, and they need careful planning and staff communication.
Can one test cover everything?
No. Each type covers a different part of the attack surface, and a single engagement has limited time. Plan a programme of tests across the year rather than expecting one test to do it all.
How do I know the testers are qualified?
Ask for sample reports, references from similar organisations, and evidence of relevant experience. A clear methodology, such as PTES or the OWASP testing guide, is a good sign, and the quality of the sample report matters more than any single certificate.







