Quiz · Medium
The CIA triad, phishing and social engineering, SQL injection, XSS, CSRF, password storage, encryption, digital signatures, MFA and ransomware. Security+ style concepts in plain language.
A distributed denial-of-service (DDoS) attack mainly targets which part of the CIA triad?
Confidentiality
Availability
Integrity
Authentication
A DDoS floods a service with traffic so real users cannot reach it. It usually steals nothing (confidentiality) and changes no data (integrity).
An attacker researches a company's finance manager and sends her a convincing email that appears to come from the CEO. This is:
Vishing
Spear phishing
A brute-force attack
Tailgating
Spear phishing is phishing aimed at a specific person with tailored details. Vishing uses phone calls, and tailgating is following someone through a secure door.
What is the most effective defense against SQL injection?
Hiding database error messages
Using HTTPS
Blocking the words SELECT and DROP in input
Parameterized queries (prepared statements)
Parameterized queries send user input as data, never as part of the SQL code, so it cannot change the query. Hiding errors and keyword blocklists can be bypassed, and HTTPS only protects data in transit.
An attacker posts a comment containing a script that runs in other users' browsers when they view the page. This is:
Stored cross-site scripting (XSS)
SQL injection
Cross-site request forgery (CSRF)
A man-in-the-middle attack
The malicious script is stored on the server and served to every visitor. Defenses include encoding output for its context and a Content Security Policy. SQL injection targets the database, not other users' browsers.
What is the best way to store user passwords?
AES encryption with the key stored on the server
A slow, salted password hash such as Argon2 or bcrypt
A single fast MD5 hash
Base64 encoding
Password hashing should be one-way and deliberately slow, so stolen hashes are expensive to crack. Encryption can be reversed by anyone who gets the key, MD5 is far too fast, and Base64 is not security at all.
Why is a unique random salt added to each password before hashing?
To make the password easier to remember
To encrypt the password so it can be recovered later
To make hashing faster
So identical passwords get different hashes and precomputed rainbow tables are useless
Without salts, everyone with the password "123456" shares one hash, and attackers can look hashes up in precomputed tables. Salts are not secret; they are stored next to the hash.
Which of these is an asymmetric (public-key) algorithm?
AES
SHA-256
RSA
DES
RSA uses a key pair: a public key and a private key. AES and DES are symmetric ciphers that use one shared key. SHA-256 is a hash function, not encryption.
To digitally sign a document, the sender uses:
Their own private key, and anyone can verify with the sender's public key
The recipient's public key
The recipient's private key
A shared symmetric key
Only the sender holds the private key, so a valid signature proves who signed and that the document was not changed. Encrypting a message for someone uses the recipient's public key, which is the opposite case.
Which login combination is true multi-factor authentication?
A password plus a security question
A password plus a PIN
Two different passwords
A password plus a code from an authenticator app
MFA needs factors from different categories: something you know, something you have and something you are. Passwords, PINs and security questions are all something you know, so combining them is still one factor.
Which measure best limits the damage of a ransomware attack?
Paying the ransom quickly
Using a longer Wi-Fi password
Regular backups kept offline or immutable, and tested restores
Turning off the firewall
Ransomware encrypts your files. With offline or immutable backups you can restore without paying, and paying is no guarantee of getting your data back. Backups the malware can reach may get encrypted too.
Giving each user only the access they need to do their job is called:
Defense in depth
Separation of duties
Security through obscurity
The principle of least privilege
Least privilege limits what an attacker can do with a compromised account. Defense in depth means layering several controls, and separation of duties splits critical tasks between people.
Someone without a badge follows an employee through a secure door before it closes. This is:
Phishing
Tailgating
Shoulder surfing
Pretexting
Tailgating (also called piggybacking) bypasses physical access control. Shoulder surfing is watching someone type a password or PIN.
What is a zero-day vulnerability?
A bug that is fixed on the day it is found
Malware that deletes itself after one day
A vulnerability with no real impact
A flaw unknown to the vendor, so no patch exists yet
The vendor has had zero days to fix it, which makes zero-days valuable to attackers. Defense relies on layered controls and monitoring until a patch arrives.
A malicious site makes a logged-in user's browser submit a money-transfer form to their bank. Which defense is designed for this attack?
Anti-CSRF tokens and SameSite cookies
Parameterized SQL queries
Hashing passwords with bcrypt
Disk encryption
This is cross-site request forgery: the browser automatically attaches the bank's cookies. A secret per-form token that the attacker cannot read, plus SameSite cookies, blocks forged requests.
You download a file and compare its SHA-256 value with the one published on the vendor's site. What does this check?
Integrity: whether the file was altered or corrupted
Confidentiality: whether anyone else read the file
Availability: whether the server is online
That the file contains no malware
A matching hash shows the file is identical to the one the vendor hashed. It does not prove the file is safe, and if attackers replaced both the file and the published hash, the check would not catch it. Signed releases close that gap.