CraveCart Case Files

AP Cybersecurity — Unit 5: Securing Applications and Data
0/0 responses complete (0%)

Incident Briefing: CraveCart Technologies

CraveCart is a fast-growing online food ordering platform that connects hungry customers with local restaurants for delivery and pickup. In the past year, CraveCart has grown from 15 restaurant partners to over 200, processing thousands of orders and customer payments every day. Rapid growth has put pressure on CraveCart's engineering team — and, as you'll see across the case files below, that pressure has led to real security gaps.

You have just joined CraveCart's IT Security team as a student intern. Over the next seven case files, you'll investigate incidents, review evidence, and make security recommendations covering Unit 5: Securing Applications and Data (Topics 5.1–5.6), ending with a capstone security improvement plan.

Each case includes background information, evidence (logs, tables, and records), and questions for you to answer in the response boxes provided. Your answers save automatically to this browser as you type. When you're finished, use Export PDF to submit your work, or Copy as Text as a backup.

Note for students: CraveCart Technologies and all incidents, logs, employees, and records in this lab are fictional, created for instructional purposes and mapped to AP Cybersecurity Unit 5 vocabulary and learning objectives.

Case 2027-5A
Data Breach

AP Topic 5.1 — Application and Data Vulnerabilities and Attacks

The Order Search Incident

Application Vulnerability Sensitive Data SQL Injection Input Validation Data Breach Privilege Escalation Exploit

CraveCart's website lets customers search past orders by typing a restaurant name into a search box. Last Tuesday, a QA tester was experimenting with the search field and typed in some unusual characters just to see what would happen. Instead of an error message, the search returned thousands of customer records that had nothing to do with the search term.

The security team pulled the application error log to figure out what happened. It turns out the search box passes whatever a user types directly into a database query without checking it first — a textbook application vulnerability. An attacker who understands how the search box is built could use the same trick — a SQL Injection — to pull sensitive data like customer emails, phone numbers, and payment tokens straight out of the database. If the search box also had a way to modify records, the same flaw could let an attacker perform privilege escalation and gain far more access than a normal customer should ever have.

Evidence: Application Error Log — Order Search Function
Log entries from CraveCart's order-search endpoint, February 2, 2027. Use the Flag button to mark entries you believe are part of the attack.
TimestampSource IPSearch Input SubmittedSystem ResponseFlag
09:14:0273.14.201.9Bella Napoli200 OK — 1 restaurant matched
09:14:4773.14.201.9Golden Wok200 OK — 1 restaurant matched
10:02:15198.51.100.42' OR '1'='1200 OK — Returned 4,812 customer records (expected 0–1)
10:03:51198.51.100.42'; DROP TABLE orders; --500 Internal Server Error — malformed SQL query
10:05:20198.51.100.42' UNION SELECT card_token,cvv FROM payments --200 OK — Returned 4,812 rows including payment token column
11:47:3373.14.201.9Pho Lantern200 OK — 1 restaurant matched
Evidence: Sample of Exposed Data (sanitized)
Customer IDEmail (masked)Phone (masked)Saved Payment Token
CC-10432m***.h***@gmail.com(256) ***-0142tok_9f3a...b21c
CC-10433j***.o***@yahoo.com(256) ***-9981tok_7ee1...44da
CC-10434t***.w***@outlook.com(931) ***-7720tok_1cb0...ff9e

Your Investigation

Case 2027-5B
Access Violation

AP Topic 5.2 — Protecting Applications and Data: Managerial Controls and Access Controls

The Access Control Audit

Access Control RBAC Principle of Least Privilege Data Classification Sensitive Information Permission Managerial Control

Following the search-box incident, CraveCart's new IT Security Manager ordered a full access control audit. The goal: make sure every employee's account permissions match what their job role actually requires — a system called Role-Based Access Control (RBAC). Employees should only ever have the permissions needed to do their specific job, following the principle of least privilege.

The audit uncovered a problem. Several accounts had been granted far more access than their role required, often because it was "easier" when the account was first set up, and no one ever revoked the extra access. This is exactly the kind of gap that managerial controls — clear policies about who approves and reviews access — are supposed to catch. CraveCart also classifies its data by data classification level (Public, Internal, Sensitive, Restricted) so employees know how carefully each type of sensitive information must be handled.

