AP® Cybersecurity Practice Questions
Work through AP Cybersecurity practice questions unit by unit, then check each answer against a worked solution.
Free · no sign-up Open questions need no account. Sign up or log in to open the rest.
Question 82
Question 83
Question 84
Question 85
Question 86
Question 87
Question 88
Question 89
Question 90
The following sources all come from the same device and are captured in a risk assessment for this device.
Source 1
The device's IP address is 74.2.193.55.
| Rule Number | Action | Source | Destination | Port Number | Protocol |
|---|---|---|---|---|---|
| 1 | Accept | Any | 74.2.193.55 | 22 | SSH |
| 2 | Accept | Any | 74.2.193.55 | 80 | HTTP |
| 3 | Accept | Any | 74.2.193.55 | 443 | HTTPS |
| 4 | Accept | Any | 74.2.193.55 | Any | ICMP |
| 5 | Accept | Any | 74.2.193.55 | 53 | DNS |
| 6 | Accept | 192.168.0.23 | 74.2.193.55 | 110 | POP3 |
| 7 | Accept | Any | 74.2.193.55 | 3306 | MySQL |
| 8 | Accept | Any | 74.2.193.55 | 20 | FTP |
| 9 | Block | Any | Any | Any | Any |




Source 6
Password Policy
Required Activities:
Users must create passwords that are at least 10 characters long and have a letter, a number, and a symbol.
Permitted Activities:
Users may use passphrases instead of traditional passwords as long as they meet the required length and complexity guidelines.
Prohibited Activities:
Users may not reuse any of their previously used passwords.
Respond to parts A, B, C, D, and E and all subparts.
Part A
Consider the policy for the device in Source 6.
Explain how one part of the policy helps protect the device.
Explain how one rule in the current policy could be modified to make the device more secure. Include a specific example in your response.
Part B
In the authorization log, there is evidence of a password attack in rows 19–28.
Describe the evidence in the log file that indicates a password attack. Include specific entries from the log file in your response.
Identify the port number of the protocol being used in the password attack.
Part C
Consider all the sources from the device.
Explain how the permission settings for one file in the /var/www/app directory determine the level of access for that file for the owner, group, and all other users on the system. Include the name of the file in your response.
Other than giving all permissions to all users, describe one way the permission settings for one file on the system could be configured to grant more access for some users on the device. Include the name of the file in your response.
Using the description from part C ( ii ), write one or more chmod commands that set the permissions described.
Part D
Consider all the sources from the device.
Explain how one connection attempt on the device was blocked by the device’s firewall. Include evidence from a log file in your response.
Other than allowing all traffic for all services, describe a modification to one firewall rule that would allow the connection attempt identified in part D ( i ).
Other than allowing the connection attempt identified in part D ( i ), describe one impact of your modification from part D ( ii ) on incoming or outgoing network traffic on the device.
Part E
Apart from the password attack identified in part B, there is evidence of another attack on the device. Consider all the sources from the device.
Determine the type of attack evidenced in a log file.
Describe specific information in the log file that indicates the attack named in part E ( i ).
Describe one way an automated system could halt this type of attack in real time.
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.
Main Solution
A.i
Requiring at least 10 characters with a letter, number, and symbol makes guessing harder than allowing short, simple passwords. The no-reuse rule also prevents an old password from becoming the current password again.
A.ii
Increase the minimum length from 10 to 16 characters while keeping the existing requirements. An unpredictable passphrase such as Cedar!Orbit7VelvetHarbor meets the revised rule. Greater unpredictable length increases the work needed for guessing.
B.i
Source 4, rows 19–28, records ten rapid MySQL access-denied messages from 92.4.177.25 at 14:45:23–14:45:24. The attempts repeatedly target root and also target admin, test, sql, guest, and backup, with using password: YES. This concentrated pattern suggests automated password guessing.
B.ii
3306, the MySQL port shown in the relevant entries.
C.i
report.csv has mode -rw-r-----. The owner SherPotter can read and modify the file, but cannot execute it. Members of analysts can read it, but cannot write or execute it. Other users receive no permissions through these mode bits.
C.ii
Give the analysts group write permission on report.csv so analysts can update the report. Keep owner read/write access and leave other users with no permissions.
C.iii
chmod g+w /var/www/app/report.csv
Equivalent for the stated configuration: chmod 660 /var/www/app/report.csv
D.i
Source 3, row 23, records TCP traffic from 192.168.1.30 to 74.2.193.55, destination port 8080, marked BLOCK. Source 1 allows HTTP on port 80 but contains no allowance for port 8080, so rule 9 blocks the unmatched connection.
D.ii
Modify rule 2 so its allowance for destination 74.2.193.55 uses port 8080 instead of port 80. Leave the other rules, including the catch-all block, unchanged. This permits the identified connection without permitting every service.
D.iii
Ordinary inbound HTTP requests on port 80 would no longer match rule 2 and would be blocked by rule 9. HTTPS on port 443 would remain allowed.
E.i
An attempted SQL injection attack.
E.ii
Source 2, rows 18–20, contains requests from 92.4.177.25 with SQL-like input, including an OR '1'='1 condition, DROP TABLE users;--, and an injected OR 'x'='x condition in a login parameter. These attempt to alter the meaning of a database query. The HTTP 400 responses do not establish successful exploitation.
E.iii
An inline web application firewall or IPS can recognize SQL-injection patterns in HTTP parameters and reject the malicious requests before they reach the application. Repeated matching attempts could trigger a temporary source-IP block.
E.iv
Use parameterized queries with bound parameters so user input is treated as data rather than executable SQL.
Teacher Explanation
This is a teacher-created analytical rubric, not an official College Board scoring guide. Accept equivalent, source-supported answers and coherent follow-through between connected subparts.
Source 1 gives 74.2.193.55 while many Source 3 entries use 10.0.0.20. No NAT or interface mapping is stated; preserve both and avoid requiring an invented mapping.
An alternative valid D chain can use Source 4 row 15, TCP port 25 from 203.0.113.88 to 74.2.193.55, with a coherent restricted rule modification and consequence.
The displayed authentication failures and HTTP 400 SQL-injection requests establish attempts, not successful compromise. Do not require claims about success or exact guessed passwords.
Source 1 labels FTP as port 20. Preserve the source value; FTP control commonly uses port 21 and data traffic may use port 20.
Education Coach Advice
Cite source numbers and log rows. For permissions, address owner, group and others. For firewall changes, trace the original rule match and the effect on other traffic. For E, separate detection, active blocking and a different preventive control.
Traps
Use MySQL port 3306 for B(ii), not SSH port 22. Distinguish failed attempts from successful compromise. In C and D, keep the explanation, proposed change and command or consequence consistent.
AP® and Advanced Placement® are registered trademarks of the College Board, which is not affiliated with, and does not endorse, Verityprep. Names are used for identification purposes only.

