AP Cybersecurity FRQ Practice: Device Security Analysis (14 Points)
Device Security Analysis
The exam’s one free-response question, in the real format: several sources from a single device, five parts, fourteen points.
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 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.
| 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 |
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 |
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.
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
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
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
-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
Part A
2 pointsConsider the server security policy in Source 2.
A(i). Policy 4 limits remote administration to SSH from the internal 10.0.4.0/24 network only. This protects the device because an outside attacker cannot reach the admin interface at all; the avenue of attack is closed before authentication is even attempted. (Policy 3, banning removable media, is also acceptable: it prevents malware from being introduced through an infected USB drive the firm cannot vet.)
A(ii). Policy 1 could be strengthened by requiring multifactor authentication in addition to the 12-character password. For example, requiring a one-time code from an authenticator app means a stolen or guessed password alone would not grant access. (Also acceptable: shorten the patch window in Policy 2 from 7 days to 48 hours so critical vulnerabilities are closed faster.)
Part B
2 pointsIn the authentication log, Source 3, there is evidence of a password attack.
B(i). The log shows many failed password attempts for the same account in a very short window, all from one source. Rows 1 through 8 are failed passwords for tokafor between 02:14:07 and 02:14:11, roughly eight failures in about five seconds, followed by a failed attempt for user root on row 9. This rapid sequence is a brute-force or password-guessing attack. Row 10 then shows an accepted login, meaning the attack succeeded.
B(ii). 10.0.4.88
Part C
3 pointsConsider the file permissions in Source 6.
C(i). For payroll.sh the permissions are -rwxrwx---. The first grouping rwx gives the owner tokafor read, write, and execute. The second grouping rwx gives the group finance read, write, and execute. The final grouping --- gives all other users on the system no access at all.
C(ii). The file q3_report.txt is currently -rw-rw-r--, so every other user on the system can read it. To restrict access for those users, remove the read permission from the “others” category so only the owner and the finance group can read it.
C(iii). chmod o-r q3_report.txt (equivalently chmod 660 q3_report.txt).
Part D
3 pointsConsider all the sources from the device.
D(i). The firewall log in Source 4 shows three [UFW BLOCK] entries from 198.51.100.77 to destination port 3389 (RDP). These were blocked because firewall rule 7 denies that exact source IP on port 3389, and because the firewall uses first match wins, rule 7 is reached before the broad Allow in rule 8.
D(ii). Change rule 7 from Deny to Allow for source 198.51.100.77 on port 3389 (or remove rule 7 so that the Allow in rule 8 applies to that host). Either change lets the RDP connection from 198.51.100.77 through.
D(iii). Allowing 198.51.100.77 to reach RDP exposes the Remote Desktop service to an external, untrusted host. That host could now send RDP traffic to the server and attempt to brute-force the login, increasing the attack surface and the volume of inbound traffic the server must process.
Part E
4 pointsApart from the password attack in Part B, there is evidence of another attack on the device. Consider all the sources.
E(i). A directory traversal (path traversal) attack.
E(ii). The web access log in Source 5 shows GET requests to the download endpoint whose file parameter contains ../ sequences, such as rows 2 and 3 requesting ../../../../etc/passwd and ../../../../etc/shadow. Row 4 uses the URL-encoded form ..%2f to try to evade filtering. The 200 responses indicate the traversal to /etc/passwd succeeded in returning a file outside the web directory.
E(iii). A web application firewall or an IPS with a signature for traversal patterns can inspect each incoming request and block any whose parameters contain ../ or its encoded equivalents before the request reaches the application, stopping the attack in real time.
E(iv). Any non-automated countermeasure, for example: validate and sanitize the file parameter in the application so it only accepts an allowlist of filenames and rejects path separators; or run the web service under least-privilege file permissions so it cannot read /etc/shadow even if traversal is attempted; or keep the application patched.
0 / 14
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.
Message Sent!
Thanks for reaching out. I'll get back to you within 24 hours.
Prefer email? Reach me directly at [email protected]