GCSE · Computer Science · OCR · Spec J277

Penetration testing

Two people run the same attack on the same system. One is a criminal. The other was asked to by the owners, who are glad of it. What's the difference?

Sort it out

Who knows what? Sorting the testers

Six penetration testers are about to attack six systems, and each has been told a different amount. Pick a tester, then put them in the box that matches what they know. Then switch the rule at the top and sort the same six again by whose attack their test copies.

How much has this tester been told about the system before starting?

Still to sort

White box (0)

The tester has full knowledge of the system.

Where the line is: The colour is about how much the tester knows, not whether the tester is good or bad. White box means everything.

Grey box (0)

The tester has some knowledge of the system, but not all of it.

Where the line is: In between: more than nothing, less than everything.

Black box (0)

The tester has no knowledge of the system.

Where the line is: Black does not mean a bad tester. It means the tester starts knowing nothing about the system.

6 of 6 still to sort.

Same tools, different side

Penetration testervsMalicious hacker

Open each row, think about why, then reveal the insight.

Focus

Who they are

Penetration tester

An authorised cybersecurity professional, also called an ethical hacker

Malicious hacker

A hacker with malicious aims

The insight

'Ethical' hangs on 'authorised'. The job title says the tester is allowed to be there.

Tools and methods

Penetration tester

The same tools and methods as a malicious hacker

Malicious hacker

The same tools and methods as a penetration tester

Permission

Penetration tester

Has the permission of the organisation that owns the system

Malicious hacker

Has no permission from the owner

Purpose

Penetration tester

To find and fix vulnerabilities

Malicious hacker

To exploit weaknesses

Put it in order

The four stages of a penetration test

Put the four stages of a penetration test in the order they happen.

1 · Happens first4 · Happens last
  1. Attack

  2. Reporting

  3. Planning

  4. Discovery

SQL injection

?

Reason it through

Why can a simulated SQL injection tell an organisation something useful?

Link 1 of 4

First link · your turn

A website has a box where visitors type things in. The simulated attacker enters harmful SQL code instead of ordinary text. What is the attacker relying on?

2
Locked — reveal the link above first
3
Locked — reveal the link above first
4
Locked — reveal the link above first

Not just keyboards

What does a penetration test actually cover?

A friend says: "A penetration tester just sits at a keyboard trying to break into software. That's all it is."

Which of these is closest to what you think right now?
How sure are you?

Your turn to write

Why pay someone to attack you?

A company pays an ethical hacker to attack its own network. Explain why the company does this, and why the same attack by a stranger would be treated differently. [4 marks]

0 words · your answer stays on this page and is not sent anywhere.

UK note

OCR GCSE Computer Science (J277): penetration testing is in specification section 1.4.2, Identifying and preventing vulnerabilities.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

Same tools as a criminal, one big difference. How a test works, who the tester is pretending to be, and what it can reveal.

What you need to know

  • A penetration test is a controlled, simulated cyber attack, so weaknesses (vulnerabilities) get fixed before real attackers exploit them.
  • Penetration testers, also called ethical hackers, are authorised cybersecurity professionals. They use the same tools and methods as malicious hackers.
  • What separates them is permission from the system's owner, agreed in planning. Testing without it is illegal and unethical.
  • Have a goYour mate announces: "Ethical hackers must use special gentle tools, otherwise it's just hacking." Confidently wrong, or secretly right?

    Wrong. They use the same tools and methods as malicious hackers.

    The tools can't be what separates them. The difference is permission from the organisation that owns the system, plus the aim of finding and fixing weaknesses.

  • Testers may check physical security, staff training, data storage and software security, such as up-to-date patches, antivirus software and firewalls.
  • In white box testing the tester has full knowledge of the system and tests from the perspective of a malicious insider.
  • Black box means no knowledge and an external hacker's perspective. Grey box means some knowledge, but not all, giving a balanced view.
  • Have a goA classmate says: "Black box testers are the bad guys and white box testers are the good guys." What do the colours actually describe?

    How much the tester knows about the system.

    All three kinds are authorised tests. White box is full knowledge, black box is none and grey box is some, so the colour says nothing about the tester's intentions.

  • A test runs in four stages: planning, discovery, attack and reporting.
  • Simulated attacks can be physical, software or social engineering, so a test is not only typed at a keyboard.
  • A simulated SQL injection tricks a web application into running harmful SQL, to test whether it handles user input properly.
  • Simulated social engineering attacks can show whether staff training is needed to improve awareness and security.
  • Have a goA tester rings staff pretending to be from the IT team, and several of them hand over information. What might the organisation take from that?

    Staff may need training to improve awareness and security.

    A successful simulated social engineering attack can show whether staff training is needed, so it points to people and awareness, not just to software.

