Which regular expression is used to detect SQL injection attacks on an MS SQL Server?

Prepare for the EC-Council Certified Incident Handler Test with an interactive quiz. Study with flashcards, MCQs, hints, and explanations. Ace your test!

The selected regular expression, which detects SQL injection attacks specifically targeting MS SQL Server, is appropriate because it identifies patterns that are indicative of unauthorized commands being executed through injected SQL statements. This particular expression looks for the "exec" keyword followed by any whitespace (including spaces and plus signs) and then focuses on patterns that match stored procedures or other execution commands.

In SQL Server, the exec command is used to execute a stored procedure or a SQL statement, making it a critical entry point for an attacker attempting to manipulate SQL queries. By identifying the structure exec followed by parameters, this regex effectively captures attempts to execute unauthorized commands that could lead to exploitation of the database.

The other options feature various elements associated with SQL injection, but they either target different forms or specific encoded characters that are not broadly applicable forms of injection or do not pinpoint the execution command as directly as choice C does. These options may capture certain SQL injection tactics, but they are not as focused on the risk associated with executing arbitrary commands through the executive command as choice C is.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy