Skip to content

Answer

Black box vs white box penetration testing

The difference is how much the tester is told before starting: nothing, everything, or something in between.

It sounds like a realism question. It is actually a budget question, because information the tester is not given is time the tester spends rediscovering it.

The three positions

Black box: no credentials, no documentation, no source. The tester starts where an anonymous internet attacker starts.

White box: source code, architecture documentation, credentials for every role. Grey box sits between, and is what most engagements should actually be: credentials for each role plus whatever documentation exists, without source code.

Why black box finds less for the same money

Discovery is not free. A black box tester spends a meaningful share of the window working out what you already know: which endpoints exist, which roles exist, how the application is structured.

At the end of a fixed window, you have paid for reconnaissance you could have supplied in an email. And you have no coverage at all of authenticated functionality, which is where most of the serious findings live.

When black box is the right choice

When the question genuinely is about the external perimeter: what an unauthenticated attacker can reach from the internet, what your exposed services disclose, whether anything lets someone in without credentials.

It is also the honest choice when you want to test detection rather than the application. If nobody on your side knows the test is happening, you learn what your monitoring actually catches, which is a different and sometimes more valuable result.

Why grey box is usually the answer

Give the tester one account per role plus a second account at the lowest privilege level, and the whole access control category becomes testable. Without that second low-privilege account, horizontal access control cannot be tested at all.

Attackers are not limited to the black box position either. A real adversary buys a subscription, phishes an employee, or reads your public client code. Starting the tester with less knowledge than a motivated attacker would have does not make the test more realistic.

  • One account per role that exists in the product
  • A second account at the lowest privilege level, for horizontal access control
  • A second tenant, if the product is multi-tenant
  • Whatever API specification or architecture documentation exists
  • A named contact who can answer a question without a change request

Questions

What is the difference between black box and white box penetration testing?
Black box testing gives the tester no credentials, documentation or source code, starting from an anonymous attacker's position. White box provides source, architecture and credentials for all roles. Grey box, the usual middle ground, provides credentials and documentation but not source.
Is black box testing more realistic?
Not necessarily. Real attackers buy accounts, phish employees and read public client code, so they often start with more knowledge than a black box tester. Black box is realistic for the external perimeter specifically.
Which should I choose?
Grey box for application testing, because it makes access control testable and spends the window on findings rather than reconnaissance. Black box when the question is specifically about the external perimeter, or when you want to test your own detection capability.

Next step

Start with a scoping call.

Tell us what you need tested. Before any testing begins, the scope is written down and the agreement and rules of engagement are signed.

Book a scoping call