OCR GCSE COMPUTER SCIENCE · J277 · PAPER 1
Preventing attacks
Firewalls, anti-malware, strong passwords, encryption, locked doors and friendly hackers.
Paper 1 · Lesson 12
OCR GCSE COMPUTER SCIENCE · J277 · PAPER 1
Preventing attacks
Firewalls, anti-malware, strong passwords, encryption, locked doors and friendly hackers.
Paper 1 · Lesson 12
Lesson 12 of the J277 series (Block B, Paper 1, section 1.4.2 Identifying and preventing vulnerabilities). It follows lesson 11 on threats: today every threat gets a matching defence.
Device-free: show the slide; pupils write the title and date. Image credit: George Prentzas / Unsplash (cover hologram)
00 · MISSION · BY THE END OF THIS LESSON
By the end of this lesson you can…
01 Describe seven ways to protect a network, from firewalls to penetration testing.
02 Match each threat to the defence that best protects against it.
03 Recommend defences for a scenario and explain how each one helps.
Read the three outcomes. OCR scenario questions often ask pupils to recommend methods to protect a system and explain how each one helps; outcome 3 practises exactly that.
Device-free: pupils copy the outcomes and tick each one at the end.
02 · CHECK · DO NOW (LESSON 11)
Warm up: threats to networks
1 What does ransomware do?
2 Give two warning signs of a phishing email.
3 How does a denial of service attack work?
4 What is SQL injection?
▮ TERMINAL // do_now_answers
1 encrypts files, demands payment
2 any two: generic greeting,
urgency, spelling mistakes,
odd sender, suspicious link
3 floods a server with requests
4 SQL code typed into an input
box so the database runs it
Retrieval from lesson 11. Give 4 minutes, then click to reveal the answers line by line.
1 Ransomware encrypts the victim's files and demands payment for the key. 2 Any two: generic greeting, urgency or threats, spelling mistakes, an odd sender address, a link asking for details. 3 It floods a website or server with so many requests that it cannot respond to real users. 4 An attacker types SQL code into an input box on a website; if the input is not checked, the database runs it and can reveal or change data.
Device-free: questions on the board; mini whiteboards.
Recap of lesson 11: harmful software pretends to be a useful free game. Which type of malware is it?
Worm
Virus
Trojan
Spyware
Answer: C, a trojan, because it is disguised as useful software (the free game) but does harm once installed. The disguise is what makes it a trojan.
A worm spreads across a network on its own; a virus attaches to files and spreads when they are opened; spyware secretly records what you do (it can arrive inside a trojan, but the disguise is the trojan's defining feature).
Device-free: students hold up A, B, C or D cards. Image credit: Taylor R / Unsplash
01 · LEARN · MISSION BRIEFING
Layers of defence
No single defence stops every attack, so networks use several at once.
KEEP THEM OUT
Firewalls, anti-malware, strong passwords and locked doors.
LIMIT THE DAMAGE
User access levels and encryption, in case someone gets in.
FIND THE WEAK SPOTS
Penetration testing finds problems before attackers do.
SYSTEM VOICE
System online. Defences activated. Today's mission: build the defences that keep attackers out, from firewalls and strong passwords to locked doors, and match each one to the threat it best protects against.
Click play for the system voice briefing. The words are also on the slide.
The idea of layers of defence (sometimes called defence in depth): each defence covers gaps in the others. Some keep attackers out, some limit the damage if they get in, and penetration testing checks that the whole system holds up.
The seven methods OCR names: penetration testing, anti-malware software, firewalls, user access levels, passwords, encryption and physical security.
Device-free: read the briefing aloud; pupils list as many defences as they already know in one minute.
01 · LEARN · FIREWALLS AND ANTI-MALWARE
The guards on the gate
FIREWALL checks data going in and out against rules, and blocks anything not allowed.
ANTI-MALWARE scans files and emails for known malware and quarantines or deletes it. It must be updated often.
▮ TERMINAL // security.log
> firewall IN web page ..... ALLOW
> firewall IN unknown host . BLOCK
> firewall OUT game.exe ..... BLOCK
> anti-malware scan invoice.zip
trojan found, QUARANTINED
SYSTEM VOICE · KEY DEFINITION
A firewall checks the data coming into and going out of a network against a set of rules, and blocks anything that is not allowed.
Click the terminal to reveal the log line by line, then play the key definition. The first three lines come from the firewall (allowing a normal web page, blocking an unknown outside host, blocking a program trying to send data out); the last line comes from the anti-malware software, which finds and quarantines a trojan inside a downloaded file.
Firewall: hardware or software that sits between a network and the outside world (or on a single computer) and checks incoming and outgoing data against a set of rules, blocking anything unauthorised, such as traffic from unknown sources or programs trying to connect out. It helps stop hackers getting in and malware sending data out.
Anti-malware software: scans files, downloads and emails for known malware (using a database of signatures) and can also spot suspicious behaviour. Found malware is quarantined or deleted. It must be updated regularly so it recognises new malware.
Device-free: pupils write one sentence on what each defence does and one threat it helps to stop.
01 · LEARN · PASSWORDS AND ACCESS LEVELS
Who gets in, and how far
STRONG PASSWORDS
+ long: at least 8 characters, and longer is better
+ a mix of upper and lower case, digits and symbols
+ not a single real word, name or birthday, or three random words joined (NCSC advice)
BACKED UP BY THE SYSTEM
+ lockout: accounts lock after a few wrong tries
+ two-factor authentication: a second check, such as a code sent to your phone
USER ACCESS LEVELS
Each user can only open and change what their role needs.
Pupils: their own work and shared resources
Teachers: pupil work and staff files too
Network manager: everything, including installing software
If one account is hacked or misused, the damage is limited.
Passwords: a strong password is long, mixes character types and is not a single dictionary word or personal information, which makes brute-force and guessing attacks take far longer (link back to the password maths in lesson 11). The UK's National Cyber Security Centre (NCSC) also recommends three random words joined together: long, hard to guess and easy to remember. A single word is weak; three unrelated words are not.
Lockout and two-factor authentication are not features of the password itself: they are controls the system adds. Account lockout after several failed attempts stops brute force. Two-factor authentication adds a second check, so a stolen password alone is not enough. Both are checked in the fill-in at the end of the lesson.
User access levels: each user is given only the access their role needs (read-only, read and write, or none) to each file and folder. This limits what a hacked or misused account can see or change, and stops pupils, for example, opening staff files or installing software.
Device-free: pupils draw a three-row table of school users and what each should be able to access.
Weak or strong? Drag each password into the right box.
WEAK
STRONG
liverpool
tR7!kQ9#vL2m
12345678
Blue-Kettle-Moon-58!
password1
9xP#ve2!Tq4z
Weak: liverpool (a dictionary word, all lower case), 12345678 (digits in order, one of the most common passwords), password1 (a common word plus one digit). Strong: tR7!kQ9#vL2m and 9xP#ve2!Tq4z (12 random characters mixing upper and lower case, digits and symbols), Blue-Kettle-Moon-58! (three random words, the NCSC approach from the previous slide, plus digits and symbols: long and easier to remember).
Stress that pupils must never use these example passwords, because they are now public.
Device-free: pupils sort the six passwords into a two-column table and give a reason for each.
01 · LEARN · ENCRYPTION AND PHYSICAL SECURITY
Lock the data, lock the door
ENCRYPTION
Scrambles data with a key, so if it is intercepted or a laptop is stolen, it cannot be read without the key.
PHYSICAL SECURITY
Locked server rooms, keypads, swipe cards, biometric scanners, CCTV and alarms stop people reaching the hardware itself.
Encryption: data is scrambled using a key so that, if it is intercepted in transit (for example on Wi-Fi) or taken from a stolen device, it cannot be understood without the key. Encryption does not stop the data being taken; it stops it being read.
Physical security: protects the hardware and the people who can reach it. Examples: locked doors and server rooms, keypads and swipe cards, biometric checks (fingerprint, face), CCTV, alarms and security staff. Someone with physical access can steal a server, plug in a device or simply read an unlocked screen.
Device-free: pupils list three physical security measures they can see around the school. Image credit: vuk burgic / Unsplash
01 · LEARN · PENETRATION TESTING
The friendly hackers
Penetration testing means attacking your own system, with permission, to find weaknesses first.
WHO
Security experts hired by the organisation, sometimes called ethical hackers.
HOW
They try the same attacks criminals use: guessing passwords, phishing staff, SQL injection.
WHY
To find and fix weaknesses before real attackers find them.
FOUR STEPS, PERMISSION FIRST
1 written permission and scope agreed 2 testers attack 3 they report every weakness 4 the weaknesses are fixed
Without permission, the same actions are a crime under the Computer Misuse Act 1990.
Penetration testing: an organisation employs (or contracts) security experts to try to break into its own systems, using the methods a real attacker would, in order to find vulnerabilities and fix them before they are exploited. The testers report what they found and how to fix it.
The four steps on the slide, which pupils order on the next slide: 1 the organisation gives written permission and agrees the scope (what may be tested); 2 the testers attack the system with real methods; 3 they report every weakness they found; 4 the organisation fixes the weaknesses.
Tests can simulate an outside attacker with no inside knowledge, or a malicious insider such as an employee who misuses their access. Pupils do not need these names for J277, but the idea helps.
Link to lesson 14: the Computer Misuse Act 1990 makes unauthorised access a crime; permission is what makes penetration testing legal.
Device-free: pupils write the definition in their own words, including the word "permission".
Put the stages of a penetration test in order.
Correct order: 1 the organisation gives written permission and agrees the scope; 2 testers try to break in using real attack methods; 3 the testers report every weakness they found; 4 the organisation fixes the weaknesses.
Ask: why must permission come first? (Without it, the test is illegal hacking.) Why can the weaknesses only be fixed after the report? (The organisation needs to know what was found.)
Device-free: pupils write the four steps on sticky notes and order them on the desk.
Pupils must not open staff files on the school network. Which defence does this?
User access levels
A firewall
Anti-malware software
Penetration testing
Answer: A, user access levels. The network manager gives pupils access to their own work and shared resources only, so staff files are hidden from them.
A firewall controls traffic in and out of the network, not between users inside it. Anti-malware finds malicious software. Penetration testing finds weaknesses but does not control access.
Device-free: students hold up A, B, C or D cards. Image credit: Alexandr Popadin / Unsplash
Which defence best protects against each threat?
ENCRYPTION
STRONG PASSWORDS
ANTI-MALWARE
PHYSICAL SECURITY
An email attachment hides a virus
A stranger walks into the server room
Data is captured on public Wi-Fi
Software tries millions of passwords
Answers: encryption = data captured on public Wi-Fi (the data can still be captured, but it cannot be read without the key: encryption protects against the harm, it does not stop the interception); strong passwords = software trying millions of passwords (with account lockout, brute force becomes impractical); anti-malware = an email attachment hiding a virus; physical security = a stranger walking into the server room.
Ask: which other defences would also help with each one? (For example, a firewall can block known malicious sites; two-factor authentication helps against password guessing.)
Device-free: pupils match the four by drawing lines in their books.
03 · DEBUG · SPOT THE MISTAKE
One line in Omar's notes is wrong
▮ TERMINAL // omar_defences.txt
1 firewall: blocks unauthorised traffic
2 anti-malware: keep it up to date
3 encryption: stops data being intercepted
4 access levels: limit what users see
5 pen testing: attacks with permission
Ask: can an attacker still capture encrypted data? Tap the marker to check.
Tip: Check each line against the definitions you learned, then tap the marker.
Give a minute to find the mistake before tapping the marker.
Answer: line 3. Encryption cannot stop data being intercepted; it makes intercepted data unreadable without the key. This is a very common exam mistake. Lines 1, 2, 4 and 5 are correct.
Device-free: copy the five lines onto the board; pupils write the wrong line number and the correction.
Discuss: your school can afford one new defence this year. Which would you choose, and why?
There is no single right answer: reward a clear choice of one of the seven methods from this lesson, linked to a likely threat. Strong answers say which threat the defence protects against and why that threat matters most for a school (for example, strong passwords with two-factor authentication, because staff accounts can see pupil data; user access levels, so a hacked pupil account cannot reach staff files; or penetration testing, to find out where the real weaknesses are). If pupils suggest staff training, accept it as a sensible idea, but point out that it is not one of the seven methods OCR names, so in the exam they should pick from those.
Use two or three answers to model the structure needed for the exam question that follows: defence, then "this helps because...".
Device-free: think, pair, share; pupils write their choice and one reason on a mini whiteboard.
Complete the summary.
A firewall checks data entering and leaving a network against a set of rules. Up-to-date anti-malware software scans files for malware. User access levels limit what each person can see. With encryption, intercepted data cannot be read without the key. In penetration testing, experts attack a system with permission to find weaknesses. Locked doors are a form of physical security. Account lockout stops brute-force attacks, and two-factor authentication means a stolen password alone is not enough.
Answers in order: firewall, anti-malware, access, encryption, penetration, physical, lockout, authentication. Distractors: phishing, spyware, worm (all threats, not defences).
Device-free: paragraph on the board with gaps and the word bank; pupils write the eight missing words.
EXAM · A dental surgery stores patient records on its network. Recommend two methods to protect the records, and explain how each one helps. [4 marks]
Exam-style question, 4 marks. Give 5 minutes. The model answer is on the next slide.
Mark scheme: for each of two methods, 1 mark for the method and 1 mark for how it protects the records in this context. Accept: user access levels, encryption, strong passwords (or two-factor authentication), firewall, anti-malware, physical security, penetration testing. The explanation should link to patient records, for example "only dentists can open medical notes".
Device-free: pupils answer on paper, then peer-mark with the next slide.
04 · EXAM · MODEL ANSWER
Method, then how it helps
User access levels.
Receptionists can see appointments, but only dentists can open medical notes, so fewer people can see or change private records.
Encryption.
The records are encrypted, so if a laptop is stolen or data is intercepted, it cannot be read without the key.
MARK SCHEME
1 mark: first method
1 mark: how it protects the records
1 mark: second method
1 mark: how it protects the records
Link each one to the surgery, not just to any network.
Click to reveal the model answer one part at a time: each method and each explanation earns one mark.
Common weak answer: "Use a firewall and anti-virus to keep it safe." This names two methods but explains neither, so it earns 2 marks out of 4. Each method needs a "so..." that says how it protects the patient records.
Device-free: read the model answer aloud; pupils underline the four mark-earning parts in their own answer.
Exit check: could you recommend defences?
Yes: I can choose and explain them
Mostly: I can choose, but explaining is harder
Not yet: I need another go
Anonymous exit poll. If many pupils find explaining harder, start lesson 13 with one more "method, then how it helps" practice.
Device-free: thumbs up, sideways or down.
05 · NEXT · KEEP GOING
Keep going
Isaac Computer Science
Free online lessons and questions. Look for the cyber security topic.
BBC Bitesize
GCSE Computer Science, OCR: revise preventing network security threats.
OCR past papers
J277/01 papers and mark schemes on the OCR website: try the network security questions.
Next lesson: systems software, what the operating system and utility programs do behind the scenes.
Point pupils to the three places to practise. Isaac Computer Science and BBC Bitesize are free; OCR past papers and mark schemes are on the OCR website.
Device-free: pupils write down one question they still have about preventing attacks to bring to lesson 13.