
Inline Comments Adding inline comments can help the string to bypass the WAFs filters and reach its target. This works by using the hex equivalent for certain characters, such as 27 for or 3c for 3d 25 20 Space 0a New line 00 Null byte Lets see an SQL example from module 1: union select password from er limit 1 This SQL query string, URL encoded, will be like this: er20limit201202F We can easily encode and decode with this method with the following website: Null Bytes Another rather simple way of encoding is using a null byte (00) prior to any characters that the WAF filter is blocking.įor example, the SQL Query we used earlier will be: 00 union select password from er limit 1 WAFs will commonly ignore everything after the null but pass the entire string to the web server where it is processed. Bypass Filter Keyword Union Sql Injection Password From MySQL URL Encoding (Hex Encoding) URI standards permit URLs to contain only the printable characters in the US-ASCII charset. Bypass Filter Keyword Union Sql Injection Password From MySQL.Open the browser and type following SQL query in URLįrom screenshot you can see we have successfully fixed the query for AND (&) into URL encode as %26%26. 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.

$id= preg_replace(‘/AND/i’,””, $id) //Strip out AND (non case sensitive) $id= preg_replace(‘/or/i’,””, $id) //strip out OR (non case sensitive) In Lab 25 OR and AND function are Blocked here we will try to bypass sql filter using their substitute. Here again we’ll be using DHAKKAN SQLI labs for practice.

Today’s article will help you to face such situations and will tell you how to bypass such filters.

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. In 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.
