Lesson plan: Unit 5 Test

AP Cybersecurity · Unit 5 Securing Applications and Data · Topic 5.1 to 5.6 Securing Applications and Data (whole unit) · Unit test

At a glance

Suggested time
1 class period (45 min)
Pacing
The course lists this test after the unit's 14 practice sets and the Unit 5 Performance Task. The CED's 30 class periods for Unit 5 all go to the six topics (5, 7, 4, 5, 2, and 7), so this day sits outside them. By each problem's learning objective, 4 problems are on Topic 5.1, 9 on 5.2, none on 5.3, 1 on 5.4, 1 on 5.5, and 5 on 5.6. Counting every EK a problem uses, Topic 5.1 appears in 8 problems, 5.2 in 10, 5.3 in 2, 5.4 in 2, 5.5 in 5, and 5.6 in 7.
Before this set
The unit's 13 topic sets, Injection Attacks through Reading Application Logs, and Foundations: Web Applications, Databases, and Files. The test adds no new terms. Students should read a long listing line such as -rw-r----- 1 jlee staff budget.xlsx (permission string, owner, group, file name), and know that a status of 200 in a web server log means the server answered the request.
Skills
1.A Identify, with and without the support of AI, vulnerabilities, threats, and attack methods, and explain how they generate risk.
1.B Determine ways adversaries exploit vulnerabilities to compromise an asset.
1.C Evaluate, with and without the support of AI, the likelihood and impact of risks.
2.A Identify security controls, and explain how they mitigate risks.
2.B Determine layered security controls that address vulnerabilities.
2.D Implement and log mitigations with and without the support of AI.
3.A Identify methods for monitoring systems, and explain how they detect attacks.
3.B Determine strategies and methods to detect attacks.
3.C Evaluate the impact of threat detection methods.
3.D Detect and classify cyberattacks by analyzing digital evidence with and without the support of AI.

Day by day

Test day · Unit 5 Test43 min

Differentiation

If students are struggling
Before the day, have them redo the problems from the practice set for their weakest topic (the list under Before · review). During, suggest they read the Ridgeway report once before Problem 13 🔒 and mark the log line that differs from the others and the owner of each file.
Extension
🔒 Teacher notes: sign in as a teacher to see this🔒 Teacher notes: open the full plan to see this
Vocabulary support
data validation, input sanitization, control characters, buffer, stored cross site scripting, directory traversal, accounting, digest, honeypot, least privilege, discretionary, role-based, rule-based, and mandatory access control, Bell-LaPadula, remediation timeline, data at rest and in use, public and private key, numeric chmod mode.

From the course framework

LO 5.1.A Explain how adversaries can exploit application and file vulnerabilities to cause loss, damage, disruption, or destruction.

  • 5.1.A.1 An adversary can read any unencrypted files if they have access to the device or drive storing the files.
  • 5.1.A.2 Computers have standard users and administrative users. Administrative users have access to control system settings and can typically access any files or applications on a system. If regular users are given administrative privileges on a computer, and an adversary can compromise a user's account, then the adversary will have elevated privileges on the system.

LO 5.1.B Explain how application attacks exploit vulnerabilities.

  • 5.1.B.4 An SQL-injection attack places SQL commands and control characters into a user-input field in an application, which can lead to a breach of confidentiality by causing the application to return more information than it should, or a breach of integrity by modifying or deleting data in the database.
  • 5.1.B.6 A cross site scripting (XSS) attack injects malicious code into a website that a user's browser then executes. The malicious code can be embedded in a link the user clicks (a Type I or Reflected XSS attack) or it can be inserted onto a website through a comment field, forum post, or visitor log, which would affect any user visiting that website (a Type II or Stored XSS attack).
  • 5.1.B.8 A buffer overflow attack feeds more data into memory than was allotted, which can cause a system to crash or to execute code outside the scope of a program's security policy, effectively allowing the adversary to perform unauthorized actions on a computer, such as accessing, modifying, or deleting files.
  • 5.1.B.10 In a directory traversal attack, adversaries modify URLs and GET requests to attempt to access sensitive data (e.g., usernames and passwords) on a server's file system.

LO 5.1.C Assess and document risks from application and data vulnerabilities.

  • 5.1.C.1 Data security risks can involve a compromise of confidentiality when unauthorized persons can access sensitive data, integrity when data can be manipulated or altered from its intended state, and availability when data can be destroyed or encrypted to prevent others from accessing it.
  • 5.1.C.2 High risks from data vulnerabilities often involve highly sensitive data (e.g., data that is governed by laws or regulations) that could be compromised through a highly likely exploit.
  • 5.1.C.3 Moderate risks from data vulnerabilities often involve sensitive data not having strong enough encryption or strict enough access controls.
  • 5.1.C.4 Low risks from data vulnerabilities often involve less sensitive information being encrypted with shorter keys or having access controls that are not strict enough.

LO 5.2.A Explain how the state or classification of data impacts the type and degree of security applied to that data.

  • 5.2.A.2 Data can be classified by their state. Data at rest are stored on a drive. It is important to protect the physical drive storing the data from destruction or theft. Data at rest can also be encrypted so that if an adversary steals it, they can't immediately read the data. Data in transit are being sent from one device to another. If the data are being transferred over physical media (e.g., cables) it is important to protect the media. Data in transit can also be encrypted so that if an adversary intercepts it, they can't immediately read the data. Data in use are being processed by software or a person. Access controls can be used to limit who or what has the ability to use data in different ways (e.g., view or edit). Data must be unencrypted to be used.

LO 5.2.B Identify managerial controls related to application and data security.

  • 5.2.B.2 A web application security policy will outline the requirements and parameters for testing and mitigating web application vulnerabilities in an organization, and it may include: Parameters for when an application is subject to a security assessment; Timelines for remediating vulnerabilities based on level of risk; Parameters for how an application security assessment is to be carried out (e.g., using specific tools or according to specific frameworks)

LO 5.2.C Determine an appropriate access control model to protect applications and data.

  • 5.2.C.2 Role-based access control (RBAC) assigns every subject to a role and defines which roles have which types of access to which objects.
  • 5.2.C.3 Rule-based access control (RuBAC) checks a set of rules to determine what type of access a subject should have for a specific object and then allows or denies types of access based on the rules. This access control model is typically layered on top of another access control model.
  • 5.2.C.4 Discretionary access control (DAC) gives individual subjects the ability to set the type of access that other subjects have on objects they own. In DAC models some subjects are designated as administrators or super users, and they have the ability to override the access controls established by other subjects.
  • 5.2.C.5 Mandatory access control (MAC) follows strict rules for which types of access each subject level has for objects that are above their level, at their level, or below their level. Subject and object levels are assigned by an external administrator.
  • 5.2.C.6 The Bell-LaPadula model is a MAC model that is often used by governments and military organizations to control the security of information. This model has the following two important properties: i. The Simple Security Property states that subjects may not read objects that are above their level. ii. The * (Star) Security Property states that subjects may not write to objects below their level. These rules taken together are often summarized as "write up, read down" (WURD).
  • 5.2.C.7 The principle of least privilege is the idea that entities should be given exactly as much access as they need to perform their function and no more.

LO 5.2.D Configure access control settings on a Linux-based system.

  • 5.2.D.3 There are three default entities for which permissions are set and always in this order: (1) the file owner, (2) the file group, and (3) all other users. The three sets are displayed with no spaces (e.g., rwxrwxrwx).
  • 5.2.D.6 To use chmod in the numeric method the syntax is chmod ### filename. Each of the three ### represents one of the three entities mentioned above (the owner, the group, other nongroup users). The first # = the owner; The second # = the group; The third # = other nongroup users; The permission for each entity is determined by adding up the values for the types of access to be granted: 0 = no permissions; 1 = execute; 2 = write; 4 = read; Therefore 3 sets permission to write and execute, 5 sets permission to read and execute, 6 sets permission to read and write, and 7 sets permission to read, write, and execute.

