(Do not confuse with Mi Router 4A 100m/Gigabit edition routers)
The Xiaomi Mi Router 4 is an indoor wireless router based on the MediaTek MT7621 SoC, with three 10/100/1000 Ethernet ports (2xLAN + 1xWAN), dual band 802.11bgn+ac (dual radio) WiFi, 128 MB of DDR3 RAM, 128 MB of SLC NAND storage and four external non-detachable antennae. It is intended for sale in domestic China market, so offered only with Chinese firmware.
There are the following methods to install OpenWrt:
2.26.175
. Might also work on other versions listed in the project readme, as they seem to be pretty much the same for all Xiaomi routers supported by the exploit. This method uses the same idea as the one for Mi Router 4A Gigabit Edition, but the flashing process is different, because Mi Router 4 has a different mtd partition layout. Warning: snapshot build might break your router. Use a stable one.It is recommended to perform this method under Linux.
stok=3700b146c87e45fea51170f87f47d34c
cd OpenWRTInvasion
git checkout 0.0.7
pip3 install -r requirements.txt
python3 remote_command_execution_vulnerability.py
192.168.31.1
, user root
and password root
./tmp
folder.root
and password root
telnet 192.168.31.1
cd /tmp
./busybox sha256sum name_of_your_kernel1_image_here.bin
./busybox sha256sum name_of_your_rootfs0_image_here.bin
mtd write name_of_your_kernel1_image_here.bin kernel1
mtd write name_of_your_rootfs0_image_here.bin rootfs0
reboot
. It might take a little bit longer than usual.192.168.1.1
in your browser. You should get to the LuCI page.System
→ Backup / Flash Firmware
page.Flash image
, upload sysupgrade image, check the checksum.Keep the settings
checkbox. Thus, all presented checkboxes should be clear.
OpenWrt Factory Firmware: kernel, kernel1 and rootfs0 images. Use this files the first time you flash OpenWrt onto the router - i.e. use with the above mentioned exploit / install method.
OpenWrt Sysupgrade Firmware: Use this file to complete OpenWrt installation or upgrade an OpenWrt “system” to a newer version.
Architecture | MIPS |
---|---|
Vendor | Mediatek |
bootloader | U-Boot |
System-On-Chip | Mediatek MT7621 |
CPU/Speed | mipsel_24kc @ 880MHz |
Flash size | 128 MB |
RAM | 128 MB |
Wireless 2.4 GHz | Mediatek MT7603, b/g/n |
Wireless 5 GHz | Mediatek MT7612, a/n/ac |
Ethernet | 3x 10/100/1000 BASE-TX Ethernet Interface (1x WAN, 2x LAN) |
Serial | Yes |
There is a screw on the bottom of the case covered by the product label, remove the edges for access. There are also clips around the edge of the case you will need to open, using, for example, a plastic card.