easymulti selectObjective-mapped

A developer wants to reduce the risk of SQL injection in a new customer search form. Which two changes are the best mitigations? Select two.

Question 1easymulti select
Full question →

A developer wants to reduce the risk of SQL injection in a new customer search form. Which two changes are the best mitigations? Select two.

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

Best answer

Use parameterized queries or prepared statements for all database access.

Parameterized queries keep user input separate from the SQL command structure, which blocks injection attacks effectively.

B

Best answer

Validate and constrain user input before it reaches the database layer.

Input validation reduces dangerous characters and unexpected values, making exploitation harder and improving overall application security.

C

Distractor review

Store the database password in the page source so the app can connect faster.

Putting credentials in source code exposes secrets to anyone who can view the application files or web content.

D

Distractor review

Disable TLS so the application can inspect requests more easily.

Disabling TLS weakens transport security and does nothing to prevent SQL injection in the application logic.

E

Distractor review

Allow the application to build SQL statements by concatenating raw user input.

Concatenating raw input is the classic cause of SQL injection and directly increases the vulnerability.

Common exam trap

Common exam trap: NAT rules depend on direction and matching traffic

NAT is not only about the public address. The inside/outside interface roles and the ACL or rule that matches traffic are just as important.

Technical deep dive

How to think about this question

NAT questions usually test address translation, overload/PAT behaviour, static mappings and whether the right traffic is being translated. Read the interface direction and address terms carefully.

KKey Concepts to Remember

  • Static NAT maps one inside address to one outside address.
  • PAT allows many inside hosts to share one public address using ports.
  • Inside local and inside global describe the private and translated addresses.
  • NAT ACLs identify traffic for translation, not always security filtering.

TExam Day Tips

  • Identify inside and outside interfaces first.
  • Check whether the scenario needs static NAT, dynamic NAT or PAT.
  • Do not confuse NAT matching ACLs with normal packet-filtering intent.

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?

Static NAT maps one inside address to one outside address.

What is the correct answer to this question?

The correct answer is: Use parameterized queries or prepared statements for all database access. — The best mitigations are parameterized queries and input validation. Parameterized queries are the strongest defense because they prevent user-controlled data from being interpreted as SQL code. Input validation is also valuable because it limits unexpected characters, lengths, and formats before data reaches the database. Together, these measures reduce the likelihood that an attacker can alter the meaning of a query through crafted input. Why others are wrong: Storing credentials in source code creates a separate secret-handling problem and does not address injection. Disabling TLS weakens confidentiality in transit, but SQL injection happens at the application layer. Concatenating raw input into SQL directly creates the vulnerability rather than preventing it. Those choices either increase risk or fail to mitigate the issue the developer is trying to solve.

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.