Lesson plan: Protecting Applications
AP Cybersecurity · Unit 5 Securing Applications and Data · Topic 5.5 Protecting Applications · Practice set
At a glance
- Suggested time
- 2 class periods (45 min)
- Pacing
- The only set for Topic 5.5. The CED gives Topic 5.5 two class periods; this plan suggests 2 for this set, Day 1 for 5.5.A (secure by design and secure by default) and Day 2 for 5.5.B (input sanitization). The CED does not divide its periods between the two LOs, so that split is this plan's suggestion. Input sanitization is the mitigation for the attacks students met in Injection Attacks and Memory and Path Attacks.
- Before this set
- Injection Attacks (SQL injection, cross site scripting, and the quote mark that ends a typed value early) and Memory and Path Attacks (directory traversal, which Problem 9 🔒 uses). The Foundations lesson Web Applications, Databases, and Files for how a form's input reaches a query, a page, or a file. From Anti-Malware and Patching (Unit 4): why installing updates matters, which the lesson's Log4Shell story leans on.
- Skills
- 2.A Identify security controls, and explain how they mitigate risks.2.B Determine layered security controls that address vulnerabilities.
The one idea: Security is the maker's job, built in from the first design and switched on when the product ships. In code, that starts with checking every piece of user input before the program uses it.
Day by day
Day 1 · Secure by design and secure by default45 min
- Open (3 min)Project the chat window image from the lesson's Log4Shell section and ask what a line of game chat could have to do with a server being taken over. Take a few guesses before the mini-lesson.
- Mini-lesson (14 min)Teach Protecting Applications, from the top through the paragraph after the Secure by default box, stopping before The search box. Stop at the question "What can the owner check from outside, before signing the next year's contract?" and take answers before reading the next paragraph.
- Do together (5 min)Problem 1 🔒 🔒 Teacher notes: sign in as a teacher to see this🔒 Teacher notes: open the full plan to see this
- On their own (8 min)Problem 2 🔒 what a secure by default tablet looks like · Problem 4 🔒 which vendor practice owns the customer's security outcome.
- In pairs (8 min)Problem 5 🔒 Problem 7 🔒: one student reads the principle the stem names, the other says what that principle asks the company to do before either reads the choices.
- Discuss (4 min)Problem 7 🔒 🔒 Teacher notes: sign in as a teacher to see this🔒 Teacher notes: open the full plan to see this
- Exit check (3 min)🔒 Teacher notes: sign in as a teacher to see this🔒 Teacher notes: open the full plan to see this
Day 2 · Input sanitization45 min
- Open (4 min)Review from Injection Attacks and Memory and Path Attacks: for SQL injection, cross site scripting, and directory traversal, what does the adversary type, and what part of the system acts on it? Keep the three answers on the board for the day.
- Mini-lesson (10 min)Teach Protecting Applications, The search box to the end. Stop at the question "What happens to that search if the function strips every single quote?" and take answers before reading the next paragraph.
- Do together (6 min)Problem 3 🔒 🔒 Teacher notes: sign in as a teacher to see this🔒 Teacher notes: open the full plan to see this
- On their own (6 min)Problem 6 🔒 which practice stops an SQL injection through a public form.
- In pairs (8 min)Problem 8 🔒 Problem 9 🔒: one student names what the attacker's input carried and which part of the system acted on it, the other tests each choice against that. Then they agree on the answer.
- Discuss (6 min)Problem 9 🔒 Problem 8 🔒 🔒 Teacher notes: sign in as a teacher to see this🔒 Teacher notes: open the full plan to see this
- Wrap (5 min)Students add a line under each of the three attacks on the board: what input sanitization removes or refuses for that attack.
Differentiation
- If students are struggling
- On Day 1, before the pairs work, students make a four-row chart from the lesson's definition boxes: secure by default and the three principles, each with one thing a company does to follow it. On Day 2, they add one row each for SQL injection, cross site scripting, and directory traversal: what the adversary types and what the check removes or refuses.
- Extension
- Students check an app they use from outside, as the lesson's bookstore owner would: does the maker publish security notices that name the flaw, the versions affected, and the fix? What is switched on in a fresh install before anyone changes a setting? They write three sentences on what they found.
- Vocabulary support
- library, vulnerability, secure by design, secure by default, radical transparency, accountability, security-first posture, control characters, input sanitization, verification function, structured query language (SQL) injection, cross site scripting (XSS), directory traversal.
🔒 Answer keyEvery problem's answer, the concept and essential knowledge it checks, and the trap it targets.Sign in as a teacher to see this🔒 Traps this set testsWhat each common wrong answer looks like, and one line to say when you see it.Sign in as a teacher to see this🔒 What to emphasizeThe points that decide the set's problems.Sign in as a teacher to see this🔒 Questions to ask aloudQuestions for the class discussion, with what to listen for.Sign in as a teacher to see this🔒 On the examHow the set's ideas appear on the AP exam, from the course framework.Sign in as a teacher to see this🔒 Your class so farLive results for your section: the problems a third or more missed on the first try, the most common wrong answer, and what it usually means.Sign in as a teacher to see this
From the course framework
LO 5.5.A Identify the application security principles of secure by design and security by default.
- 5.5.A.1 Secure by design is an initiative that encourages companies to include security in all phases of product development including design. When organizations implement secure by design, security is a design principle not just a technical feature.
- 5.5.A.2 Secure by design includes three design principles: - i. Companies should take ownership of customer security outcomes. Companies should build products that meet the security needs of their customers. - ii. Companies should embrace radical transparency and accountability. Sharing relevant security-related product news and updates quickly increases security for everyone. - iii. Companies should build organizational structure and leadership to implement secure by design. Companies need leaders who are focused on security and have a security-first posture.
- 5.5.A.3 Secure by design includes the concept of secure by default, which is the idea that security features for software and devices should be enabled by default. Devices and software should be secure to use out of the box, with security features already enabled.
LO 5.5.B Explain how user input sanitization protects applications.
- 5.5.B.1 When users enter input into an application, the application typically encases that input in special characters to process it. The characters that encase the user input are called control characters and include the single quote, the double quote, and the semicolon.
- 5.5.B.2 When creating a program that takes user input, programmers should use a function to verify that user input meets their expected criteria and does not include any control characters that could be used to manipulate the system. This verification function can sanitize user input by removing potentially malicious characters, or it can give the user an error and force the user to provide different input. This can protect against many application attacks, including: - SQL injection attacks - XSS attacks - Directory traversal attacks