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.
SQL injection
Reason it through
Why can a simulated SQL injection tell an organisation something useful?
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?
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
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?
Why do organisations arrange penetration tests?
Who carries out penetration tests?
When must permission be obtained, and what if it isn't?
Name four areas a penetration tester may check for vulnerabilities.
Which type of testing gives the tester full knowledge of the system?
A tester knows nothing about the system beforehand. Which type of testing is that, and whose view does it take?
What is grey box testing?
What happens in the planning stage?
What happens in the discovery stage?
What does the attack stage try to do, and what must it avoid?
What goes into the report at the end of a test?
Name the three kinds of simulated attack, with an example of each.
What is a SQL injection attack?
What can a simulated social engineering attack show an organisation?
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 postedMore OCR GCSE Computer Science topics
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.