Black Box, Grey Box and White Box Penetration Testing Explained

The difference between black box, grey box and white box penetration testing, what each one finds, and which approach suits a small business website.

Yrzo AI28 November 2026 2 min read

Three ways to test the same website

The "box" describes how much the tester knows before they start.

  • Black box: the tester knows only your domain name — exactly like an outside attacker.
  • Grey box: the tester gets some access, typically a normal user account, and sometimes basic documentation.
  • White box: the tester gets full access — source code, architecture diagrams, admin accounts.

Black box testing

Black box testing shows what a stranger on the internet can find and exploit. It is realistic and needs nothing from you except permission. The downside is efficiency: the tester spends time discovering things you could have told them, and anything behind a login may stay hidden.

Best for: a first assessment, brochure sites, and checking your public exposure. A free scan is a very light form of black box testing.

Grey box testing

Grey box testing gives the tester a normal user account. That unlocks the areas where the most damaging bugs live: broken access control, IDOR, session handling and account takeover. It also mirrors a very common real attack — someone signs up as a customer and pokes around.

Best for: shops with customer accounts, booking systems, client portals and SaaS. It is the best value for most small businesses.

Is your site exposed to this?

Run a free, non-intrusive check of what attackers can see from outside. No account needed.

White box testing

White box testing adds source code review and full knowledge of how the system works. It finds the deepest issues — logic flaws, insecure cryptography, hidden endpoints — but takes much longer and costs more.

Best for: fintech, healthcare and high-value applications, or code you are about to sell or audit.

Comparison

Black boxGrey boxWhite box
Tester knowledgeDomain onlyUser accountFull code and access
RealismHighestHighLower
DepthSurfaceDeep in user areasDeepest
Time and costLowMediumHigh

Which one should you choose?

For most small business websites, start black box to see your public exposure, then move to grey box if you have logins. Reserve white box for high-risk applications. Whatever you choose, make sure the report explains findings clearly — see how to read a penetration test report.

Yrzo AI's automated tests start from the outside and cover logins, forms and APIs within scope. See what each plan includes.

Related reading: External Penetration Testing: What It Covers and Why It Matters · Penetration Testing Checklist: How to Prepare, Run and Follow Up · Penetration Testing vs Vulnerability Scanning: What's the Difference?

black box penetration testinggrey box vs white box testingwhite box pentestpenetration testing approaches
Share

Check your own website in 60 seconds

Free check, no account needed. Want the full picture? Full reports start at £149, with up to 110 checks with a 14-day money-back guarantee.

Keep reading