In this walk through, we will be going through the SQL Injection Blind (Boolean-based) vulnerability section from bWAPP Labs. We will be exploring and exploiting Boolean-based Blind SQL Injection and learn how application are affected because of it. So, let’s get started with the Hacking without any delay.
Table of Contents
Security: Low
- Setting the security level to Low.
- The application uses a search box to search movies with its title in the database. For this, it issues a GET reuest to sqli4_4.php with the specified title.
- As we can see it only shows a “True” or “False” response against the input query.
- I used the below payload to test if it is vulnerable to SQL injection and it worked as it gives a “True” response against a random string as a title.
asd' OR '1'='1
- Let’s confirm if the database name is bWAPP which is running.
asd' OR (select database()='bWAPP') AND '1'='1
python3 sqlmap.py -u http://localhost/sqli_4.php --cookie="PHPSESSID=0f4rces35gfqnhdj2cbe1mita6; security_level=0" --data="title=Iron+Man&action=search" -p title --dbs
Also Read: bWAPP – SQL Injection (POST/Select)
Conclusion:
So, we finally completed all the security levels for the bWAPP SQL Injection Blind (Boolean-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”.