PrepAway - Latest Free Exam Questions & Answers

Which of the following BEST describes a protective countermeasure for SQL injection?

Which of the following BEST describes a protective countermeasure for SQL injection?

PrepAway - Latest Free Exam Questions & Answers

A.
Eliminating cross-site scripting vulnerabilities

B.
Installing an IDS to monitor network traffic

C.
Validating user input in web applications

D.
Placing a firewall between the Internet and database servers

Explanation:
By validating user input and preventing special characters, we can prevent the injection of client-side
scripting code.
SQL injection is a code injection technique, used to attack data-driven applications, in which malicious
SQL statements are inserted into an entry field for execution (e.g. to dump the database contents to the
attacker). SQL injection must exploit a security vulnerability in an application’s software, for example,
when user input is either incorrectly filtered for string literal escape characters embedded in SQL
statements or user input is not strongly typed and unexpectedly executed. SQL injection is mostly known
as an attack vector for websites but can be used to attack any type of SQL database.
Incorrect Answers:
A: Eliminating cross-site scripting vulnerabilities is always a good idea. However, that will not prevent SQL
Injection attacks. Therefore this answer is incorrect.
B: An intrusion detection system (IDS) is a device or software application that monitors network or system
activities for malicious activities or policy violations and produces reports to a management station. IDS
come in a variety of “flavors” and approach the goal of detecting suspicious traffic in different ways.
There are network based (NIDS) and host based (HIDS) intrusion detection systems. Some systems may
attempt to stop an intrusion attempt but this is neither required nor expected of a monitoring system.
Intrusion detection and prevention systems (IDPS) are primarily focused on identifying possible incidents,
logging information about them, and reporting attempts. In addition, organizations use IDPSes for other
purposes, such as identifying problems with security policies, documenting existing threats and deterring
individuals from violating security policies.
An IDS is not used to prevent SQL Injection attacks. Therefore this answer is incorrect.
D: A firewall is used to restrict the flow of traffic between subnets based on rules that specify what
source/destination IP addresses, ports and protocols are allowed. A firewall is not used to prevent SQL
Injection attacks. Therefore this answer is incorrect.
http://en.wikipedia.org/wiki/SQL_injection
http://en.wikipedia.org/wiki/Intrusion_detection_system

One Comment on “Which of the following BEST describes a protective countermeasure for SQL injection?

  1. meac says:

    SQL Injection (SQLi) refers to an injection attack wherein an attacker can execute malicious SQL statements (also commonly referred to as a malicious payload) that control a web application’s database server (also commonly referred to as a Relational Database Management System – RDBMS). Since an SQL Injection vulnerability could possibly affect any website or web application that makes use of an SQL-based database, the vulnerability is one of the oldest, most prevalent and most dangerous of web application vulnerabilities.
    SQLi injection is mostly known as an attack vector for websites but can be used to attack any type of SQL database.

    By validating user input and preventing special characters, we can prevent the injection of clientside scripting code.

    Ways to mitigate SQLi are:
    • Prepared statements with parameterized queries. Use of prepared statements with parameterized queries is a strong control to mitigate an attack.
    • Stored procedures. Stored procedures are the SQL statements defined and stored in the database itself and then called from the application.
    • Input validation. A common source of SQL injection is maliciously crafted external input.
    • Principle of least privilege. This is a standard security control that helps minimize the potential damage of a successful SQL injection attack

    In light of the above, C is the correct answer




    0



    0

Leave a Reply