Time-Based Blind Injections
Last updated
Last updated
Time-Based Blind SQL Injection is a type of SQL injection attack where the attacker uses SQL commands that cause the database to delay its response. By measuring the time it takes for the server to respond, the attacker can infer information about the database.
To identify Time-Based Blind SQL Injection vulnerabilities, look for inputs that cause delays in server responses. Indicators include:
Behavior Testing: Entering SQL syntax that includes delay functions (e.g., SLEEP
) to see if the application response time changes.
Consistent Delays: Testing with various delay times to confirm the behavior. Example:
Code analysis: When the source code is provided look for php code that doesn't sanitize the input. Here is an example of a vulnerable PHP code snippet:
SQLMap: An automated tool for SQL injection and database takeover.
Burp Suite: A web vulnerability scanner with tools for manual testing.
Havij: An automated SQL injection tool.
https://www.hackthebox.com/: Great place to learn and practice problems
https://picoctf.com/: They have many labs and past question which you can try with great write-ups available online.
The queries are executed synchronously, so it is possible to trigger conditional time delays to infer information.
Identify if the application is vulnerable to Time-Based Blind SQL Injection and cause a 10 second delay.
Time-Based Blind SQL Injection exploits delays in server response times to infer information about the database. Identifying these vulnerabilities requires careful timing analysis and checking things one by one.
You are given access to a web application which uses a tracking for analytics, and performs a SQL query containing the value of the submitted cookie.
On the provided in the , time-delay examples are given for multiple database engines. As we don't know which one to choose, we need to attempt them one by one.