bWAPP - SQL Injection Blind (Time-based)

bWAPP – SQL Injection Blind (Time-based)

In this walk through, we will be going through the SQL Injection Blind (Time-based) vulnerability section from bWAPP Labs. We will be exploring and exploiting Time-based Blind SQL Injection and learn how application are affected because of it. So, let’s get started with the Hacking without any delay.

SQL Injection Blind (Time-based)

Table of Contents

Security: Low

  • Setting the security level to Low.

Security level Low

  • The application consist of a search box to search the movie by its title in the database. It issues a GET request to sqli_15.php for the execution however it did not return any response in the front end for both correct and incorrect values.

SQL Injection - Blind - Time-Based

Burpsuite intercept

Valid input

Random input

  • I used the below payload to test the Blind SQL injection as the application is not returning anything. After executing this, the application halts for 5 seconds confirming the vulnerability.

asd' OR sleep 5

payload

  • Let’s confirm the database name with the below payload. Successful execution halts the application for 5 seconds.

asd' OR (select database()='bWAPP') AND sleep(5)-- -

SQL Injection confirmed

  • Let’s dump the database names automatically using sqlmap.

python3 sqlmap.py -u http://localhost/sqli_15.php --cookie="PHPSESSID=0f4rces35gfqnhdj2cbe1mita6; security_level=0" --data="title=Iron+Man&action=search" -p title --dbs

SQLmap result

Also Read: bWAPP – SQL Injection Stored (Blog)

Conclusion:

Conclusion

So, we finally completed all the security levels for the bWAPP SQL Injection Blind (Time-based) Vulnerability. We looked into the various ways how application has been set up in various levels and how we can bypass the security controls implemented. Next, we can mitigate the potential SQL Injection attacks by performing input sanitization and using prepared statements or parametrized queries for every SQL query made by the application to the database. On that note, i will take your leave and will meet you in next one with another bWAPP vulnerability writeup, till then “Keep Hacking”.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top