Unit bundle · Written for OCR J277

Cyber Security and Robust Programs – OCR GCSE Computer Science lessons (J277)

14 OCR J277 lessons on malware, phishing, attacks and prevention, with functions, validation, testing and maintainable code.

Also in a bundle Year 11 GCSE Computer Science – a full year of OCR J277 lessons 45 lessons for £119 · save 33% on buying separately

The first Year 11 unit puts both papers side by side for the last time before revision. On the Paper 1 track pupils learn how systems are attacked – malware, phishing and other social engineering, brute-force and denial of service attacks, data interception and SQL injection – and how each is prevented, from firewalls and anti-malware to access levels, encryption and penetration testing. On the Paper 2 track they learn to write programs that survive mistakes and misuse: procedures and functions with parameters, local and global variables, defensive design and authentication, input validation, maintainable code, and testing with normal, boundary, invalid and erroneous data. Every lesson is set in Kickstand, a small online trainer shop, so the attacks pupils study and the programs they harden are the ones a real online business has to deal with.

Unit 11.1 is taught in Year 11, Autumn 1, and answers one big question: How do we protect systems from attack and from mistakes? Every lesson uses the same real-world context (kickstand, a small online trainer shop run by two founders: its website and customer database, staff email, a limited-edition trainer drop, and the Python programs behind its orders), and pupils make a threat-and-defence plan for Kickstand, and tested Python subprograms for its order system: a discount calculator, a shoe-size validator and a prize-draw picker. The careers link is a penetration tester: a penetration tester is paid to attack a company's systems with permission, find the weak spots and recommend defences – the skills in this unit.

What happens in each lesson:

Lesson 1, Threats: malware: What is malware, and what harm can it do?

Lesson 2, Procedures and functions: Why do programmers split code into procedures and functions? Main task: write a function discount_price that is given a price and returns the price with Kickstand's 20% sale discount, then call it for three trainers and print each result.

Lesson 3, Social engineering and phishing: How do attackers trick people instead of hacking computers? Main task: identify three warning signs in the fake 'courier' email sent to Kickstand's staff, and explain how each sign shows the email is a phishing attack.

Lesson 4, Parameters, return values, local and global variables: How do data get in and out of a subprogram safely? Main task: write a function delivery_cost with parameters weight and express that returns Kickstand's delivery charge, then call it for three test orders.

Lesson 5, Brute-force and denial of service attacks: How can attackers guess passwords or knock a website offline? Main task: explain how a brute-force attack and a denial of service attack could each harm Kickstand during its limited trainer drop, and suggest one way to prevent each.

Lesson 6, Data interception and SQL injection: How is data stolen in transit or through an input box? Main task: explain how an attacker could steal Kickstand's customer data by data interception and by SQL injection, and describe one way to prevent each.

Lesson 7, Defensive design: anticipating misuse and authentication: How do programmers plan for users who make mistakes or misuse programs? Main task: write an algorithm for Kickstand's staff login that asks for a username and password, allows three attempts, and locks the account after the third failure.

Lesson 8, Input validation: How can a program refuse input that does not make sense? Main task: write a function valid_size that returns True only if a shoe size is a whole number from 3 to 13, then use it in a loop that keeps asking until a valid size is entered.

Lesson 9, Preventing attacks: penetration testing, anti-malware, firewalls, access levels, passwords, encryption, physical security: How can a business stop the attacks we have studied? Main task: recommend three security measures for Kickstand, explaining which threat each one prevents and how it prevents it.

Lesson 10, Maintainable code: What makes code easy for someone else to change? Main task: make Kickstand's stock-check program maintainable: rename its variables, add comments, fix its indentation and move the repeated code into a subprogram.

Lesson 11, Testing: purpose, types and errors: Why do we test programs, and what errors do we find? Main task: identify the two syntax errors and the logic error in Kickstand's basket-total program, state the type of each, and write the corrected lines.

Lesson 12, Test data and test plans: How do we choose test data that really tests a program? Main task: complete a test plan for Kickstand's shoe-size check (3 to 13), giving two normal, two boundary, one invalid and one erroneous test, each with its expected result.

Lesson 13, Random numbers and programming practice: How can a program pick a winner fairly by chance? Main task: write a function pick_winner that is given a list of customer names and returns one chosen at random, then test it with three different lists, including one with a single name.

Lesson 14, Progress Check: 30 multiple-choice questions (the teacher assigns them to the class as homework or at the start of the next lesson), plus a 40-minute written paper of 40 marks in the lesson.

Misconceptions it tackles include
“All malware is a virus”; “A function and a procedure are the same thing”; “Social engineering means hacking through social media”. Each is planned into a hinge question before the main task or an exit question, so you find out who still holds it.
OCR J277 specification coverage
1.4.1, threats to computer systems and networks: malware, social engineering (including phishing), brute-force attacks, denial of service attacks, data interception and theft, and SQL injection; 1.4.2, identifying and preventing vulnerabilities: penetration testing, anti-malware software, firewalls, user access levels, passwords, encryption and physical security; 2.2.3, additional programming techniques: subprograms (procedures and functions), parameters and return values, local and global variables, and random number generation; 2.3.1, defensive design: anticipating misuse, authentication, input validation, and maintainability (subprograms, naming conventions, indentation and comments); 2.3.2, testing: the purpose of testing, iterative and final testing, syntax and logic errors, normal, boundary, invalid and erroneous test data, and refining algorithms.

It builds on 10.6 Protocols and Sorting (encryption, HTTPS, iterative and final testing), 10.5 networks and client-server, 10.4 strings and arrays, 10.2 selection and 10.3 loops, and KS3 9.3 Cyber Security and 9.1 Python functions. It leads on to 11.2 Systems Software, Languages and Data Handling (SQL, file handling, IDE tools and Section B problems use functions, validation and testing), 11.3 impacts of technology (the Computer Misuse Act and data protection), and 11.4 revision.

Adapting it for your school
Lessons 2, 4, 8 and 13 use any Python 3 editor and each has a paper version; every other lesson needs no computers. The threat lessons (1, 3, 5, 6) and the prevention lesson (9) can be taught as one block if you prefer, as long as lesson 9 comes last. Swap Kickstand for any online business your pupils know, such as a ticket site or a game store, keeping the same database, staff and order programs. OCR does not require the names of individual malware families, attack software or SQL beyond the idea of injection. They appear only as context.

Two versions in one download. The "With quiz" folder is for schools with a Code & Commerce Quizzes subscription: wherever the lessons use a Progress Check, its multiple-choice questions are ready-made on the quiz site for you to set, with a printed version as the backup. The "Without quiz" folder is the same teaching for standalone use, with no mention of the quiz site and every check on paper. You don't need a quiz subscription to use it.

What's included

  • 14 lesson slide decks (PowerPoint)
  • 14 lesson plans (Word)
  • 14 worksheets, plus 13 support versions with scaffolds (Word)
  • 1 exam-style paper with mark scheme (Word)
  • Medium term plan with intent, key words, misconceptions and adaptive teaching notes (Word)
  • Progress Check lesson to assess the unit
  • Random numbers and programming practice - Quiz Quiz Trade Cards
  • Department licence: every teacher in your department can use and adapt it
  • Two versions of the files: one for Code & Commerce Quizzes subscribers and one for standalone teaching, no quiz site needed

In this bundle

Worth £56 bought separately at £4 a lesson. The bundle saves you 30%.

More for GCSE Computer Science (OCR)

See all

Written for the specifications named. Not endorsed by or affiliated with any exam board.