Security Flashcards
7 cards from real Web Development practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 7 Security flashcards as text
What is the key difference between authentication and authorization in web security?
Answer: Authentication verifies who you are; authorization determines what you can do
Authentication (authn) confirms identity while authorization (authz) enforces permissions — both are required for secure access control.
Which attack allows an adversary to read memory from adjacent process space by exploiting a buffer length field without validating it?
Answer: Heartbleed (buffer over-read)
Heartbleed exploited OpenSSL's failure to validate the 'length' field in TLS heartbeat requests, leaking up to 64KB of server memory per request.
When using JWTs for session management, what is the safest place to store the token in a browser?
Answer: An httpOnly, Secure, SameSite=Strict cookie
Storing JWTs in httpOnly cookies protects them from XSS attacks since JavaScript cannot access httpOnly cookies.
What is clickjacking, and which HTTP header primarily defends against it?
Answer: Embedding a target site in an invisible iframe to trick users into clicking; X-Frame-Options or frame-ancestors CSP
Clickjacking tricks users into clicking hidden UI elements by overlaying an iframe; X-Frame-Options: DENY or CSP frame-ancestors blocks iframe embedding.
In a SQL injection attack, what does a UNION-based injection attempt to achieve?
Answer: Append an additional SELECT query to extract data from other database tables
UNION-based SQLi appends a second SELECT statement to the original query, returning data from tables the attacker chooses.
Which principle recommends giving users and processes only the minimum permissions necessary to perform their function?
Answer: Principle of Least Privilege
Least Privilege limits the blast radius of compromised accounts or components by ensuring they only hold permissions they actually need.
What is the purpose of a nonce in a Content Security Policy?
Answer: To allow specific inline scripts or styles that include the matching nonce attribute
A CSP nonce is a cryptographically random value added to both the CSP header and allowed script tags, permitting only those scripts while blocking others.
How this page was made: written with AI tools. We have not yet matched this exam's facts to an official source, so confirm fees, dates and rules with the exam body. Not reviewed by a subject-matter expert. Editorial policy