ExamGecko
Question list
Search
Search

Related questions











Question 535 - 312-50v12 discussion

Report
Export

During an attempt to perform an SQL injection attack, a certified ethical hacker is focusing on the identification of database engine type by generating an ODBC error. The ethical hacker, after injecting various payloads, finds that the web application returns a standard, generic error message that does not reveal any detailed database information. Which of the following techniques would the hacker consider next to obtain useful information about the underlying database?

A.
Use the UNION operator to combine the result sets of two or more SELECT statements
Answers
A.
Use the UNION operator to combine the result sets of two or more SELECT statements
B.
Attempt to compromise the system through OS-level command shell execution
Answers
B.
Attempt to compromise the system through OS-level command shell execution
C.
Try to insert a string value where a number is expected in the input field
Answers
C.
Try to insert a string value where a number is expected in the input field
D.
Utilize a blind injection technique that uses time delays or error signatures to extract information
Answers
D.
Utilize a blind injection technique that uses time delays or error signatures to extract information
Suggested answer: D

Explanation:

The technique that the hacker would consider next to obtain useful information about the underlying database is to utilize a blind injection technique that uses time delays or error signatures to extract information. A blind injection technique is a type of SQL injection technique that is used when the web application does not return any detailed error messages or data from the database, but only indicates whether the query was executed successfully or not. A blind injection technique relies on sending specially crafted SQL queries that cause a noticeable change in the behavior or response of the web application, such as a time delay or an error signature, which can then be used to infer information about the database.For example, the hacker could use the following methods12:

Time-based blind injection: This method involves injecting a SQL query that contains a time delay function, such as SLEEP() or WAITFOR DELAY, which pauses the execution of the query for a specified amount of time. The hacker can then measure the time difference between the normal and the delayed responses, and use it to determine whether the injected query was true or false. By using this method, the hacker can perform a binary search to guess the values of the data in the database, one bit at a time.

Error-based blind injection: This method involves injecting a SQL query that contains a deliberate error, such as a division by zero, a type mismatch, or an invalid conversion, which causes the database to generate an error message. The hacker can then analyze the error message, which may contain useful information about the database, such as the version, the name, the structure, or the data. By using this method, the hacker can exploit the error handling mechanism of the database to extract information.

The other options are not as suitable as option D for the following reasons:

A) Use the UNION operator to combine the result sets of two or more SELECT statements: This option is not feasible because it requires the web application to return data from the database, which is not the case in this scenario. The UNION operator is a SQL operator that allows the hacker to append the results of another SELECT statement to the original query, and display them as part of the web page. This way, the hacker can retrieve data from other tables or columns that are not intended to be shown by the web application.However, this option does not work when the web application does not return any data or error messages from the database, as in this scenario3.

B) Attempt to compromise the system through OS-level command shell execution: This option is not relevant because it is not a SQL injection technique, but a post-exploitation technique. OS-level command shell execution is a method of gaining access to the underlying operating system of the web server, by injecting a SQL query that contains a system command, such as xp_cmdshell, exec, or shell_exec, which executes the command on the server. This way, the hacker can perform various actions on the server, such as uploading files, downloading files, or running programs.However, this option does not help to obtain information about the database, which is the goal of this scenario4.

C) Try to insert a string value where a number is expected in the input field: This option is not effective because it is a basic SQL injection technique that is used to detect SQL injection vulnerabilities, not to exploit them. Inserting a string value where a number is expected in the input field is a method of triggering a syntax error in the SQL query, which may reveal the structure or the content of the query in the error message. This way, the hacker can identify the vulnerable parameters and the type of the database.However, this option does not work when the web application does not return any detailed error messages from the database, as in this scenario5.

1: Blind SQL Injection - OWASP Foundation

2: Blind SQL Injection - an overview | ScienceDirect Topics

3: SQL Injection Union Attacks - OWASP Foundation

4: OS Command Injection - OWASP Foundation

5: SQL Injection - OWASP Foundation

asked 18/09/2024
AshokBabu Kumili
43 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first