exam questions

Exam 350-701 All Questions

View all questions & answers for the 350-701 exam

Exam 350-701 topic 1 question 13 discussion

Actual exam question from Cisco's 350-701
Question #: 13
Topic #: 1
[All 350-701 Questions]

Which two prevention techniques are used to mitigate SQL injection attacks? (Choose two.)

  • A. Check integer, float, or Boolean string parameters to ensure accurate values.
  • B. Use prepared statements and parameterized queries.
  • C. Secure the connection between the web and the app tier.
  • D. Write SQL code instead of using object-relational mapping libraries.
  • E. Block SQL code execution in the web application database login.
Show Suggested Answer Hide Answer
Suggested Answer: AB 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
sull3y
Highly Voted 2 years, 3 months ago
BE Checking integer, float, or Boolean string parameters to ensure accurate values (Option A) can help prevent certain types of injection attacks, such as those that rely on unexpected input. However, it is not a comprehensive solution and can still be bypassed by a determined attacker. Using prepared statements and parameterized queries (Option B) is a more robust method of preventing SQL injection attacks. These techniques separate the data and the SQL command, preventing attackers from injecting malicious code into the SQL command. Blocking SQL code execution in the web application database login (Option E) is another robust method to mitigate SQL injection attacks. This technique ensures that no malicious SQL statements can be executed in the database. Therefore, B and E are correct answers as they are more robust methods of preventing SQL injection attacks.
upvoted 7 times
sull3y
2 years, 3 months ago
Option C, Securing the connection between the web and the app tier, is important for overall security, but it is not directly related to preventing SQL injection attacks. Having a secure connection ensures that the data being transmitted between the web and app tier is protected, but it does not prevent attackers from injecting malicious code into the SQL command. Option D, Writing SQL code instead of using object-relational mapping libraries, can help prevent SQL injection attacks by giving you more control over the SQL commands being executed, but it is not a guarantee. It is still possible to make mistakes in the SQL code that can lead to SQL injection vulnerabilities. Prepared statements and parameterized queries (Option B) is a more robust method of preventing SQL injection attacks, regardless of whether you are using an ORM library or writing raw SQL code. In summary, B and E are the best options for preventing SQL injection attacks. While C and D may improve overall security, they do not directly address SQL injection vulnerabilities.
upvoted 1 times
...
...
Cock
Most Recent 6 months, 2 weeks ago
Selected Answer: AB
Not only dealing with web application
upvoted 1 times
...
certtaker202
7 months, 1 week ago
Selected Answer: AB
A. Input sanitization is a must to mitigate SQL injection B. By using prepared statements and parameterized queries, you don't execute SQL statements introduced in the SQLi vulnerable form
upvoted 1 times
...
davedavedave
7 months, 2 weeks ago
B AND E SQL Injection is best prevented through the use of parameterized queries. FROM: https://cheatsheetseries.owasp.org/cheatsheets/Query_Parameterization_Cheat_Sheet.html
upvoted 1 times
...
Cokamaniako
7 months, 3 weeks ago
Selected Answer: AB
Answer A and B Parameterized statements Main article: Prepared statement With most development platforms, parameterized statements that work with parameters can be used (sometimes called placeholders or bind variables) instead of embedding user input in the statement. A placeholder can only store a value of the given type and not an arbitrary SQL fragment. Hence the SQL injection would simply be treated as a strange (and probably invalid) parameter value. In many cases, the SQL statement is fixed, and each parameter is a scalar, not a table. The user input is then assigned (bound) to a parameter Pattern check Integer, float or boolean, string parameters can be checked if their value is valid representation for the given type. Strings that must follow some strict pattern (date, UUID, alphanumeric only, etc.) can be checked if they match this pattern.
upvoted 2 times
...
Marshpillowz
1 year, 1 month ago
Selected Answer: BE
B and E are correct as per sull3y’s response
upvoted 1 times
...
nep1019
1 year, 9 months ago
According to Cisco's documentation: https://tools.cisco.com/security/center/resources/sql_injection.html B and C are correct: Parameterized queries in ASP.NET, prepared statements in Java, or similar techniques in other languages should be used comprehensively in addition to strict input validation. Application layer protocol inspection performs deep packet inspection of traffic that transits the firewall. Using application layer protocol inspection on Cisco firewalls to mitigate SQL attacks against web servers is discussed in Cisco TAC Security Podcast Episode #16. Only way to do the second, imo, is to secure the connection between the web and app tier (Application layer protocol inspection)
upvoted 1 times
nep1019
1 year, 9 months ago
Changing back to A and B based on this statement that comes at the beginning of the section on mitigating these attacks: The primary approaches include validation of user-supplied data, in the form of whitelisting or blacklisting, and the construction of SQL statements such that user-supplied data cannot influence the logic of the statement. Last sentence is all about the statements and A and B are directly about that so must be those two.
upvoted 1 times
...
...
Brain_Power
1 year, 11 months ago
Selected Answer: BE
correct answer B & E
upvoted 1 times
...
maddyr
1 year, 11 months ago
B and E for me https://en.wikipedia.org/wiki/SQL_injection#Mitigation
upvoted 2 times
Przemol
1 year, 10 months ago
IT is B and D according to the URL provided. Parameterized statements Main article: Prepared statement With most development platforms, parameterized statements that work with parameters can be used (sometimes called placeholders or bind variables) instead of embedding user input in the statement. A placeholder can only store a value of the given type and not an arbitrary SQL fragment. Hence the SQL injection would simply be treated as a strange (and probably invalid) parameter value. In many cases, the SQL statement is fixed, and each parameter is a scalar, not a table. The user input is then assigned (bound) to a parameter.[24] Enforcement at the coding level Using object-relational mapping libraries avoids the need to write SQL code. The ORM library in effect will generate parameterized SQL statements from object-oriented code.
upvoted 1 times
...
...
cyberwhizzy0
1 year, 11 months ago
A and B is correct
upvoted 1 times
...
achille5
2 years, 2 months ago
Selected Answer: BC
B. Prepared statements and parameterized queries are a way of separating the SQL code from the data that is being passed into the query. By doing this, the SQL injection attack is prevented because the attacker cannot inject any SQL code into the prepared statement or parameterized query. C. Securing the connection between the web and the app tier is also an important prevention technique to mitigate SQL injection attacks. This is because an attacker can intercept network traffic and view the data that is being passed between the web and the app tier. By using SSL or TLS encryption, the data that is being passed between the two tiers is encrypted, making it much harder for an attacker to view or manipulate.
upvoted 1 times
achille5
2 years, 2 months ago
After further reading i changed to A, B. https://en.wikipedia.org/wiki/SQL_injection
upvoted 3 times
...
...
jienBoq
2 years, 5 months ago
to me it's B and C as per this Cisco article: https://tools.cisco.com/security/center/resources/sql_injection.html "A SQL injection attack can be detected and potentially blocked at two locations in an application traffic flow: in the application and in the network." "Parameterized queries in ASP.NET, prepared statements in Java, or similar techniques in other languages should be used comprehensively in addition to strict input validation." A's wording doesn't necessary imply input validation D doesn't make sense E is not a solution which I've seen suggested anywhere.
upvoted 2 times
achille5
2 years, 2 months ago
B. Prepared statements and parameterized queries are a way of separating the SQL code from the data that is being passed into the query. By doing this, the SQL injection attack is prevented because the attacker cannot inject any SQL code into the prepared statement or parameterized query. C. Securing the connection between the web and the app tier is also an important prevention technique to mitigate SQL injection attacks. This is because an attacker can intercept network traffic and view the data that is being passed between the web and the app tier. By using SSL or TLS encryption, the data that is being passed between the two tiers is encrypted, making it much harder for an attacker to view or manipulate.
upvoted 2 times
...
...
JavierAcuna
2 years, 5 months ago
Selected Answer: AB
Answer found in: https://tools.cisco.com/security/center/resources/sql_injection.html
upvoted 1 times
...
NikoNiko
2 years, 10 months ago
Correct are A, B. Countermeasure against SQLi: ..you should most definitely use ORM (Object-Relational Mappings) and prepared statements. = option B. They take away the vast majority of SQL Injection risk, and are generally good software practices. However, you shouldn’t think that using these packages makes you completely immune. Instead, you should also use input validation. This will keep malicious input out of your system to begin with, which is a great way to reduce risk. = option A https://snyk.io/blog/sql-injection-orm-vulnerabilities/
upvoted 2 times
...
HilaM
2 years, 10 months ago
A,B correct Answer found in: https://tools.cisco.com/security/center/resources/sql_injection.html
upvoted 1 times
davezz
2 years, 5 months ago
This is from this link: Parameterized queries in ASP.NET, prepared statements in Java, or similar techniques in other languages should be used comprehensively in addition to strict input validation. Each of these techniques performs all required escaping of dangerous characters before the SQL statement is passed to the underlying database system.
upvoted 1 times
...
...
aal
3 years ago
https://en.wikipedia.org/wiki/SQL_injection#Mitigation Limiting the permissions on the database login used by the web application to only what is needed may help reduce the effectiveness of any SQL injection attacks that exploit any bugs in the web application.
upvoted 1 times
...
otzu1
3 years ago
yea i legit searched it's most def A/B the other option D is discussing the web application "login".
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago