zoukankan      html  css  js  c++  java
  • 【原创】ourphp一处SQL注射

    想起早些年就已经很少玩审计了,后来因为合作方的原因就down了一份源码分析了一些,在很多地方都调用过滤函数。最后在评论一处发现了未过滤的地方,我们看看。

    <?php
    
    /*******************************************************************************
    
    * Ourphp - CMS建站系统
    
    * Copyright (C) 2014 ourphp.net
    
    * 开发者:哈尔滨伟成科技有限公司
    
    *******************************************************************************/
    
    
    
    
    
    $ourphp_version="V1.5.2";
    
    $ourphp_versiondate="20151211";
    
    $ourphp_empower="2";
    
    $ourphp_weixin="close";
    
    $ourphp_yixin="close";
    
    
    
    ?>

    见文件:

    functionplugsCommentproduct-content.php 97-109行

    $sql="insert into `ourphp_comment` set 
    
                `OP_Content` = '".dowith_sql(ourphp_sensitive($_POST["content"]))."',
    
                `OP_Class` = '".dowith_sql($_POST["OP_Class"])."',
    
                `OP_Type` = '".dowith_sql($_POST["OP_Type"])."',
    
                `OP_Name` = '".$OP_Name."',
    
                `OP_Ip` = '".$OP_Ip."',
    
                `OP_Vote` = '".$OP_Vote."',   //也不知道为什么这里就没有进行过滤。-。-、11
    
                `OP_Scoring` = '".$OP_Scoring."',
    
                `time` = '".date("Y-m-d H:i:s")."'
    
                ";
    
                $query=mysql_query($sql);
    
                exit("<script language=javascript> alert('OK!:)');history.go(-1);</script>");

    看看提交的参数OP_Vote=1&dafen%5B%5D=5&dafen%5B%5D=5&dafen%5B%5D=5&score=3&score=3&score=3&content=%E5%B7%AE%E8%AF%84&code=sree&OP_Class=2&OP_Type=productview&Submit=%E6%8F%90%E4%BA%A4%E8%AF%84%E8%AE%BA

    好了最后用SQLMAP跑一下。

  • 相关阅读:
    js 常用正则表达式
    深度学习
    开通自动订阅功能前:输入银行业务信息
    VUE学习九,生命周期
    Setting Windows server firewall by powershell
    Install iis web server using powershell
    转 FAL[server, ARC3]: FAL archive failed Error 16401 creating standby archive log file at host
    springboot admin 监控
    二进制手指计数法
    SpringBoot集成Swagger-Bootstrap-UI
  • 原文地址:https://www.cnblogs.com/blck/p/5084652.html
Copyright © 2011-2022 走看看