LO 5.3.A Explain how encryption can be used to protect files.

  • 5.3.A.2 An encryption algorithm defines a process for combining the information to be encrypted with a predefined key. The information to be encrypted is called the plaintext. The output of the encryption algorithm is called the ciphertext.
  • 5.3.A.4 Cryptographic algorithms are classified by whether they use one key or two keys. Symmetric encryption algorithms use the same key to encrypt and decrypt information. Asymmetric encryption algorithms use two different keys—one to encrypt information and the other to decrypt information.

LO 5.4.A Determine the appropriate asymmetric key to use when sending or receiving encrypted data.

  • 5.4.A.3 Once the receiver generates the key pair, the private key must be stored securely. If the private key is exposed, shared, stolen, corrupted, or compromised the key pair must be deleted and a new key pair must be generated, because the security of the encryption algorithm rests on the security of the private key. The public key is published for anyone to view and use.
  • 5.4.A.4 To send information securely to someone, the sender will use the receiver's public key to encrypt the data and send it. Only the receiver who has the private key will be able to decrypt and read the information.

LO 5.5.A Identify the application security principles of secure by design and security by default.

  • 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.

LO 5.5.B Explain how user input sanitization protects applications.

  • 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

LO 5.6.A Explain how to detect attacks on data.

  • 5.6.A.1 Devices track and log when data are accessed and by whom. The process of recording and monitoring user activities is called accounting. Analysis of these logs can reveal malicious activity when an adversary attempts to access, copy, move, or delete data. Suspicious activity can include: Accessing files that aren't typically accessed; Accessing files or applications outside of a user's normal patterns (including time of day, location, and device type); Attempts to delete or copy sensitive files
  • 5.6.A.3 Cryptographic hash functions can generate a digest for data and can reveal if data have been altered. If a file has changed unexpectedly, this can be a sign of malicious activity.

LO 5.6.B Determine controls for detecting attacks against applications or data.

  • 5.6.B.1 Cost is a criterion in determining detective controls. Detective controls like honeypots and using hash values to check data integrity are inexpensive. Some organizations invest in third-party data loss prevention (DLP) services, which monitor data access, usage, and transmission by users throughout the organization to detect suspicious activity; DLP services provide strong detection capabilities at a higher cost.

LO 5.6.C Evaluate the impact of a method for detecting attacks against an application or data.

  • 5.6.C.2 Some DLP tools, honeypots, and realtime automated log analysis provide alerts as an attack is happening. These tools allow for a prompt response that can stop an attack before it does more harm. Retrospective log analysis and the use of cryptographic hashes to verify data integrity identify attacks after they have occurred.
  • 5.6.C.3 False negatives can occur in applications and data attack detection. Cryptographic hash functions only detect if data have been altered. An adversary could view and steal data without altering it, and a cryptographic hash function would not detect this. Honeypots cannot detect adversaries that do not attempt to access them.

LO 5.6.D Identify whether a file has been altered by verifying its hash.

  • 5.6.D.3 A file can be hashed and its hash output recorded. Then it can be hashed again later, and the second hash output can be compared to the previous hash output for the same file. If a file's hash changes, then the file was altered between when the first and second hashes were generated.

LO 5.6.E Apply detection techniques to identify and report indicators of application attacks by analyzing log files.

  • 5.6.E.1 SQL injection attacks can be detected by reviewing application and server logs of user input for SQL control words and symbols such as: A single or double quote character: " , '; Boolean conditions like OR 1=1; A double dash (which indicates a comment in SQL): --; SQL control words (always in capital letters) like WHERE, IN, FROM