Choose black-box, grey-box or source-assisted penetration testing from the assurance objective and attacker model. Black-box work tests exposed discovery and resistance with little internal context. Grey-box work uses controlled credentials and architecture context to reach authorization and business logic efficiently. Source-assisted work adds code or design visibility to investigate hidden paths and systemic control failures.
These models are not quality levels. A skilled team may blend them within one engagement. The important decision is which visibility and access produce credible evidence for the risks you need to assess within the available time.
Define the three models precisely
Black-box testing
The tester begins with public or otherwise attacker-realistic information and no privileged product knowledge. This tests discovery, external exposure, authentication surfaces and the ability to identify attack paths from the outside. It spends engagement time learning the system and may not reach deep authenticated workflows.
Grey-box testing
The tester receives selected context such as URLs, API documentation, architecture notes and controlled accounts for relevant roles or tenants. This reduces setup and discovery friction and enables systematic access-control, workflow and API testing. It still allows adversarial investigation rather than following a scripted QA plan.
Source-assisted testing
The tester can inspect relevant source code, configurations, threat models or detailed design material to form hypotheses and trace controls. Runtime exploitation remains important: a code concern becomes a finding only when evidence and impact support it under the engagement standard.
Choose black-box when external discovery is the question
- Unknown internet exposure and shadow interfaces are primary concerns.
- You want evidence of what an unauthenticated outsider can discover.
- Credential issuance would distort the exact attacker model being tested.
- The target is narrow enough for meaningful depth after discovery.
- A later credentialed phase will cover internal workflows if needed.
Black-box testing is weaker when the system’s main risk sits behind customer accounts, complex roles or tenant relationships. A tester who never obtains the required state cannot assess those controls deeply.
Choose grey-box for application and API assurance depth
- Authorization between roles, peers and tenants is a major objective.
- Critical business workflows require seeded data or defined state.
- APIs need specifications, tokens or request examples to exercise fully.
- The engagement window should prioritize testing over account discovery.
- You need a measurable matrix of identity and workflow coverage.
Grey-box is often the most efficient default for enterprise web, mobile and API testing. It represents a realistic attacker who has ordinary access or has compromised an account, while allowing the tester to compare controlled identities safely.
Choose source assistance for hidden and systemic questions
- A shared authorization, cryptographic or tenant-context control needs review.
- Complex routing or generated APIs make runtime inventory uncertain.
- A critical workflow has many server-side branches that are hard to reach blindly.
- The team needs root-cause analysis across sibling implementations.
- High assurance is required for a small but consequential component.
Source visibility can reveal hypotheses that dynamic discovery misses, including unsafe fallbacks, feature-flag paths and trust assumptions. It can also create bias toward visible code. Require runtime validation and independent exploration to balance that risk.
Use a blended engagement deliberately
- Begin with a bounded black-box discovery phase.
- Record exposed assets, authentication surfaces and attacker-visible clues.
- Introduce role and tenant accounts for systematic grey-box coverage.
- Use source or design context for unresolved high-risk hypotheses.
- Validate suspected code paths through deployed behaviour.
- Report which evidence came from each perspective and its limitations.
Do not label an engagement “hybrid” without allocating time and deliverables to each phase. Otherwise the term hides what access the tester actually used.
Match the model to assurance objectives
- External attack surface: black-box discovery plus targeted validation.
- Role and tenant authorization: credentialed grey-box with an identity matrix.
- Business-logic abuse: grey-box with workflow context and controlled data.
- Shared-control correctness: source-assisted analysis plus runtime proof.
- Remediation verification: focused context and exact fixed-build evidence.
- Customer-requested independent assessment: model documented with scope and limitations.
Consider time and coverage honestly
Black-box time includes discovery and access acquisition. Grey-box time includes deeper state preparation and identity comparison. Source-assisted time includes code familiarization and hypothesis tracing. The most transparent proposal explains how effort shifts with the model.
A short black-box test of a complex authenticated application may look realistic but provide little evidence about its highest-risk controls. A source-assisted test of the same system may find deep issues but say less about public discoverability. Choose the claim you need to support.
Protect independence in a context-rich test
Providing documentation does not remove independence. Ask testers to record assumptions, challenge the supplied architecture and conduct unscripted discovery. Do not limit them to executing internal test cases or validating only known concerns.
Control source and credential access
- Use least-privilege repository or snapshot access.
- Remove unrelated secrets and customer data.
- Define permitted local storage, tools and subcontractors.
- Log access and set retention and deletion obligations.
- Issue dedicated test accounts and rotate or revoke them afterward.
The added visibility creates sensitive evidence. Contractual and operational controls should match the information provided.
Require reporting to state the model actually used
The report should identify information supplied, account roles, source or design artefacts reviewed, black-box phases, blocked paths and environmental differences. Findings should distinguish code observations from validated runtime impact.
The OWASP Web Security Testing Guide can inform test coverage across these models. The model changes visibility and efficiency; it does not replace a risk-based selection of relevant techniques.
The practical decision
Use black-box testing for attacker-realistic discovery, grey-box testing for efficient identity and workflow depth, and source assistance for hidden or systemic control questions. Blend them when the assurance objective spans all three, and document the evidence and limitations of each phase.
Choose the right application testing model with WIMD based on your attacker perspectives, trust boundaries, available evidence and assurance goals.
