AP Cybersecurity FRQ Practice: Device Security Analysis (14 Points)

AP Cybersecurity · Free-Response Practice

Device Security Analysis

The exam’s one free-response question, in the real format: several sources from a single device, five parts, fourteen points.

14 points 50 minutes suggested Skill Categories 2 & 3 Parts A–E
50:00
Run the 50-minute clock to practice under real timing. Write your responses, then reveal the model answers and self-score out of 14.

How this question works. Every answer must be grounded in the sources below. The task verbs are precise: Identify means state the concept or the evidence, Describe means give the process or outcome, Explain means give reasons backed by specific evidence, and Determine means apply reasoning to the sources to reach a result. When a part says “include specific entries” or “include the file name,” you lose the point without it.

The Scenario

The sources below were collected during a risk assessment of FINSRV01, an internal Ubuntu Linux server at a small accounting firm. The server hosts a file share and an internal web app. Its IP address is 10.0.4.15. Use the sources to answer Parts A through E.

Read the firewall table first

Several parts depend on reading ports and protocols correctly. The reference below maps the ports you will see in Source 1 to their services, and flags which protocols send data in clear text. Know these cold; they show up in both the firewall table and the logs.

Reference · Common Ports and Protocols
Port Protocol What it is used for Encrypted?
21 FTP File transfer No · clear text
22 SSH Secure remote login and admin Yes
23 Telnet Legacy remote login No · clear text
80 HTTP Web traffic No · clear text
443 HTTPS Encrypted web traffic Yes
445 SMB Windows file and printer sharing Often exposed
3306 MySQL Database connections Plaintext by default
3389 RDP Remote Desktop Encrypted, often brute-forced
5900 VNC Remote screen sharing Often weakly secured
The Sources
Source 1 · Device Firewall Settings (inbound, first match wins)

Destination for all rules is the device, 10.0.4.15. Rules are evaluated top to bottom; the first match decides the outcome.

# Action Source Dir. Port Protocol
1 Allow 10.0.4.0/24 In 22 SSH
2 Allow ALL In 80 HTTP
3 Allow ALL In 443 HTTPS
4 Allow ALL In 21 FTP
5 Allow ALL In 445 SMB
6 Allow 10.0.4.25 In 3306 MySQL
7 Deny 198.51.100.77 In 3389 RDP
8 Allow ALL In 3389 RDP
9 Allow 10.0.4.30 In 5900 VNC
10 Deny ALL In ALL ALL
Source 2 · Server Security Policy

1. All user accounts must use a password of at least 12 characters, changed every 90 days.

2. The operating system and all installed software must be patched within 7 days of a security update being released.

3. Removable media, such as USB drives, must not be connected to the server.

4. Remote administrative access is permitted only over SSH and only from the internal 10.0.4.0/24 network.

5. System and security logs must be reviewed at least once per week.

Source 3 · Authentication Log — /var/log/auth.log
 1  Mar 03 02:14:07 finsrv01 sshd[2210]: Failed password for tokafor from 10.0.4.88 port 51544 ssh2
 2  Mar 03 02:14:08 finsrv01 sshd[2210]: Failed password for tokafor from 10.0.4.88 port 51546 ssh2
 3  Mar 03 02:14:08 finsrv01 sshd[2210]: Failed password for tokafor from 10.0.4.88 port 51550 ssh2
 4  Mar 03 02:14:09 finsrv01 sshd[2210]: Failed password for tokafor from 10.0.4.88 port 51552 ssh2
 5  Mar 03 02:14:09 finsrv01 sshd[2210]: Failed password for tokafor from 10.0.4.88 port 51555 ssh2
 6  Mar 03 02:14:10 finsrv01 sshd[2210]: Failed password for tokafor from 10.0.4.88 port 51559 ssh2
 7  Mar 03 02:14:10 finsrv01 sshd[2210]: Failed password for tokafor from 10.0.4.88 port 51563 ssh2
 8  Mar 03 02:14:11 finsrv01 sshd[2210]: Failed password for tokafor from 10.0.4.88 port 51567 ssh2
 9  Mar 03 02:14:11 finsrv01 sshd[2210]: Failed password for invalid user root from 10.0.4.88 port 51570 ssh2
10  Mar 03 02:14:12 finsrv01 sshd[2210]: Accepted password for tokafor from 10.0.4.88 port 51574 ssh2
Source 4 · Firewall Log — /var/log/ufw.log
 1  Mar 03 03:02:41 finsrv01 kernel: [UFW BLOCK] IN=eth0 SRC=198.51.100.77 DST=10.0.4.15 PROTO=TCP SPT=49810 DPT=3389
 2  Mar 03 03:02:44 finsrv01 kernel: [UFW BLOCK] IN=eth0 SRC=198.51.100.77 DST=10.0.4.15 PROTO=TCP SPT=49812 DPT=3389
 3  Mar 03 03:02:47 finsrv01 kernel: [UFW BLOCK] IN=eth0 SRC=198.51.100.77 DST=10.0.4.15 PROTO=TCP SPT=49815 DPT=3389
