Enhance your CompTIA CASP+ exam readiness with our comprehensive quizzes. Sharpen your skills with detailed flashcards and multiple choice questions, each with hints and in-depth explanations. Prepare effectively for this challenging exam!

Practice this question and more.


What type of attack was being attempted if the log entry shows a pattern match with "union" and "select"?

  1. XSS attack

  2. SQL injection

  3. CSRF attack

  4. Denial of Service attack

The correct answer is: SQL injection

The presence of the terms "union" and "select" in a log entry suggests that an SQL injection attack is being attempted. SQL injection is a type of code injection that allows an attacker to manipulate a web application's backend SQL queries by injecting arbitrary SQL code through inputs. The "select" statement is a fundamental part of SQL used to retrieve data from a database, while "union" is typically used to combine the results of two or more SELECT statements into a single result set. When an attacker uses these terms, they are often trying to access or manipulate data they should not have access to. For instance, they might be attempting to retrieve sensitive information from a database, such as user credentials or personal data, by exploiting vulnerabilities in how the application handles user inputs in SQL queries. Thus, a log entry showing these specific keywords indicates a clear attempt to perform an SQL injection, making it the correct identification of the type of attack. Understanding this mechanism is crucial for safeguarding applications against such vulnerabilities and ensuring that data integrity and confidentiality are maintained.