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跑一下。

  • 相关阅读:
    Code Forces Gym 100886J Sockets(二分)
    CSU 1092 Barricade
    CodeChef Mahesh and his lost array
    CodeChef Gcd Queries
    CodeChef GCD2
    CodeChef Sereja and LCM(矩阵快速幂)
    CodeChef Sereja and GCD
    CodeChef Little Elephant and Balance
    CodeChef Count Substrings
    hdu 4001 To Miss Our Children Time( sort + DP )
  • 原文地址:https://www.cnblogs.com/blck/p/5084652.html
Copyright © 2011-2022 走看看