TopMyGrade

GCSE/Computer Science/AQA

CS6.5Penetration testing: white-box (tester has knowledge) vs black-box (tester does not); purpose and limits

Notes

Penetration testing

A penetration test ("pen test") is a controlled attempt to break into a system to find vulnerabilities before real attackers do. Conducted by ethical hackers with the owner's permission, it provides a real-world security assessment.

Why pen test?

  • Find vulnerabilities that automated scanners miss.
  • Test defences in depth — does the firewall stop the attack? Are logs alerted? Are backups usable?
  • Compliance with standards (PCI-DSS, ISO 27001).
  • Validate fixes — re-test after patching to confirm the issue is closed.

Black-box vs white-box

The two AQA-named approaches differ by how much information the tester has.

Black-box testing

The tester has no inside information — no source code, no architecture diagrams, no credentials. They start from outside, just like a real external attacker.

Pros:

  • Realistic — simulates an outsider attack.
  • Tests external-facing defences first.

Cons:

  • May miss internal vulnerabilities not reachable from outside.
  • Time-consuming reconnaissance.
  • May fail to discover deep bugs that require code knowledge.

White-box testing

The tester has full information — source code, network diagrams, credentials, architecture documents.

Pros:

  • Thorough — every layer can be examined.
  • Faster — no time wasted reconnoitring.
  • Finds deep code-level issues (logic flaws, race conditions).

Cons:

  • Less realistic — real attackers usually don't have source code.
  • Can produce a flood of theoretical issues.
  • Requires more trust in the tester.

Grey-box (extension)

Hybrid — partial information, e.g. test credentials but no source code. Common in practice.

Process of a pen test

  1. Scope — decide what's in/out of bounds (don't accidentally break production).
  2. Reconnaissance — gather information (DNS, exposed services).
  3. Scanning — automated tools find open ports and known vulnerabilities.
  4. Exploit — attempt to gain access.
  5. Post-exploit — see how far you can go (privilege escalation, data exfiltration).
  6. Report — write findings, severity, recommendations.
  7. Remediation and retest — system owner fixes; tester re-tests.

Limits of pen testing

  • Snapshot in time — system may change tomorrow.
  • Limited duration — testers may not find deep issues an attacker has months to find.
  • Scope-bound — only tests what's agreed.
  • Not a substitute for secure design — finds bugs but won't redesign your security architecture.
  • Ethical and legal — only with written permission from the owner.

Worked exampleWorked example — choose approach

A bank wants to assess its public banking website's security.

  • Black-box test simulates external attackers B1.
  • Realistic — most threats come from outside B1.
  • Pair with a white-box review of the source code to catch deeper logic flaws B1.
  • Combination gives broad and deep coverage B1.

Common mistakesPitfalls

  1. Calling all penetration testing illegal. Authorised pen testing is legal and standard.
  2. Treating pen test as one-and-done. Repeat regularly; threats evolve.
  3. Confusing pen test with vulnerability scan. Vulnerability scans are automated; pen tests include human creativity and exploitation.
  4. Skipping the report. The findings are the deliverable — without a clear, actionable report, the test is wasted.
  5. Believing white-box "is always better". Black-box may catch real-attack-likely findings missed by white-box theorising.

Worked exampleWorked example — pen-test outcome

A pen tester finds:

  • A web form vulnerable to SQL injection (high severity).
  • Weak passwords on test accounts (medium).
  • An old version of a library with known CVEs (high).

Recommendations: parameterised queries to prevent SQL injection, enforce strong passwords + lockout, update library, retest.

Try thisQuick check

For each scenario, choose black-box, white-box or grey-box:

  • Test how well a website resists external attack: black-box.
  • Code review of a banking app's authentication module: white-box.
  • Insider tester who has user credentials but no source: grey-box.
  • Compliance assessment by external auditor without source: black-box.

AI-generated · claude-opus-4-7 · v3-deep-computer-science

Practice questions

Try each before peeking at the worked solution.

  1. Question 14 marks

    Define penetration testing

    Define penetration testing and state its purpose.

    Ask AI about this

    AI-generated · claude-opus-4-7 · v3-deep-computer-science

  2. Question 22 marks

    Black-box vs white-box

    State two differences between black-box and white-box penetration testing.

    Ask AI about this

    AI-generated · claude-opus-4-7 · v3-deep-computer-science

  3. Question 32 marks

    Black-box pros and cons

    State one advantage and one disadvantage of black-box testing.

    Ask AI about this

    AI-generated · claude-opus-4-7 · v3-deep-computer-science

  4. Question 42 marks

    White-box pros and cons

    State one advantage and one disadvantage of white-box testing.

    Ask AI about this

    AI-generated · claude-opus-4-7 · v3-deep-computer-science

  5. Question 53 marks

    Pen-test process

    Describe the main stages of a typical penetration test.

    Ask AI about this

    AI-generated · claude-opus-4-7 · v3-deep-computer-science

  6. Question 65 marks

    Choose approach

    A new banking app is about to launch. The security team wants the most thorough assessment possible. Recommend a combination of pen-test approaches and justify.

    Ask AI about this

    AI-generated · claude-opus-4-7 · v3-deep-computer-science

  7. Question 72 marks

    Limits of pen testing

    State two limitations of penetration testing.

    Ask AI about this

    AI-generated · claude-opus-4-7 · v3-deep-computer-science

Flashcards

CS6.5 — Penetration testing — white-box and black-box

12-card SR deck for AQA GCSE Computer Science topic CS6.5

12 cards · spaced repetition (SM-2)