PT0-002 · Question #486
While a penetration tester conducts a web application assessment, the following URL is accessed: Which of the following exploit types is being attempted?
The correct answer is B. SQL injection. The penetration tester is attempting a SQL injection exploit, characterized by the manipulation of a URL parameter to inject SQL syntax, specifically using 1 or 1=1 and comment characters -- to bypass authentication or extract data from a backend database.
Question
While a penetration tester conducts a web application assessment, the following URL is accessed:
Which of the following exploit types is being attempted?
Options
- AXML injection
- BSQL injection
- CSession hijacking
- DBuffer overflow
How the community answered
(27 responses)- A4% (1)
- B93% (25)
- D4% (1)
Why each option
The penetration tester is attempting a SQL injection exploit, characterized by the manipulation of a URL parameter to inject SQL syntax, specifically using `1 or 1=1` and comment characters `--` to bypass authentication or extract data from a backend database.
XML injection involves manipulating XML data or schemas and is not typically initiated by injecting SQL-like syntax into a URL parameter.
The URL parameter `id=1 or 1=1--` is a classic example of a SQL injection attempt. The `1 or 1=1` condition will always evaluate to true, attempting to bypass authentication or retrieve all records, while `--` is used to comment out the rest of the original SQL query, preventing syntax errors and allowing the injected logic to execute. This directly targets the backend database.
Session hijacking involves stealing or predicting a user's session ID to impersonate them, which is not indicated by the SQL syntax in the provided URL.
Buffer overflow exploits involve overflowing a program's buffer to overwrite memory, usually leading to crashes or arbitrary code execution, and are not typically initiated via SQL syntax in a URL parameter.
Concept tested: Web application attacks - SQL Injection
Source: https://owasp.org/www-community/attacks/SQL_Injection
Topics
Community Discussion
No community discussion yet for this question.