目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2024-22515 PoC — iSpyConnect.com Agent DVR 安全漏洞

来源
关联漏洞
标题: iSpyConnect.com Agent DVR 安全漏洞 (CVE-2024-22515)
Description:iSpyConnect.com Agent DVR是一套跨平台的视频监控软件。 iSpyConnect.com Agent DVR 5.1.6.0版本存在安全漏洞。攻击者利用该漏洞通过上传音频组件上传任意文件。
Description
CVE-2024-22515 arbitrary file upload and CVE-2024-22514 remote code execution for AgentDVR 5.1.6.0 (Authenticated)
介绍
# AgentDVR-5.1.6.0-File-Upload-and-Remote-Code-Execution

CVE-2024-22515 arbitrary file upload and CVE-2024-22514 remote code execution for AgentDVR 5.1.6.0 (Authenticated)

(Older versions likely affected)

[https://github.com/Orange-418/CVE-2024-22514-Remote-Code-Execution](https://github.com/Orange-418/CVE-2024-22514-Remote-Code-Execution)

[https://github.com/Orange-418/CVE-2024-22515-File-Upload-Vulnerability](https://github.com/Orange-418/CVE-2024-22515-File-Upload-Vulnerability)

https://www.ispyconnect.com/

https://www.ispyconnect.com/docs/agent/about

https://www.youtube.com/watch?v=RXmoXERWVk8


Tested on 4.7.3.0 and 5.1.6.0. Versions in between and older are also likely impacted. Tested on installs for Windows x64, Linux x64, and Docker. It is worth noting that the exploitation path for Windows varies slightly. Intead of calling bash, you can just call an exe file directly, such as "/AgentDVR/sounds/payload.exe".


AgentDVR version 5.1.6.0 contains two vulnerabilities: an arbitrary file upload vulnerability, and a arbitrary file execution vulnerability. These both chain together to achieve execution of any arbitrary file uploaded, including malicious payloads. This results in possible RCE from individuals with valid credentials for an AgentDVR server.


Due to the nature of the program, which largely uses WebRTC, I did not make a PoC script. However, the manual process is very low in complexity. If someone makes a PoC script and contacts me, I will link it here.



First, after logging into the dashboard, add a new device. Create just a "Dummy" device with default settings.

![](pics/create_dummy.png)



On the device, add an action to trigger a task if a photo is taken. Then, add a task, and select to "Execute Command" and select any "File" in the dropdown for what command to trigger.

![](pics/add_command.png)



Now, prepare your payload. You can modify and use the "payload.sh" file in this repository. It is a very simple reverse shell script.

After it is ready, go back to the server menu, and select "File Upload". Select "Audio", and begin browsing for the file, but switch the file selector dropdown from "*.wav" to "All Files".

![](pics/upload_payload.png)

![](pics/upload_audio.png)



Next, go back to the server menu, and select "Backup/Restore". Select "Download". You will receive a zip file containing a few different .XML files.

![](pics/download_backup.png)



Extract the contents and open up the "config.xml". Near the bottom you will find a line similar to '<Directory Entry="/path/to/media/"'. This is important as it is the folder structure for the AgentDVR installation, which can come in a couple different forms, depending on the installation type.

![](pics/find_path.png)



Next, edit the objects.xml file, and find a line near the bottom similar to '<entry type="EXE" param1='. Edit the path, which should be calling a default alert bat file, and insert a path calling bash to then call your .sh script. You can model the path from the previous step so you know what to insert.

![](pics/edit_objects.png)
![](pics/edit_path.png)
![](pics/path_payload.png)



After this, you can go ahead and start your listener.

![](pics/start_listener.png)



Now, go back to the server menu, and select "Backup/Restore" again. This time, choose to upload a file, and select your modified "objects.xml" file.

![](pics/upload_objects.png)



The dashboard should restart with the changes. Now, in theory, you should have a dummy camera with an alert to trigger your reverse shell script when a photo is taken. With your listener started, right click the dummy camera feed, and select "Take Photo".

![](pics/take_photo.png)



You should now have a root shell.

![](pics/root.png)
文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →