Skip to content
Tutorials Center
My learning

Topics

Lesson 2 of 38 ยท Getting Started

Types of Penetration Tests

Compare black box, grey box and white box testing, and the main target types: network, web, wireless, cloud, mobile, social and physical, with how to choose.

Penetration tests are classified along two axes. The first is how much the tester knows before starting: nothing, a little, or everything. The second is what is being tested: a network, a web application, a wireless network, a cloud account, a phone app, or even people and buildings. Knowing both axes helps you scope an engagement and set honest expectations about what the result can tell you.

Knowledge level: black, grey and white box

Black box

No inside knowledge Only a company name or domain.
Simulates outsiders Realistic but slower.

Time is spent on discovery.

1 / 3
Approach Tester starts with Strength Weakness
Black box A name or address Realistic outsider view Much time spent on discovery; may miss deep flaws
Grey box One or more accounts, some documentation Good coverage in limited time Less like a pure outsider
White box Source code, architecture, admin access Deepest coverage Less realistic; needs more client preparation

Most commercial web application tests are grey box: the tester gets a normal user account and sometimes an admin account, because the interesting bugs are behind the login. Pure black box is common for external network tests of a company that wants to see its internet-facing exposure.

Target type

Network (external and internal)

An external test looks at what is reachable from the internet: firewalls, VPN gateways, mail servers, web servers. An internal test assumes the attacker is already inside (a compromised laptop, a malicious visitor with a network jack) and asks how far they get. Internal tests often reveal the larger risk because weak passwords, flat networks and outdated systems are common inside.

Web application and API

Looks at how a site or API handles input, authentication, sessions and authorization. Guidance such as the OWASP Top 10 and the OWASP Web Security Testing Guide structures this work. You will study it in the web chapter.

Wireless

Tests access points, encryption settings, guest network isolation and rogue devices. It needs the tester to be physically near the premises.

Cloud

Examines accounts, identities, storage permissions, network rules and managed services. The "attack surface" is mostly configuration, so findings are often misconfigurations rather than software bugs. Providers publish rules for what customers may test.

Mobile and thick-client applications

Looks at the app package, local storage, network traffic and the backend API.

Social engineering

Tests people: phishing emails, phone calls and pretexting. It needs very careful rules, because real employees are involved. See Human Factors in Recon.

Physical

Tests doors, badges, cameras and procedures: can a stranger walk to a server room? It carries real-world legal risk and requires a signed authorization letter that the tester carries on site.

Choosing the right test

There is no best type, only the one that fits the question. Use these prompts when advising a client:

  1. What are we afraid of losing? (Customer data, uptime, intellectual property.)
  2. Who are we afraid of? (Anonymous internet users, a malicious employee, a supplier.)
  3. How much time and budget exist? Black box testing spends more of it on discovery.
  4. Is something new about to launch or change?
flowchart TD
    Q["What do you want to learn?"] --> A{"Outsider view?"}
    A -->|"yes"| B["External network or black box web test"]
    A -->|"no"| C{"Insider or logged-in user?"}
    C -->|"yes"| D["Internal network or grey box web test"]
    C -->|"deep code review"| E["White box test"]

A rough decision aid. Real scoping conversations combine several types.

Stand-in: a recommender for test types

The first example encodes the decision aid as a small function so you can see how inputs map to a recommendation. It is a teaching model, not a rule you must follow.

Python Recommend a test type

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The second example estimates how much of a fixed budget of days goes to discovery in each knowledge level. The percentages are invented, but they show why grey box often finds more per euro.

Python Where do the days go?

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

  • Vulnerability assessment: a scan plus triage, no exploitation. See Vulnerability Scanning and Triage.
  • Purple team: red and blue teams work together so defenders learn from each technique.
  • Bug bounty: many independent researchers test continuously under a public policy, usually only for web and API targets.
  • Code review and architecture review: not pentests, but often bundled.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A tester receives a normal user account and an API description. Which approach is this?

    Partial knowledge, such as an account and documentation, is grey box testing.
  2. 2. Which test best answers the question: what could a malicious visitor do after plugging into an office network port?

    Internal tests start from inside the network boundary.
  3. 3. Why do cloud tests often report misconfigurations rather than software bugs?

    Open storage, overly broad roles and permissive network rules are configuration choices.
  4. 4. What must a physical penetration tester carry on site?

    If staff or police stop the tester, the letter shows the visit is authorized.

Summary

  • Knowledge level: black box (none), grey box (some), white box (full).
  • Target types include network, web and API, wireless, cloud, mobile, social engineering and physical.
  • Internal tests often reveal more risk than external ones; grey box often gives the best value.
  • Choose the test from the client's question: what is at risk, from whom, with what time.
  • Physical and social tests need especially careful written rules.

Next: Legal and Ethics for Penetration Testers