Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
Black-box, grey-box, and white-box testing describe how much a penetration tester knows before starting—nothing, partial access, or full documentation and source code.

What Is Black-Box, Grey-Box and White-Box Testing?
Black-box, grey-box, and white-box testing are three ways of scoping a penetration test according to how much information the testers receive in advance. In a black-box test they start with almost nothing, like an outside attacker. In a white-box test they get full access to documentation, credentials, and often source code. Grey-box sits between the two, typically providing user accounts and some architectural context. The choice shapes what the test can find, how long it takes, and what the results mean.
| Black-box | Grey-box | White-box | |
|---|---|---|---|
| Information provided | Target name or IP range only | User accounts, basic architecture, API documentation | Source code, design documents, admin access, configuration |
| Simulates | An external attacker with no inside knowledge | A customer, partner, or employee who turns malicious, or an attacker with stolen credentials | A thorough review by someone who knows the system intimately |
| Coverage | Lowest—limited to what can be discovered | Good—includes authenticated functionality | Highest—code paths and configuration can be examined directly |
| Time spent on discovery | High | Moderate | Low |
| Realism | Highest | High | Lower, but finds the most issues |
Testers begin with the same view as an anonymous attacker: a company name, a domain, or a range of IP addresses. They spend the early part of the engagement on reconnaissance—enumerating subdomains, fingerprinting services, gathering open source intelligence—before attempting to exploit anything they find. The result is an honest picture of what an outsider can achieve. The drawback is efficiency: within a fixed number of days, a lot of time goes on discovery, and functionality behind a login page may never be tested at all. A clean black-box report does not mean the application is secure, only that the testers did not get in during the time available.
In a grey-box engagement, the client provides partial knowledge. For a web application, that usually means test accounts for each user role, a list of in-scope URLs or an API specification, and perhaps a short architecture walkthrough. For an internal infrastructure test, it might mean a standard domain user account and a network diagram. Testers can then skip straight to the interesting work: checking whether a basic user can reach admin functions, whether one customer can see another’s data, and how far a compromised workstation could lead. Because most real breaches involve an attacker who already holds some valid credentials, grey-box testing tends to offer the best balance of realism and coverage, and it is the approach we recommend most often.
White-box (sometimes called clear-box or crystal-box) testing gives the testers everything: source code, infrastructure-as-code templates, configuration files, and administrative access. They can combine manual code review with dynamic testing, trace exactly how input flows through the application, and confirm whether a suspected flaw is exploitable. It is ideal for high-risk systems such as payment platforms, authentication services, and products about to be released, and for verifying that fixes from previous tests are complete. It requires more preparation from your side and testers with strong development skills.
Budget matters too. If you can only fund a few days of testing, giving the team more information means more of those days are spent finding real weaknesses rather than rediscovering your network map.
None of the major UK schemes mandates a single box type, but they do shape scoping. PCI DSS v4.0 Requirement 11.4 calls for internal and external penetration testing at least annually and after significant changes. The NCSC’s CHECK scheme covers testing of public sector and critical national infrastructure systems, and CREST accreditation is widely used as an indicator of tester competence. In financial services, the Bank of England’s CBEST framework uses threat intelligence to drive realistic, largely black-box simulations of attacks on critical services.
Whichever approach suits your system, our penetration test services can be scoped as black-box, grey-box, or white-box to match your risk, timeline, and budget.
There is no single best type; it depends on your goal. Grey-box is usually the most cost-effective choice for web applications and internal networks because it reflects attackers who already hold credentials and covers authenticated functionality. White-box suits critical systems and new releases, while black-box is best when you specifically want to know what an anonymous outsider can achieve.
It is closer to the starting point of an anonymous attacker, but not necessarily to how breaches actually unfold. Real attackers have unlimited time and often begin with stolen credentials bought online or harvested by phishing. A time-limited black-box test can therefore understate your risk, while grey-box testing compensates by providing the access an attacker would eventually obtain.
It needs some of their time, mainly to provide repository access, explain the architecture, and answer questions during the test. In return, findings come with exact file and line references, which makes fixes faster. Most teams find that a short kick-off session and a named technical contact are enough to keep the engagement running smoothly.
Not usually. Grey-box testing typically provides ordinary user accounts for each role so testers can check whether those roles can exceed their permissions. Administrative credentials may be included when the scope covers admin functionality, but the information shared is always agreed in advance and documented in the rules of engagement.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.