Difficulty: Medium
What does vertical privilege escalation mean?
A Accesses another account
B Steals TLS keys
C Blocks network traffic
D Gains higher permissions
Answer: D. Gains higher permissions. Vertical privilege escalation means gaining higher permissions.
To stop stored script injection, what should output handling use?
A Database indexing
B DNS filtering
C Contextual output encoding
D Password rotation
Answer: C. Contextual output encoding. Contextual output encoding treats untrusted content as data in its output context.
Where should a stateful web app validate a CSRF token?
A On the server
B Only in CSS
C Inside the URL fragment
D In browser history
Answer: A. On the server. Server-side token checks validate a request against the user’s session.
Which cookie flag blocks JavaScript access?
A Secure
B HttpOnly
C SameSite
D Domain
Answer: B. HttpOnly. HttpOnly prevents scripts from reading a cookie through browser APIs.
For a session cookie, what does Secure restrict?
A Access by scripts
B Cross-site requests
C Cookie expiration
D Transmission to secure channels
Answer: D. Transmission to secure channels. Secure limits cookie transmission to secure connections.
How does SameSite affect a cookie?
A Encrypts cookie contents
B Limits cross-site sending
C Hashes the session ID
D Sets the browser language
Answer: B. Limits cross-site sending. SameSite controls whether a cookie accompanies cross-site requests.
Which authenticator factor is a memorized PIN?
A Something you have
B Something you are
C Something you know
D Somewhere you are
Answer: C. Something you know. A memorized PIN is a knowledge factor.
For a fingerprint login, which factor type applies?
A Something you are
B Something you know
C Something you have
D Somewhere you are
Answer: A. Something you are. A fingerprint is a biometric inherence factor.
HMAC combines which secret with a message?
A Public certificate
B Secret key
C Browser cookie
D DNS record
Answer: B. Secret key. HMAC combines a secret key and message to produce a keyed authentication code.
Which message authentication property helps detect data alteration?
A Availability
B Anonymity
C Integrity
D Compression
Answer: C. Integrity. Message authentication codes help detect unauthorized changes and authenticate message data.
How does public-key encryption protect a message to a recipient?
A Encrypts with recipient public key
B Encrypts with sender public key
C Hashes with recipient key
D Signs with recipient private key
Answer: A. Encrypts with recipient public key. The recipient’s public key lets others encrypt messages only that recipient can decrypt.
Decryption of ciphertext uses which matching key?
A Public key
B Salt value
C DNS key
D Private key
Answer: D. Private key. A private key decrypts ciphertext created for its corresponding public key.
Why rotate a session identifier after login?
A Improve image caching
B Reduce session fixation risk
C Prevent DNS spoofing
D Compress request bodies
Answer: B. Reduce session fixation risk. Rotating session IDs after authentication helps prevent session fixation.
When a SQL query includes user input, which method is preferred?
A Bind parameters
B Escape by hand
C Concatenate strings
D Rename columns
Answer: A. Bind parameters. Parameter binding keeps user values separate from SQL syntax.
Executing untrusted browser script is known as what weakness?
A Cross-site request forgery
B Denial of service
C Cross-site scripting
D Password spraying
Answer: C. Cross-site scripting. Cross-site scripting runs attacker-controlled script in another user’s browser context.
Denial-of-service attacks commonly cause what impact?
A Passwords become longer
B Files gain signatures
C Logs are encrypted
D Service becomes unavailable
Answer: D. Service becomes unavailable. Denial-of-service attacks aim to make a service unavailable.
Which NIST CSF 2.0 function includes risk governance?
A Detect
B Govern
C Respond
D Recover
Answer: B. Govern. Govern is the NIST CSF 2.0 function for cybersecurity risk governance.
Coordinating action after an incident belongs to which function?
A Identify
B Protect
C Respond
D Govern
Answer: C. Respond. Respond covers actions taken to manage detected cybersecurity incidents.
Why use a unique salt for each stored password?
A Prevent shared precomputed hashes
B Allow reversible recovery
C Hide network addresses
D Shorten the digest
Answer: A. Prevent shared precomputed hashes. Unique salts stop identical passwords from sharing precomputed hash results.
Publicly disclosed software vulnerabilities receive which identifier?
A DNS label
B TLS cipher
C HTTP cookie
D CVE ID
Answer: D. CVE ID. CVE IDs identify publicly disclosed cybersecurity vulnerabilities.
CVSS summarizes a vulnerability’s what?
A Patch contents
B Severity score
C User identity
D Encryption key
Answer: B. Severity score. CVSS communicates a standardized vulnerability severity score.
How can an IDS differ from an IPS in deployment?
A IDS observes and alerts
B IDS always blocks inline
C IPS only hashes files
D IPS stores certificates
Answer: A. IDS observes and alerts. An IDS alerts on observations; an IPS can block traffic.
To restrict script sources, which response header can help?
A Accept-Language
B Content-Length
C Content-Security-Policy
D Last-Modified
Answer: C. Content-Security-Policy. Content-Security-Policy can restrict allowed script sources.
Why should login errors avoid naming an unknown username?
A Improve DNS resolution
B Shorten TLS handshakes
C Increase cache lifetime
D Reduce account enumeration
Answer: D. Reduce account enumeration. Generic login errors reveal less information for attackers enumerating accounts.
How can organizations reduce credential stuffing risk?
A Shared passwords
B Unique passwords and MFA
C Disable rate limits
D Reuse session IDs
Answer: B. Unique passwords and MFA. Unique passwords and MFA reduce the impact of stolen credentials.