Securing Applications and Data: AP Cybersecurity lesson plans
One plan for each of the unit's 16 problem sets, about 33 class periods in all (45 minutes each). Every plan splits the set day by day: the opener, the mini-lesson, which problems to do together, in pairs and alone, and an exit check.
- Foundations: Web Applications, Databases, and FilesPractice set · Topic Foundations (background for 5.1 to 5.6) · 1 class periodA web application copies what a visitor sends into a query, reads the row the database answers with, and builds the page from it, while its files and its memory hold the rest. A replica copies every change, mistakes included, so only a backup saved before a mistake can undo it, and only one that worked.
- Injection AttacksPractice set · Topic 5.1 Application and Data Vulnerabilities and Attacks · 2 class periodsWhen a program copies what a user typed into something it hands on, a query for the database or a page for a browser, the typed characters can become instructions. In an SQL injection the database runs them; in cross site scripting the browser of whoever loads the page runs them.
- Memory and Path AttacksPractice set · Topic 5.1 Application and Data Vulnerabilities and Attacks · 1 class periodBoth attacks push a program past an edge it never checks. A buffer overflow writes input past the end of the memory set aside for it, over whatever is stored next; a directory traversal adds
..to a request's path until the path climbs out of the folder the server hands out. - Data Vulnerabilities and RiskPractice set · Topic 5.1 Application and Data Vulnerabilities and Attacks · 2 class periodsA data weakness is rated by two things, read in order: how sensitive the data is, then how readily someone could use the weakness. An adversary who takes over an account gets exactly what that account could do, and what the weakness allows (reading, changing, or destroying) names the property at risk.
- Data States, Regulated Data, and PoliciesPractice set · Topic 5.2 Protecting Applications and Data: Managerial Controls and Access Controls · 2 class periodsTwo facts about data decide how they are protected: their state and their kind. The state (stored, in transit, or in use) decides which control works, and drive encryption does nothing for a copy on a cable or open on a screen. The kind (PII, PHI, or PCI) decides which law applies, and the organization's labels and written policies carry that law into daily work. Two of those policies, cryptography and web application security, each have a short list the CED spells out.
- Access Control ModelsPractice set · Topic 5.2 Protecting Applications and Data: Managerial Controls and Access Controls · 2 class periodsTo name an access control model, ask who decides. Under RBAC a role carries the access. Under RuBAC each request is tested against rules such as time or place, usually on top of another model. Under DAC the owner of an object sets access to it, and super users can override that. Under MAC an outside administrator gives every subject and every object a level, and fixed rules compare the two.
- File PermissionsPractice set · Topic 5.2 Protecting Applications and Data: Managerial Controls and Access Controls · 3 class periodsAn
ls -lpermission string is three sets ofrwx: the owner's, the group's, and everyone else's. Find the one set that applies to the account and read its three letters. To change it,chmodtakes either three digits (4 read, 2 write, 1 execute, added up) or letters (u,g,o,a, then+or-, thenr,w,x). - Cryptography and Symmetric EncryptionPractice set · Topic 5.3 Protecting Stored Data with Cryptography · 3 class periodsEncryption combines plaintext with a key to make ciphertext, and it hides what a file says from anyone without the key. Algorithms are sorted two separate ways: by key count (one key is symmetric, two is asymmetric) and by how they take input (fixed-size blocks or a continuous stream). AES is a symmetric block cipher, and a longer key buys security at the cost of time.
- Asymmetric KeysPractice set · Topic 5.4 Asymmetric Cryptography · 2 class periodsEach receiver generates a key pair, publishes one key and keeps the other secret. Whatever one key encrypts, only its partner decrypts. To send data only one party can read, encrypt with that party's public key. If the private key leaks, the whole pair is replaced.
- Key Length and Public Key CommandsPractice set · Topic 5.4 Asymmetric Cryptography · 3 class periodsEach bit added to a key doubles the keyspace, and a random search finds the key after half of it on average. Length means security, but only against keys of the same algorithm. On the command line, the public key file encrypts and the key pair file decrypts.
- Protecting ApplicationsPractice set · Topic 5.5 Protecting Applications · 2 class periodsSecurity 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.
- Detective Controls for DataPractice set · Topic 5.6 Detecting Attacks on Data and Applications · 2 class periodsEach detective control notices one kind of event. Access records show who opened, copied, or deleted what, and when, where, and on which device; a honeypot shows that someone opened a fake file nobody needs; a hash shows that a file's contents changed. Choose among them by cost, sensitivity, and classification, then ask when each one reports and what it can't see. A quiet control says nothing about events it doesn't watch.
- Integrity HashingPractice set · Topic 5.6 Detecting Attacks on Data and Applications · 2 class periodsThe same file run through the same hash function always gives the same digest. Record a file's digest, hash it again later with the same function, and compare: a match means the contents were the same at both hashings, and a mismatch means the file was altered in between. The digest says nothing about who made the change, what it was, or when it happened.
- Reading Application LogsPractice set · Topic 5.6 Detecting Attacks on Data and Applications · 3 class periodsRead each request for something you can point to: SQL symbols and capitalized control words, a script tag,
../in a requested path or in a parameter that names a file, or a field far longer than that field normally holds. That sign names the attack. The stem says what normal looks like here, and the status code says only how the server answered, so a refused request is still an attempt. - Unit 5 Performance TaskPerformance task · Topic 5.1 to 5.6 Securing Applications and Data (applied) · 2 class periodsEvery claim in the written answer points at a line the sources print. Each subpart earns one point, and a subpart that asks for an entry or a file name earns nothing without it: the right attack named without the lines that show it earns the naming point and nothing else.
- Unit 5 TestUnit test · Topic 5.1 to 5.6 Securing Applications and Data (whole unit) · 1 class period