Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is Black-Box, Grey-Box and White-Box Testing?

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.

Illustration for the cybersecurity term Black-Box, Grey-Box and White-Box Testing
Home / Blog / Cybersecurity Terms / What Is Black-Box, Grey-Box and White-Box Testing?
17 November 2026

What Is Black-Box, Grey-Box and White-Box Testing?

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.

The Three Approaches at a Glance

Black-boxGrey-boxWhite-box
Information providedTarget name or IP range onlyUser accounts, basic architecture, API documentationSource code, design documents, admin access, configuration
SimulatesAn external attacker with no inside knowledgeA customer, partner, or employee who turns malicious, or an attacker with stolen credentialsA thorough review by someone who knows the system intimately
CoverageLowest—limited to what can be discoveredGood—includes authenticated functionalityHighest—code paths and configuration can be examined directly
Time spent on discoveryHighModerateLow
RealismHighestHighLower, but finds the most issues

Black-Box Testing

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.

Grey-Box Testing

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 Testing

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.

Choosing the Right Approach

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.

Standards and UK Requirements

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.

FAQ – Frequently Asked Questions

Which Type of Penetration Test Is Best?

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.

Is Black-Box Testing More Realistic Than Grey-Box?

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.

Will a White-Box Test Disrupt My Developers?

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.

Does Grey-Box Testing Mean Testers Get Admin Access?

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.

Related Terms

You May Be Interested In These

What Is Cross-Site Request Forgery (CSRF)?

Cybersecurity Terms

17 November 2026

What Is Cross-Site Request Forgery (CSRF)?

Read More
What Is a Canary Token?

Cybersecurity Terms

17 November 2026

What Is a Canary Token?

Read More
What Is an Indicator of Compromise (IoC)?

Cybersecurity Terms

17 November 2026

What Is an Indicator of Compromise (IoC)?

Read More