Source 5 · Web Access Log — /var/log/apache2/access.log
 1  203.0.113.5 - - [03/Mar/2026:04:15:22] "GET /reports/download?file=q3_report.txt HTTP/1.1" 200 1841
 2  203.0.113.5 - - [03/Mar/2026:04:15:39] "GET /reports/download?file=../../../../etc/passwd HTTP/1.1" 200 2204
 3  203.0.113.5 - - [03/Mar/2026:04:15:53] "GET /reports/download?file=../../../../etc/shadow HTTP/1.1" 403 512
 4  203.0.113.5 - - [03/Mar/2026:04:16:08] "GET /reports/download?file=..%2f..%2f..%2fetc%2fpasswd HTTP/1.1" 200 2204
Source 6 · File Permissions — ls -l /srv/finance
-rwxrwx--- 1 tokafor finance   920 Mar 01 09:12 payroll.sh
-rw-rw-r-- 1 tokafor finance  4108 Mar 01 09:30 q3_report.txt
-rw------- 1 tokafor finance  2562 Mar 01 09:45 client_ssns.csv
-rw-rw-r-- 1 tokafor finance  1875 Mar 02 14:03 vendor_list.txt
drwxr-x--- 2 tokafor finance  4096 Mar 02 14:20 archive
The Question

Part A

2 points

Consider the server security policy in Source 2.

i. Explain how one part of the policy helps protect the device.
ii. Explain how one rule in the policy could be modified to make the device more secure. Include a specific example.

Part B

2 points

In the authentication log, Source 3, there is evidence of a password attack.

i. Describe the evidence in the log that indicates a password attack. Include specific entries.
ii. Identify the IP address of the adversary.

Part C

3 points

Consider the file permissions in Source 6.

i. Explain how the permission settings for one file in /srv/finance determine the level of access for the owner, the group, and all other users. Include the file name.
ii. Other than removing all permissions from all users, describe one way the permission settings for one file could be configured to restrict access for some users on the device. Include the file name.
iii. Using your answer to C(ii), write one or more chmod commands that set the permissions you described.

Part D

3 points

Consider all the sources from the device.

i. Explain how one connection attempt on the device was blocked by the device’s firewall. Include evidence from a log file.
ii. Other than allowing all traffic for all services, describe a modification to one firewall rule that would allow the connection attempt identified in D(i).
iii. Other than allowing the connection from D(i), describe one impact of your modification on incoming or outgoing network traffic on the device.

Part E

4 points

Apart from the password attack in Part B, there is evidence of another attack on the device. Consider all the sources.

i. Determine the type of attack evidenced in a log file.
ii. Describe specific information in the log file that indicates the attack named in E(i).
iii. Describe one way an automated system could halt this type of attack in real time.
iv. This attack could be mitigated by an automated system such as a firewall, IDS, IPS, or AI. Identify a different countermeasure that could mitigate, prevent, or deter the attack.
Your self-scored total
0 / 14
Check the criteria you earned as you review.

Exam tips that move the needle

Budget the clock: with 14 points in 50 minutes you have roughly 3 to 4 minutes per point. Do not write a paragraph where a sentence earns the point.

Quote the source. Almost every part rewards citing a specific row, rule number, IP, or file name. Vague answers that could apply to any device do not score.

Match the verb. Identify and Determine want a short, direct result. Explain wants a reason tied to evidence. Describe wants the process or outcome. Answering the wrong verb is the most common way to lose points you actually knew.

Key terms in this question

  • Brute-force attack: rapid repeated login attempts to guess a password, visible as many failures from one source in seconds.
  • Directory traversal: using ../ sequences to escape the intended folder and reach files like /etc/passwd.
  • First match wins: a firewall evaluates rules top to bottom and acts on the first rule that matches, so rule order matters.
  • Least privilege: giving each user, group, and service only the access it needs, enforced here through file permissions.
  • WAF / IPS: automated systems that inspect traffic and block malicious requests in real time.

Get in Touch

Whether you're a student, parent, or teacher — I'd love to hear from you.

Just want free AP CS resources?

Enter your email below and check the subscribe box — no message needed. Students get daily practice questions and study tips. Teachers get curriculum resources and teaching strategies.

Typically responds within 24 hours

Message Sent!

Thanks for reaching out. I'll get back to you within 24 hours.

🏫 Welcome, fellow educator!

I offer curriculum resources, practice materials, and study guides designed for AP CS teachers. Let me know what you're looking for — whether it's classroom materials, a guest speaker, or Teachers Pay Teachers resources.

Email

[email protected]

📚

Courses

AP CSA, CSP, & Cybersecurity

Response Time

Within 24 hours

Prefer email? Reach me directly at [email protected]