Evidence: Access Control Matrix — Q1 Audit Findings
RoleSystem / ResourceAccess Required by JobCurrently GrantedAudit Note
Customer Support RepOrder SystemRead onlyRead, Write, AdminOver-privileged — flagged
Restaurant Partner ManagerMenu Management SystemRead, WriteRead, WriteMatches role — OK
Driver Dispatch CoordinatorDelivery Routing SystemRead, WriteRead, WriteMatches role — OK
Database AdministratorCustomer DatabaseRead, Write, AdminRead, Write, AdminMatches role — requires MFA
Marketing InternCustomer Email ListRead only (for campaign planning)Read, Write, ExportSeverely over-privileged — flagged
IT Security AnalystAudit & Security LogsRead, WriteRead, WriteMatches role — OK

Your Investigation

Case 2027-5C
Encryption Required

AP Topic 5.3 — Protecting Stored Data with Cryptography

The Debug Log Discovery

Cryptography Encryption Ciphertext Plaintext Encryption Key Confidentiality Data at Rest

While reviewing server storage to free up space, an engineer found an old debug log file from CraveCart's payment processing service. It had been sitting untouched on a storage drive for months — a clear example of data at rest. The problem: the file was never supposed to exist in the first place, and it was written entirely in plaintext, with no cryptography applied at all.

Whenever a customer's payment failed, the payment service logged the entire transaction — including full card numbers and CVV codes — so engineers could "debug" the issue later. No one had ever encrypted this file or set it to automatically delete. If this file had been stolen, an attacker wouldn't need to break any encryption key at all; the confidentiality of every customer's payment information would already be gone, because there was no ciphertext protecting it.

Evidence: Debug Log Excerpt — payment-service-debug.log
2027-02-08 14:02:11 [WARN] Payment declined for order #88421 2027-02-08 14:02:11 [DEBUG] card_number: 4111 1111 1111 1111 2027-02-08 14:02:11 [DEBUG] expiration: 09/29 cvv: 812 2027-02-08 14:02:11 [DEBUG] cardholder: R. MITCHELL 2027-02-08 14:03:47 [WARN] Payment declined for order #88427 2027-02-08 14:03:47 [DEBUG] card_number: 5500 0000 0000 0004 2027-02-08 14:03:47 [DEBUG] expiration: 03/28 cvv: 445 2027-02-08 14:03:47 [DEBUG] cardholder: P. NGUYEN

Full card numbers and CVV codes appear in plaintext across multiple log entries.

Your Investigation

Case 2027-5D
Certificate Alert

AP Topic 5.4 — Asymmetric Cryptography

The Lookalike Checkout Page

Asymmetric Cryptography Public Key Private Key Digital Certificate Digital Signature Certificate Authority Key Pair

A customer emailed CraveCart support with a strange complaint: they had tried to log in at "cravecart-secure-login.net" after clicking a link in a text message, and their browser flashed a security warning. CraveCart doesn't own that domain. The security team suspects an attacker built a lookalike checkout page to steal customer logins and payment details.

Every legitimate website that accepts payments uses asymmetric cryptography — a key pair made up of a public key anyone can use to start a secure connection, and a private key that only CraveCart's real server holds. A trusted Certificate Authority (CA) issues a digital certificate that proves a public key really belongs to CraveCart, and a valid digital signature on that certificate is what lets a browser confirm it's genuine — or warn the user when it isn't.

Evidence: Certificate Inventory Comparison
DomainIssued ToIssued By (CA)Key TypeValid ThroughBrowser StatusFlag
cravecart.comCraveCart Technologies, Inc.DigiTrust Global CARSA 2048-bit key pairNov 2027Trusted — valid chain
cravecart-secure-login.net"CraveCart Support Team"Self-signed (no CA)RSA 2048-bit key pairExpired — Jan 2027Not trusted — warning shown
partners.cravecart.comCraveCart Technologies, Inc.DigiTrust Global CARSA 2048-bit key pairNov 2027Trusted — valid chain

Your Investigation

Case 2027-5E
Code Review Flag

AP Topic 5.5 — Protecting Applications

The Pre-Launch Code Review

Secure Coding Patch Management Input Sanitization Code Review Software Update Application Security SDLC

CraveCart is about to launch a new feature: letting restaurant partners upload their own menu photos directly. Before launch, the application security team requires a code review of the new feature as a standard step in CraveCart's Software Development Life Cycle (SDLC). The review is meant to catch secure coding mistakes before the feature ever reaches customers.

