Cybersecurity
🔐

AP Cybersecurity — Cheatsheet

Formulas, exam-day tips, and key terms on one page.

Formulas & relationships

Risk priority
Risk priority = likelihood x impact
The exact scale can vary, but AP scenarios usually reward the reasoning: common plus severe gets handled before rare plus minor.

On the exam

How to get a 5

Key terms

CIA triadConfidentiality, Integrity and Availability — the three properties security exists to protect. Almost every control maps to one of them, and naming which one is what a question is usually asking.
Threat vs. vulnerability vs. riskA threat is an actor or event that could cause harm. A vulnerability is a weakness it could exploit. Risk combines the likelihood of that happening with the impact if it does.
Least privilegeEvery account and process gets only the access its role actually requires — and no more. Limits the blast radius when any single account is compromised.
Defense in depthLayering independent controls so that one failure does not become a breach. The reason a firewall AND endpoint protection AND access control all exist.
Preventive vs. detective vs. corrective controlPreventive stops an event (MFA, segmentation). Detective notices it (logging, alerting, IDS). Corrective restores after it (backups, incident response).
Hashing vs. encryptionEncryption is reversible with a key and is for data you must read back. Hashing is one-way and is for verification — passwords, integrity checks. Never store passwords encrypted.
SaltA unique random value stored with each password hash. Makes identical passwords hash differently and defeats precomputed rainbow tables, forcing per-account attack.
Why bcrypt/scrypt/Argon2 rather than SHA-256 for passwordsThey are deliberately slow and tunable. Fast hashes let an attacker test billions of guesses per second against a stolen hash file.
Symmetric vs. asymmetric encryptionSymmetric uses one shared key — fast, but the key must be distributed securely. Asymmetric uses a public/private pair — solves distribution, much slower. TLS uses both.
Key managementEncryption is only as strong as the protection of its keys. A key stored beside the ciphertext provides almost no security against anyone who reaches the data.
Multifactor authentication (MFA)Requires factors from different categories: something you know, something you have, something you are. Defeats a stolen password on its own.
PhishingSocial engineering that induces a target to reveal credentials or run attacker code, usually by impersonating a trusted sender. Targets the human, not the software.
Credential stuffingAutomated replay of username/password pairs leaked from another breach. Works because people reuse passwords — which is why one recoverable password store harms many services.
SQL injectionUntrusted input interpreted as database commands, letting an attacker read, alter or destroy data. Parameterized queries prevent it; filtering for quotes does not.
Cross-site scripting (XSS)Untrusted input rendered into a page executes as script in a victim's browser under the site's origin — enabling session theft or actions as the victim. Fixed by contextual output encoding.
Why blocklists failThey enumerate badness. The defender must anticipate every attack; the attacker needs one that was not anticipated. Prefer allowlists and structural fixes.
Network segmentationDividing a network so systems can only reach what they need, with default-deny between zones. Limits lateral movement after an initial foothold.
Zero trustNever trust based on network location. Verify identity, device posture, and context for every request, whether it originates inside or outside the perimeter.
Incident response orderPrepare → Identify → Contain → Eradicate → Recover → Lessons learned. Contain before eradicating: stop ongoing harm while scope is still unknown.
Volatile evidenceData that exists only while a system is running: RAM contents, running processes, open connections, in-memory keys. A reboot destroys it permanently.
Separation of dutiesA sensitive action requires two independent people. Addresses the insider and compromised-account threat, which access control cannot — the actor is authorized.
3-2-1 backup ruleThree copies, on two media types, one offsite. Add: at least one offline or immutable, because ransomware encrypts reachable connected backups.
Why untested backups are not a controlBackups fail silently — stopped jobs, unreadable media, missing keys. A restore you have never performed is an assumption. Test restoration on a schedule.
Ransomware and the triadPrimarily attacks availability: the data is intact but denied to authorized users. Modern operators also exfiltrate first, so confidentiality is usually breached too.