Submit #1023264: 360 (Qihoo 360) 360 Whole Home Router M5 4.0.17.1566 Use of Hard-coded Credentialsinfo

Title360 (Qihoo 360) 360 Whole Home Router M5 4.0.17.1566 Use of Hard-coded Credentials
Description# 360 Whole Home Router M5 — Unauthenticated Telnet Root Shell in Factory State | | | |---|---| | **Vendor** | 360 (Qihoo 360) | | **Product** | 360 Whole Home Router M5 | | **Component** | `/etc/init.d/mpt` — `start()` (executed at boot via `/etc/rc.d/S49mpt`) | | **Affected versions** | M5 4.0.17.1566; also M50 (same firmware version) | | **CWE** | CWE-798 Use of Hard-coded Credentials (also CWE-306, CWE-489) | | **CVSS 3.1** | 8.7 — `AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H` | ## Summary When the device is in factory / uninitialized state, the boot script unconditionally sets the root password to a hard-coded value and unconditionally starts a telnet daemon on port 23. Any LAN-side attacker can then log in with those credentials and obtain a **root shell without any authentication**. ## Root Cause ```sh # /etc/init.d/mpt start() local mpt=`devinfo show mptdone` if [ -z "$mpt" ] || [ 0 -eq $mpt ]; then passwd root <<< 12345678 # root password forced to a hard-coded value service_start /usr/sbin/telnetd -l /bin/login.sh # telnet daemon started unconditionally /lib/fifo.sh & fi ``` - `/etc/rc.d/S49mpt` exists → the script runs automatically at boot, with no user action. - Firewall: LAN zone `input ACCEPT`, WAN `REJECT` → **reachable from the LAN**. ## Proof of Concept 1. Place the device in factory / uninitialized state and access it on the LAN. 2. Connect to the telnet service on port 23. 3. Log in with the user `root` and the password set by the boot script. 4. A root shell is returned with no prior authentication. Verified in emulation with the vendor's own root filesystem: the telnet daemon listens on port 23, the root password hash set by the boot script matches the hard-coded value (independently confirmed), and interactive login succeeds as root. No credentials are required. ## Evidence - Static: the script branch above; the boot symlink; the firewall rules; the `devinfo` key-value format (`%s=%s`, no stdout when the key is absent) - Dynamic: the real vendor binary executed in emulation returned empty stdout with exit code 0 for the queried flag; the script branch was traced and produced `passwd root` → `service_start telnetd` - End-to-end (isolated emulation with the vendor's own root filesystem): telnet daemon listening on port 23; the root password hash independently verified as the hard-coded value; successful interactive login as root - **Reproduced 3 independent times** (the salt differs each run; everything else is byte-identical) ## Stated Boundaries - Precondition: the device must be in the `mptdone`-not-yet-written state (factory / factory-reset / initialization not completed). - The initial state of that flag on a real device's factory partition was **not** independently verified; this test simulated it. - This is a configuration/design flaw (hard-coded default credential plus an unconditionally enabled debug service) — **not** a memory-corruption issue. ## Fix Recommendation 1. Do not hard-code a root password in the boot script; if a factory default is unavoidable, force a change before any remote login is possible. 2. Do not start telnetd unconditionally — use an authenticated, encrypted management interface, or gate any debug service behind an explicit opt-in. ## References Reported to the vendor's own security response platform. No public advisory.
User
 xiaomao (UID 100096)
Submission10/10/2026 15:29 (2 months ago)
Moderation11/03/2026 17:24 (24 days later)
StatusAccepted
VulDB entry430446 [Qihoo 360 Whole Home Router M5 4.0.17.1566 Boot Script /etc/init.d/mpt start hard-coded credentials]
Points20

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!