网站地图    收藏   

主页 > 后端 > 网站安全 >

WordPress插件CevherShare 2.0 SQL注射缺陷及修复 - 网站

来源:自学PHP网    时间:2015-04-17 14:47 作者: 阅读:

[导读] 影响版本: WordPress CevherShare 2.0 plugin开发者: http://phpkode.com/下载地址: http://phpkode.com/download/s/cevhershare.zip测试平台: Ubuntu-Linux缺陷代码页面:cevhershare/cevhershare-admin......

 

影响版本: WordPress CevherShare 2.0 plugin

开发者: http://phpkode.com/

下载地址: http://phpkode.com/download/s/cevhershare.zip

测试平台: Ubuntu-Linux

缺陷代码页面:cevhershare/cevhershare-admin.php

测试:

http://www.2cto.com /wp-content/plugins/cevhershare/cevhershare-admin.php?id=[SQL-Injection]

$id = $_GET['id'] ? $_GET['id'] : $_POST['id'];

       $pos = $_GET['pos'] ? $_GET['pos'] : $_POST['pos'];

       $status = $_GET['status'] ? $_GET['status'] : $_POST['status'];

       $task = $_GET['t'] ? $_GET['t'] : $_POST['t'];

       $do = $_POST['do'];

       if($do == "update-lang"){

              $uplang = $_POST['update-lang'];

              update_option('cevhershare_language',$uplang);

       }www.2cto.com

       if($id)     $item = $wpdb->get_row("SELECT * FROM ".$wpdb->prefix."cevhershare WHERE id=$id");

       if($do == 'update') $wpdb->query("UPDATE ".$wpdb->prefix."cevhershare SET enabled='".$_POST['enabled']."', position='".$_POST['position']."', name='".$_POST['name']."', big='".$_POST['big']."', small='".$_POST['small']."' WHERE id='$id'");

       elseif($do == 'add') $wpdb->query("INSERT INTO ".$wpdb->prefix."cevhershare (position, name, big, small) VALUES('".$_POST['position']."','".$_POST['name']."', '".$_POST['big']."', '".$_POST['small']."')");

       elseif($do == 'delete') $wpdb->query("DELETE FROM ".$wpdb->prefix."cevhershare WHERE id=$id LIMIT 1");

       elseif($do == 'reset') cevhershare_reset();

       elseif($do == 'settings'){

修复:过滤

自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习

京ICP备14009008号-1@版权所有www.zixuephp.com

网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com

添加评论