easymultiple choiceObjective-mapped

A web login form returns access after a tester enters `' OR '1'='1'--` into the username field. What type of attack is this?

Question 1easymultiple choice
Full question →

A web login form returns access after a tester enters `' OR '1'='1'--` into the username field. What type of attack is this?

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

Cross-site scripting

Cross-site scripting runs script code in a user's browser, not SQL logic in a backend query.

B

Best answer

SQL injection

SQL injection happens when attacker input changes the meaning of a database query. The payload forces the login check to evaluate as true, which can bypass authentication.

C

Distractor review

Session hijacking

Session hijacking steals or reuses an existing session token, rather than altering a database query.

D

Distractor review

Insecure deserialization

Insecure deserialization involves unsafe object handling, not injecting SQL syntax into a form field.

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: SQL injection — SQL injection is the correct answer because the input changes the database query itself. The `OR '1'='1'` logic turns the condition into something that always evaluates as true, and the comment marker can ignore the rest of the original statement. This is a classic example of unsanitized user input reaching a backend SQL query and bypassing authentication. Why others are wrong: Cross-site scripting targets the browser and usually affects other users viewing a page. Session hijacking requires stealing a valid session token, not manipulating query logic. Insecure deserialization is about unsafe object parsing and is unrelated to SQL syntax. The injected quote and always-true condition are the clearest signs of SQL injection.

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.