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.

  1. Foundations: Web Applications, Databases, and Files
    Practice set · Topic Foundations (background for 5.1 to 5.6) · 1 class period
    A 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.
  2. Injection Attacks
    Practice set · Topic 5.1 Application and Data Vulnerabilities and Attacks · 2 class periods
    When 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.
  3. Memory and Path Attacks
    Practice set · Topic 5.1 Application and Data Vulnerabilities and Attacks · 1 class period
    Both 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.
  4. Data Vulnerabilities and Risk
    Practice set · Topic 5.1 Application and Data Vulnerabilities and Attacks · 2 class periods
    A 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.
  5. Data States, Regulated Data, and Policies
    Practice set · Topic 5.2 Protecting Applications and Data: Managerial Controls and Access Controls · 2 class periods
    Two 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.
  6. Access Control Models
    Practice set · Topic 5.2 Protecting Applications and Data: Managerial Controls and Access Controls · 2 class periods
    To 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.
  7. File Permissions
    Practice set · Topic 5.2 Protecting Applications and Data: Managerial Controls and Access Controls · 3 class periods
    An ls -l permission string is three sets of rwx: 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, chmod takes either three digits (4 read, 2 write, 1 execute, added up) or letters (u, g, o, a, then + or -, then r, w, x).
  8. Cryptography and Symmetric Encryption
    Practice set · Topic 5.3 Protecting Stored Data with Cryptography · 3 class periods
    Encryption 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.
  9. Asymmetric Keys
    Practice set · Topic 5.4 Asymmetric Cryptography · 2 class periods
    Each 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.
  10. Key Length and Public Key Commands
    Practice set · Topic 5.4 Asymmetric Cryptography · 3 class periods
    Each 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.
  11. Protecting Applications
    Practice set · Topic 5.5 Protecting Applications · 2 class periods
    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.
  12. Detective Controls for Data
    Practice set · Topic 5.6 Detecting Attacks on Data and Applications · 2 class periods
    Each 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.
  13. Integrity Hashing
    Practice set · Topic 5.6 Detecting Attacks on Data and Applications · 2 class periods
    The 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.
  14. Reading Application Logs
    Practice set · Topic 5.6 Detecting Attacks on Data and Applications · 3 class periods
    Read 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.
  15. Unit 5 Performance Task
    Performance task · Topic 5.1 to 5.6 Securing Applications and Data (applied) · 2 class periods
    Every 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.
  16. Unit 5 Test
    Unit test · Topic 5.1 to 5.6 Securing Applications and Data (whole unit) · 1 class period