In a black-box penetration test, the tester starts with almost nothing. You give them a company name, a domain or a URL, and written permission. They get no source code, no architecture diagram and no inside explanation of how the system works. Everything else they have to discover for themselves, the way an outside attacker would.
The appeal is obvious. It answers the question most people ask first: what can a stranger on the internet do to us. It is also the easiest test to set up, because there is nothing to hand over.
The limits are less obvious, and they matter. A black-box test is strong at measuring exposure and weak at measuring depth. This post explains how one runs, what it tends to find and miss, and when it is the right choice.
How a black-box test runs
The work follows a funnel. It starts wide and narrows toward whatever looks most promising.
- Discover what exists. The tester builds a list of everything tied to the target: subdomains, IP addresses, cloud storage names, login pages, mobile apps, public code repositories. Much of this comes from public sources such as DNS records and certificate logs.
- Find what is listening. Each discovered host is probed for open ports and running services. Each web application is crawled to list its pages, forms and API calls.
- Work out what it is made of. Server software, frameworks and versions are identified from response headers, error pages and file paths. Each one suggests which weaknesses to look for.
- Probe for weaknesses. The tester sends unexpected input, tries default and leaked passwords, looks for forgotten files and tests how the application reacts to requests it was not designed for.
- Exploit. Anything promising is attempted for real, to confirm it works and to see what it gives access to.
- Report. Findings are documented with the evidence and the path the tester took.
The first two steps often produce the most valuable result of the whole exercise: an inventory of what you actually expose. It is common for that list to include things nobody on the team remembered. A staging site still running last year's code. A subdomain pointing at a service the company stopped using. An admin interface that was meant to be reachable only from the office.
What black-box testing finds well
Black-box testing is strong wherever the flaw is visible from outside without any special access.
- Forgotten and unmanaged assets. Old environments, test servers, abandoned subdomains.
- Exposed services that should be private. Databases, management consoles and internal tools reachable from the internet.
- Known flaws in outdated software. If a version number is visible and a public exploit exists, an outsider will find it.
- Weak authentication at the front door. Default passwords, missing rate limits on login, password reset flows that leak whether an account exists.
- Configuration mistakes. Directory listings, verbose error messages, backup files left in web folders, storage buckets open to the public.
- Flaws in unauthenticated features. Sign-up, login, password reset, public search and contact forms.
Where it stops
The weaknesses of the approach all come from the same source: the tester can only test what they can find and reach in the time available.
Most of an application sits behind the login. Without an account, a tester sees the sign-in page and little else. The features where real damage happens, such as viewing records, exporting data and managing users, are out of reach. Open sign-up helps. But if accounts are created by a sales process, the tester never gets in.
Authorization flaws need two accounts to detect. A very common serious API flaw is broken object level authorization, where one user can read another user's data by changing an identifier. Proving it requires two users to compare. A tester with no credentials cannot do that.
Discovery eats the budget. A large share of a time-boxed black-box test goes on working out what exists and how it behaves. That is time not spent attacking. A tester who is handed an API specification on day one can begin on step four straight away.
Coverage is unknown. When the report comes back clean, you cannot easily tell whether the system is sound or the tester never found the vulnerable part. With no map, nobody can say what share of the territory was covered.
Hidden code paths stay hidden. A debug parameter, an undocumented endpoint or a feature flag that is off for anonymous users may never be triggered from the outside in two weeks. Someone reading the source would see it in minutes.
A short black-box test can also understate the risk. A real attacker is not limited to ten working days, and can buy an account or use credentials leaked elsewhere.
Black-box compared with the alternatives
| Black-box | Gray-box | White-box | |
|---|---|---|---|
| What the tester receives | A target and permission | User accounts, often API documentation | Source code, architecture, configuration |
| Main thing it shows | What an outsider can find and reach | What a logged-in user can do that they should not | Exactly where a flaw sits, and whether the same mistake is made elsewhere |
| Time spent on discovery | High | Low | Very low |
| Depth behind the login | Shallow | Good | Deepest |
| Setup effort for you | Minimal | Moderate | Highest |
These are points on a scale, and many tests mix them: a black-box phase to map exposure, then credentials for the application itself. The glossary entry on black-box, gray-box and white-box testing covers the comparison in more detail.
When to choose it
Black-box is the right choice in a few clear situations.
- You want to know your external exposure. Especially if you have never listed everything you run on the internet, or you have recently acquired another company.
- You want an unbiased first look. With no briefing, the tester is not steered toward the parts the team already worries about.
- The target is mostly unauthenticated. A marketing site, a public API with no accounts, a login and sign-up flow.
- You are checking your detection. A tester starting from zero generates the same noisy early activity a real attacker does, which is a fair test of whether anyone notices.
It is the wrong choice as the only test of a product whose value sits behind a login. For a business application with customer accounts, a black-box test alone leaves the most important questions unasked. Pair it with an authenticated test, or start gray-box. Our guide to choosing a penetration test walks through that decision.
Key takeaways
- A black-box test starts with a target and no inside knowledge. The tester has to discover everything else.
- It is strong on exposure: forgotten assets, public services, outdated software and weak front-door authentication.
- It is weak on depth: features behind the login, authorization between users and hidden code paths.
- A clean black-box report has unknown coverage. Treat it as "nothing found from outside", not "nothing wrong".
- Use it to map and test your perimeter, and combine it with authenticated testing for anything that has user accounts.