nerdexam
CompTIA

CAS-002 · Question #282

Which of the following types of attacks is the user attempting? select id, firstname, lastname from authors User input= firstname= Hack;man lastname=Johnson

The correct answer is D. SQL injection. The code in the question is SQL code. The attack is a SQL injection attack. 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…

Enterprise Security

Question

Which of the following types of attacks is the user attempting? select id, firstname, lastname from authors User input= firstname= Hack;man lastname=Johnson

Options

  • AXML injection
  • BCommand injection
  • CCross-site scripting
  • DSQL injection

How the community answered

(36 responses)
  • A
    6% (2)
  • C
    3% (1)
  • D
    92% (33)

Explanation

The code in the question is SQL code. The attack is a SQL injection attack. 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.

Topics

#SQL injection#web application attacks#input validation

Community Discussion

No community discussion yet for this question.

Full CAS-002 Practice