mediummultiple choiceObjective-mapped

A security analyst is reviewing the source code of a custom authentication service. The service uses a function that compares a user-supplied password to the stored password hash by iterating through each byte and returning false immediately upon the first mismatch. The analyst measures the function's execution time and discovers it varies measurably depending on how many initial bytes match. Which type of attack is this vulnerability most likely to facilitate?

Question 1mediummultiple choice
Full question →

A security analyst is reviewing the source code of a custom authentication service. The service uses a function that compares a user-supplied password to the stored password hash by iterating through each byte and returning false immediately upon the first mismatch. The analyst measures the function's execution time and discovers it varies measurably depending on how many initial bytes match. Which type of attack is this vulnerability most likely to facilitate?

Answer choices

Why each option matters

Good practice is not just finding the correct option. The wrong answers often show the exact trap the exam wants you to fall into.

A

Distractor review

Brute-force attack

A brute-force attack attempts every possible combination of characters, which is computationally expensive and does not leverage timing variations. While an attacker could eventually guess the password, the timing vulnerability specifically enables a more efficient attack.

B

Distractor review

Dictionary attack

A dictionary attack uses a precomputed list of common passwords or phrases, and does not utilize execution time measurements. It relies on the likelihood that users choose weak passwords, not on side-channel information like timing.

C

Distractor review

Replay attack

A replay attack involves intercepting a valid authentication token (such as a session cookie or hashed password) and retransmitting it to impersonate the user. It does not involve manipulating or measuring execution time of a comparison function.

D

Best answer

Timing attack

A timing attack exploits measurable variations in the time it takes to execute a cryptographic operation. In this case, the early-exit comparison enables an attacker to deduce the correct secret byte by byte, making it the correct classification.

Common exam trap

Common exam trap: answer the scenario, not the keyword

Many certification questions include familiar terms but test a specific constraint. Read the exact wording before choosing an answer that is generally true but wrong for this case.

Technical deep dive

How to think about this question

This question should be treated as a scenario, not a definition check. Identify the problem, the constraint and the best action. Then compare each option against those facts.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.
  • Use explanations to understand the rule behind the answer.

TExam Day Tips

  • Underline the problem statement mentally.
  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Related practice questions

Related SY0-701 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

More questions from this exam

Keep practising from the same exam bank, or move into a focused topic page if this question exposed a weak area.

FAQ

Questions learners often ask

What does this SY0-701 question test?

Read the scenario before looking for a memorised answer.

What is the correct answer to this question?

The correct answer is: Timing attack — The described vulnerability is a timing side-channel. When a comparison function returns early upon the first mismatch, an attacker can send many carefully crafted guesses and measure the response time. A slightly longer execution time indicates that more initial bytes matched. By iterating through all possible byte values, the attacker can recover the entire secret (password or hash), byte by byte. This is a well-known attack against non-constant-time cryptographic comparisons. Mitigations include using constant-time comparison functions.

What should I do if I get this SY0-701 question wrong?

Then try more questions from the same exam bank and focus on understanding why the wrong options are tempting.

Discussion

Loading comments…

Sign in to join the discussion.