The findings were not good. The reviewer found multiple issues, ranging from missing input sanitization on user-submitted text to a forgotten software update that left the team without a working patch management process for a key library. Each of these findings represents a different point where the development team skipped a step that secure coding practices are supposed to catch.

Evidence: Pre-Launch Code Review Findings — Menu Photo Upload Feature
Finding IDFile / ModuleDescriptionRisk Level
CR-101upload_handler.pyUploaded image files are not checked for file type before being saved — a malicious file disguised as a photo could be uploaded.High
CR-102menu_form.jsMenu description text field has no input sanitization; special characters are passed directly to the database.High
CR-103config/secrets.pyAPI key for the image storage service is hardcoded directly in the source file instead of a secure vault.High
CR-104image-resize-lib v2.3Third-party image resizing library has a publicly known vulnerability (CVE) fixed in v2.9; no update has been applied.Medium
CR-105deploy_pipeline.ymlNo automated process exists to check for and apply security patches to third-party libraries.Medium

Your Investigation

Case 2027-5F
Security Incident

AP Topic 5.6 — Detecting Attacks on Data and Applications

The 3 AM Admin Login

Application Log Audit Log Data Integrity Suspicious Activity Indicator of Attack Monitoring Incident

CraveCart's audit log records every login to the admin dashboard, along with the account used, the time, and the location the login came from. This kind of continuous monitoring exists specifically to catch suspicious activity before it turns into a full-blown incident.

This morning, the on-call security analyst reviewing the overnight application log noticed something odd: an admin account that normally logs in during business hours from CraveCart's office network had logged in at 3:14 AM from an unfamiliar location, and moments later had exported a large batch of customer records. Individually, a late-night login or a data export might have an innocent explanation — but together, they're a strong indicator of attack, and a threat to the data integrity of CraveCart's systems if the exported records are altered or resold.

Evidence: Audit Log — Admin Dashboard Access, Feb 11, 2027
Use the Flag button to mark any entries you believe are indicators of attack.
TimestampUser AccountActionIP / LocationFlag
08:52:10j.alvarez (Admin)Logged in; viewed weekly sales report10.0.4.12 — CraveCart HQ
13:20:44j.alvarez (Admin)Updated restaurant partner listing10.0.4.12 — CraveCart HQ
03:14:02j.alvarez (Admin)Logged in to admin dashboard203.0.113.77 — unrecognized, overseas
03:16:55j.alvarez (Admin)Exported 12,340 customer records to CSV203.0.113.77 — unrecognized, overseas
03:19:31j.alvarez (Admin)Logged out203.0.113.77 — unrecognized, overseas
09:05:00j.alvarez (Admin)Logged in; reported unable to recall overnight activity10.0.4.12 — CraveCart HQ

Your Investigation

Case 2027-5G
Capstone Review

Unit 5 Capstone — Applying Defense in Depth

Building CraveCart's Security Improvement Plan

Defense in Depth Residual Risk Compensating Control Mitigation Asset Threat Security Control Confidentiality / Integrity / Availability

CraveCart's leadership has seen the case files above and called an emergency meeting. Six separate incidents in one unit — an injection attack, an access control failure, unencrypted payment data, a fake certificate, unsafe code shipped toward launch, and a middle-of-the-night data export — are more than bad luck. They're a pattern, and the executive team wants a plan.

No single security control fixes every problem CraveCart has faced. That's why security professionals rely on defense in depth: layering multiple controls so that if one fails, another is still standing between an attacker and CraveCart's assets. Every control still leaves some residual risk behind, and when the ideal control isn't possible right away, a compensating control can reduce risk in the meantime. Your job in this final case is to pull together everything you've learned across Cases 5A–5F into one prioritized plan.

Evidence: Unit 5 Incident Recap — Risk Register
CaseAsset at RiskThreat / VulnerabilityCurrent Status
5ACustomer databaseSQL injection via unvalidated search inputNeeds improvement
5BInternal systems & customer dataOver-privileged employee accountsNeeds improvement
5CCustomer payment dataPlaintext card data left in an unencrypted debug logNeeds improvement
5DCustomer trust / login credentialsFraudulent lookalike domain with a fake certificatePartially addressed — domain reported
5ENew menu-photo upload featureMissing input sanitization, hardcoded API key, outdated libraryCaught before launch — not yet fixed
5FCustomer recordsCompromised admin account used for after-hours data exportUnder active investigation

Your Security Improvement Plan