CVE-2024-11147
Executive Summary
CVE-2024-11147 exposes a critical security flaw in ECOVACS robot lawnmowers and vacuums. The vulnerability stems from the use of a deterministic root password that is generated based on the device's model and serial number. An attacker who gains shell access to the device can trivially escalate privileges to root by calculating this predictable password. This allows for complete compromise of the device, including persistent backdoor installation, data exfiltration, and potential use as a pivot point within a home network.
The vulnerability is classified as CWE-798: Use of Hard-coded Credentials, specifically a weak, deterministic generation algorithm. The CVSS score of 7.6 reflects the high impact (confidentiality, integrity, availability) but is tempered by the requirement for prior shell access (high privileges) and local attack vector.
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 a software package manager (NPM, PyPI, Go, Ruby). It is a firmware-level issue in IoT devices manufactured by ECOVACS. The deterministic password is likely hardcoded in the device's firmware image, which is distributed through the manufacturer's update channels. Compromise of the firmware signing or distribution pipeline could allow an attacker to inject a backdoored version that exposes the password generation algorithm or modifies it.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Local (L) - The attacker requires shell access to the device.
- Attack Complexity (AC): Low (L) - The password generation algorithm is deterministic and can be easily replicated.
- Privileges Required (PR): High (H) - The attacker already has shell access (e.g., via a separate vulnerability or physical access).
- User Interaction (UI): None (N) - No user action is required beyond the initial compromise.
- Scope (S): Unchanged (U) - The vulnerability does not cross a trust boundary.
- Confidentiality (C): High (H) - Root access allows reading all data on the device.
- Integrity (I): High (H) - Root access allows modifying firmware, configuration, and installed software.
- Availability (A): High (H) - Root access allows bricking the device or disrupting its operation.
Threat Level: High. While the attack vector is local, the impact is severe. The deterministic nature of the password makes it trivial to exploit once shell access is obtained. The widespread deployment of these devices in homes makes them attractive targets for botnets or targeted attacks.
Deep Dive & Mechanics
The core issue is the use of a deterministic root password generation algorithm. The password is derived from the device's model and serial number. This means that for any given device, the root password is fixed and can be calculated by anyone who knows the algorithm.
How it works:
- An attacker gains shell access to the device (e.g., via a vulnerable service, physical access, or a previous exploit).
- The attacker identifies the device model and serial number (often available via
cat /proc/cpuinfo,uname -a, or similar commands). - The attacker runs a script that implements the password generation algorithm, inputting the model and serial number.
- The attacker uses the generated password to execute
suorsudoto become root.
Why it's dangerous:
- No Brute-Force Needed: The password is not random; it's a deterministic function of public information.
- Persistence: Root access allows the attacker to install persistent backdoors, modify the firmware, and maintain access even after a reboot.
- Lateral Movement: A compromised device can be used to scan the local network for other vulnerable devices or to exfiltrate data.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual): The vulnerable firmware likely contains a script or binary that generates the root password. A simplified example in Python:
import hashlib
def generate_root_password(model, serial):
# Deterministic algorithm - example only
seed = model + serial
return hashlib.md5(seed.encode()).hexdigest()[:12]
This function takes the model and serial number, concatenates them, and produces a predictable password.
Patched Code (Conceptual): A patched version would use a cryptographically secure random password generated at first boot, stored in a secure element or encrypted partition. It would also enforce password rotation and complexity requirements.
import os
import hashlib
def generate_root_password():
# Generate a random 16-byte password
random_bytes = os.urandom(16)
return hashlib.sha256(random_bytes).hexdigest()[:16]
The patched version would also require the password to be set by the user during initial setup, not hardcoded.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- An ECOVACS device with shell access (e.g., via a separate vulnerability like CVE-2024-11146 or physical access).
- Knowledge of the device model and serial number.
- A script to generate the root password.
Exploitation Steps:
- Gain Shell Access: Exploit another vulnerability (e.g., a command injection in the web interface) or use physical access (e.g., UART) to get a shell on the device.
- Identify Model and Serial: Run the following commands:
cat /proc/cpuinfo | grep "Serial" cat /proc/device-tree/model - Generate Root Password: Use a script like the one below:
import hashlib def generate_root_password(model, serial): # Replace with actual algorithm if known seed = model + serial return hashlib.md5(seed.encode()).hexdigest()[:12] model = "DEEBOT_OZMO_920" serial = "1234567890" password = generate_root_password(model, serial) print(f"Root password: {password}") - Escalate Privileges:
su - # Enter the generated password - Post-Exploitation:
- Install a persistent backdoor (e.g., SSH server, reverse shell).
- Modify firmware to maintain access.
- Exfiltrate data (e.g., Wi-Fi credentials, camera feeds).
Blue Team (Defense & Detection)
Detection:
- Monitor for unusual shell activity on the device.
- Log all
suandsudoattempts. - Monitor for unexpected outbound connections from the device.
- Use network segmentation to limit the device's access to the internet and other internal systems.
Mitigation:
- Immediate: If possible, change the root password manually via a firmware update or by connecting to the device's serial console.
- Long-term: ECOVACS must release a firmware update that uses a random, per-device root password generated at first boot.
- Workaround: Disable remote access to the device if not needed. Use a firewall to block inbound connections to the device from the internet.
Indicators of Compromise (IOCs)
- Network:
- Outbound connections to known malicious IPs or domains.
- Unusual SSH or Telnet traffic from the device.
- DNS queries for suspicious domains.
- Host:
- Unexpected processes running as root (e.g.,
sshd,nc,bash). - Modified system binaries (e.g.,
/bin/login,/sbin/init). - Presence of unauthorized SSH keys in
/root/.ssh/authorized_keys. - Unusual cron jobs or startup scripts.
- Unexpected processes running as root (e.g.,
- File System:
- Presence of scripts or binaries in
/tmpor/var/tmpthat are not part of the standard firmware. - Modified
/etc/shadowor/etc/passwdfiles. - New files in
/rootor/home.
- Presence of scripts or binaries in
Detection Engineering
YARA Rule
rule Detect_Ecovacs_Root_Password_Generator {
meta:
description = "Detects scripts or binaries that generate a deterministic root password based on model and serial number"
author = "Valters IT"
date = "2024-11-15"
reference = "CVE-2024-11147"
strings:
$s1 = "model" ascii wide nocase
$s2 = "serial" ascii wide nocase
$s3 = "root" ascii wide nocase
$s4 = "password" ascii wide nocase
$s5 = "md5" ascii wide nocase
$s6 = "sha256" ascii wide nocase
condition:
all of ($s1, $s2, $s3, $s4) and 1 of ($s5, $s6)
}
Sigma Rule
title: Ecovacs Root Password Escalation Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects attempts to escalate privileges to root using a deterministic password on Ecovacs devices
author: Valters IT
date: 2024/11/15
references:
- https://nvd.nist.gov/vuln/detail/CVE-2024-11147
logsource:
category: process_creation
product: linux
detection:
selection:
Image|endswith: '/su'
CommandLine|contains: '-'
condition: selection
falsepositives:
- Legitimate administrative use
level: high
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-11147 Ecovacs Root Password Exploit - Outbound Connection"; flow:to_server,established; content:"|73 68 65 6c 6c|"; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate Devices: Place ECOVACS devices on a separate VLAN with restricted internet access.
- Monitor Logs: Enable logging on the device and monitor for suspicious activity.
- Change Password: If possible, change the root password manually via a firmware update or serial console.
Long-term Actions:
- Firmware Update: ECOVACS must release a firmware update that generates a random, per-device root password at first boot.
- Secure Boot: Implement secure boot to prevent unauthorized firmware modifications.
- Code Audit: Conduct a thorough security audit of the firmware to identify and fix similar vulnerabilities.
Workarounds:
- Disable remote access features (e.g., cloud connectivity) if not required.
- Use a firewall to block inbound connections to the device from the internet.
- Regularly check for and apply firmware updates from ECOVACS.
Valters IT
Securing the Digital Frontier
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.