How to Bypass SQL Injection Filter Manually
n previous article you have learned the basic concepts of SQL injection but in some scenarios you will find that your basic knowledge and tricks will fail. The reason behind that is the protection that developer had applied to prevent SQL injection, sometimes developer use filters to strip out few characters and OPERATORS from the user input before adding it to the query for SQL statement to prevent SQL Injection. Today’s article will help you to face such situations and will tell you how to bypass such filters. Here again we’ll be using DHAKKAN SQLI labs for practice.
Let’s start!!
LESSION 25
In Lab 25 OR and AND function are Blocked here we will try to bypass sql filter using their substitute.
function blacklist($id)
$id= preg_replace(‘/or/i’,””, $id); //strip out OR (non case sensitive)
$id= preg_replace(‘/AND/i’,””, $id); //Strip out AND (non case sensitive)
Since alphabetic word OR, AND are blacklisted, hence if we use AND 1=1 and OR 1=1 there would be no output therefore I had use %26%26 inside the query.
Following are replacement for AND and OR
AND : && %26%26
OR : ||
Open the browser and type following SQL query in URL
Full Article Read Here
Titles express ego. Insignificant in mortality. | Not Interest in Handling Financial Services
6 年Thanks. :)
Information Technology Security Analyst at Confidential
7 年good intro!! need much more details and POCS in this regard!!!