Skip to content
Zyberum Cyber Security Firm
Menu
ComparisonsPenetration testing

Black Box vs White Box Penetration Test: How Much Should the Tester Know?

A black box test starts with no information, a white box test with code, documentation and accounts. What each finds and costs, and why grey box usually wins.

Updated This page as Markdown

In short

In a black box penetration test the testers get nothing but a target and have to discover everything themselves, like an outside attacker. In a white box test they get source code, architecture documents, firmware, credentials and the developers' time, so the days go into finding bugs instead of guessing. White box finds more per day and is the right choice for products, firmware and anything that has to pass an audit. Black box answers one narrow question: what can a stranger do from outside? Most engagements land in between as grey box, with accounts and documentation but no code.

What is the difference?

The difference is information. In a black box test the testers get a URL, an IP range or a device in a box, and nothing else: no accounts, no documentation, no source code. They have to find out what the target is and how it works before they can attack it, the way an outsider would. In a white box test they get everything the development team has: source code, architecture and threat model, firmware images, debug access, credentials for every role, and a developer who answers questions. Grey box sits in between and is the most common form in practice: accounts and documentation, but no code.

What changes with the information is not whether the tester can find a bug, but how many bugs fit into the booked days. Every hour spent guessing an API route, brute-forcing a role or dumping firmware from a flash chip is an hour not spent on the authorisation logic, the crypto or the parser where the serious findings live. Black box measures what an outsider sees in a given time. White box measures what is actually there.

Side by side

Black boxWhite box
What it findsExposed services, unauthenticated flaws, information leaks, weak defaults, anything reachable without knowledgeLogic and authorisation flaws across roles, injection in custom code, crypto misuse, unsafe parsers in firmware, secure-boot gaps, hard-coded secrets, design errors
What it missesAnything behind a login it cannot pass, anything only reachable with knowledge of the design, most firmware internals; coverage is unknownLittle within the scope; the risk is that testers follow the documentation instead of the running system, so good white box tests still include black box style probing
Who does itTesters working from the outside, often with little contact to the teamTesters and the development team together, with a kick-off and questions during the test
DurationLonger for the same coverage, because discovery eats days; a typical booking ends before coverage is completeShorter for the same coverage, or more coverage in the same time; one to three weeks for a product
Typical costSame day rates; 6,000 to 15,000 euros for a web application, typical ranges for Germany and the EU; you pay for discoverySame day rates, more of them spent on findings; firmware and code review can add days: 15,000 to 30,000 euros for an IoT product, 20,000 to 45,000 for an ECU; not an offer
FrequencyUseful as a one-off baseline or after a long time without testsThe regular form: before launch, after major releases, once a year
Required byRarely prescribed; some customers ask for “attacker perspective” testsNot prescribed either; CRA, ISO 27001, TISAX and OEM requirements ask for effective testing, and white box reports are easier to defend
OutputFindings plus a map of what the tester managed to discover; what was not reached stays unknownFindings plus a list of tested components and the reasoning for each; clear coverage statement

Choose a black box test when

  • Your question really is “what can a stranger do from the internet in two weeks?”, for example before exposing a service or as a baseline after years without a test.
  • You want to test the detection and response of your operations team as well, and they should not know the testers’ starting point. Combine this with the internal vs external question and consider a red team if the organisation is the target.
  • A customer explicitly asks for a black box perspective, for example as a second opinion after white box tests.
  • The vendor of a third-party product will not give you anything else. Then black box is not a choice but the only option, and the report should say so.

Choose a white box test when

  • You ship a product: IoT device, ECU, machine, mobile app, SaaS. The serious findings are in firmware, protocol parsers, boot chains and authorisation logic, and only code and documentation make them reachable in the booked time.
  • You need audit evidence with a coverage statement. “We reviewed these 14 components, here is what we found and what we did not” is what a CRA conformity assessment, an OEM or an ISO 27001 auditor wants to read.
  • Your budget is limited. This sounds backwards, but white box gives more findings per euro because the testers skip the guessing.
  • You want fixes, not just findings. A tester who has read the code points at the line, and the developer fixes it the same afternoon.

In most cases white box or grey box is the better choice. Black box is the right tool for one narrow question, not the default.

Both together

Most good engagements are both. The testers start black box for a day or two to see what an outsider sees and to catch the leaks that documentation hides, then switch to white box for the remaining days to go deep. The report separates the two: what was reachable from outside without knowledge, and what was found with it. That gives you the attacker’s view and complete coverage from one engagement.

Zyberum tests black box, grey box and white box and recommends grey or white box for almost every product and application. We sign an NDA before receiving code or firmware, keep customer material on our own infrastructure, and never send any of it to an online AI service. If you want black box for a specific reason, we do it and write into the report what that choice left unseen.

FAQ

Frequently asked questions

Is a black box test more realistic?

It imitates the starting position of an outside attacker, but not their budget. A real attacker has months, an unlimited number of attempts and no deadline. A tester has ten days. Spending three of them on reconnaissance that an architecture diagram would have replaced in an hour does not make the result more realistic, it makes it smaller.

Do I have to hand over my source code for a white box test?

Only if you want the code reviewed. A useful middle ground is grey box: the testers get accounts for every role, API documentation, architecture diagrams and a contact who answers questions, but no code. Under an NDA most customers share code for firmware and ECU tests, because without it a secure-boot or crypto review is guesswork.

Which variant do auditors and the CRA expect?

Neither is prescribed. Annex I Part II of the Cyber Resilience Act asks manufacturers for effective and regular tests and reviews of the product's security; ISO 27001 and TISAX ask for testing as a control. Auditors look at scope, method and coverage. A white box report with a list of tested components is easier to defend than a black box report that says "nothing found in ten days".

Sources

Related pages

Get started

Not sure which test you need?

Describe your product or environment in a 15-minute call. You get a clear recommendation and, if you want one, a fixed-price offer.

  • A recommendation, not a sales pitch
  • Scope and effort estimate on the spot
  • Free and without obligation
Tom Zaubermann

Your call is withTom ZaubermannFounder & CEO, Zyberum

Call us: +49 176 439 17074info@zyberum.com

Or send us a message

We reply within one business day.

Call usGet a recommendation

Pick a time that suits you

Open in a new tab