首页 > 数据库技术 > 详细

【原创】ourphp一处SQL注射

时间:2015-12-29 09:59:08      阅读:216      评论:0      收藏:0      [点我收藏+]

想起早些年就已经很少玩审计了,后来因为合作方的原因就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";



?>

见文件:

function\plugs\Comment\product-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跑一下。

技术分享

【原创】ourphp一处SQL注射

原文:http://www.cnblogs.com/blck/p/5084652.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!