A delivery-driver account can read full prescription records. The patient-records file is set to chmod 777.
Stage 4 • Cryptography
Choose the crypto
CED 5.3, 5.4 • Lesson: Cryptography (symmetric vs asymmetric)
Stage 5 • Detecting Attacks on Data
Catch the tampering
CED 5.6.A • Lesson: Detecting Data Attacks (file integrity with hashes)
Evidence
The config file stored hash no longer matches its recomputed hash. An access log shows a 2 GB export at 03:00 by the delivery account.
Analyst's report
Name the highest-severity flaw with a reason, then give one fix for each issue.
Model answer. The highest-severity flaw is the SQL injection, because it can dump or alter the entire prescription database with no further access. It leads.
Fixes: input sanitization for the injection; clean-and-encode sanitization for the XSS; least-privilege roles plus tightening the file off chmod 777 for the access problems; encrypt the database at rest with symmetric crypto and use the pharmacy public key for data sent in, decrypted with its private key; and keep file-integrity monitoring, which caught the tamper, while investigating the 3am export as data exfiltration.
Cold case
Re-running the hash on the restored config file produces the original value again. What does that confirm?
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.