PT0-002 · Question #532
During an assessment of a web application, a penetration tester would like to test the application for blind SQL injection. Which of the following techniques should the penetration tester perform…
The correct answer is B. '; IF (1 = 1) WA1TFOR DELAY '0:0:10' --. Blind SQL injection often relies on observing differences in application behavior, such as time delays or error messages, rather than direct data retrieval.
Question
During an assessment of a web application, a penetration tester would like to test the application for blind SQL injection. Which of the following techniques should the penetration tester perform next?
Options
- A1' ORDER BY 1--+
- B'; IF (1 = 1) WA1TFOR DELAY '0:0:10' --
- Cxyz' AND '1' = '1
- Dxyz' AND (SELECT CASE WHEN (1=1) THEN 1/0 ELSE 'a' END)='a)
How the community answered
(36 responses)- A3% (1)
- B69% (25)
- C8% (3)
- D19% (7)
Why each option
Blind SQL injection often relies on observing differences in application behavior, such as time delays or error messages, rather than direct data retrieval.
`1' ORDER BY 1--+` is typically used to determine the number of columns in a SQL query for union-based SQL injection, which is not suitable for blind SQL injection.
`'; IF (1 = 1) WA1TFOR DELAY '0:0:10' --` is a classic time-based blind SQL injection payload. If the injection is successful and the condition `(1 = 1)` is true (which it always is), the database server will pause for 10 seconds before responding, confirming the vulnerability without direct data output.
`xyz' AND '1' = '1` is a basic boolean-based SQL injection payload that tests for true conditions, but without observing a change in content or response time, it is not directly useful for blind injection testing.
`xyz' AND (SELECT CASE WHEN (1=1) THEN 1/0 ELSE 'a' END)='a)` is an error-based SQL injection attempt designed to provoke a database error if the condition is true, but blind SQL injection often avoids relying on error messages to prevent detection.
Concept tested: Time-based blind SQL injection
Source: https://portswigger.net/web-security/sql-injection/blind/lab-time-delays
Topics
Community Discussion
No community discussion yet for this question.