The big picture

A penetration test is a simulated cyber attack that tests a system's security in a controlled way, so an organisation can fix vulnerabilities before real attackers exploit them. Penetration testers (ethical hackers) use the same tools and methods as malicious hackers, but with the owner's permission, obtained in planning; testing without it is illegal and unethical. White box testers have full knowledge, black box none and grey box some. A test runs through planning, discovery, attack and reporting, and simulated attacks can be physical, software or social engineering.

Key points

1Penetration testing is a simulated cyber attack, used as a controlled way to test a system's security.
2It helps organisations identify and fix vulnerabilities before attackers can exploit them.
3Penetration testers (ethical hackers) use the same tools and methods as malicious hackers, but with the owner's permission.
4Permission must be obtained before the test starts, in the planning stage; testing without it is illegal and unethical.
5White box: full knowledge, malicious insider's view. Black box: no knowledge, external hacker's view. Grey box: some knowledge, balanced view.
6The four stages are planning, discovery, attack and reporting.
7Simulated attacks can be physical, software or social engineering, and each can show the organisation something different.

Worked example

Problem

Practice question: An online shop wants to know how its website would stand up to someone outside the company who knows nothing about how it is built. It hires a tester. Which type of box testing should the tester carry out, when must the shop's permission be obtained, and what would a successful simulated SQL injection on the shop's order form show?

⚠ Watch out

Reading white, grey and black box as labels for the tester's character, so black box sounds like the bad guy. They only describe how much the tester knows: full knowledge, some, or none. All three are authorised tests.

🧠

Memory hook

White box: lights on, you can see everything. Black box: lights off, you see nothing. Grey box: dim light, you see some. The colour is how much the tester can see, never how good or bad they are.

✓

Check yourself

Cover the page. Explain how an ethical hacker and a malicious hacker can use the same tools and still differ. Then name the four stages in order.

Flashcards

(15)
What is penetration testing?
A simulated cyber attack used to test the security of a computer system, network or application. It is a controlled method of testing a system's security.
Why do organisations arrange penetration tests?
It helps them identify and fix security weaknesses (vulnerabilities) before attackers can exploit them.
Who carries out penetration tests?
Penetration testers, also called ethical hackers: authorised cybersecurity professionals who use the same tools and methods as malicious hackers.
When must permission be obtained, and what if it isn't?
Before the test starts, in the planning stage. Testing without permission is illegal and unethical.
Name four areas a penetration tester may check for vulnerabilities.
Physical security, staff training, data storage and software security (for example, whether patches, antivirus software and firewalls are up to date).
Which type of testing gives the tester full knowledge of the system?
White box testing. It tests from the perspective of a malicious insider.
A tester knows nothing about the system beforehand. Which type of testing is that, and whose view does it take?
Black box testing, from the perspective of an external hacker.
What is grey box testing?
The tester has some knowledge of the system but not all of it, giving a balanced view.
What happens in the planning stage?
Define the objectives, scope, rules and type of test, and get permission.
What happens in the discovery stage?
Collect as much data as possible about the system's structure, software and weaknesses, without being detected.
What does the attack stage try to do, and what must it avoid?
Try to gain access to or extract data from the system by simulating real threats, avoiding actual damage.
What goes into the report at the end of a test?
A clear report of the vulnerabilities found, how they were exploited and recommendations to fix them.
Name the three kinds of simulated attack, with an example of each.
Physical (tailgating, shoulder surfing), software (denial-of-service, SQL injection) and social engineering (blagging, baiting).
What is a SQL injection attack?
It tricks a website or app into running harmful SQL code in a database. That can let an attacker view, change or delete data or bypass login systems.
What can a simulated social engineering attack show an organisation?
Whether staff training is needed to improve awareness and security.

Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.

Learning with Lightbulb is opening soon

You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.

Keep me posted

More OCR GCSE Computer Science topics

See the full OCR Computer Science curriculum →

How this lesson was checked. This OCR GCSE Computer Science (specification J277)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 13 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.