Foscam IP Video Camera webService 9299.org DDNS Client Code Execution Vulnerability
A buffer overflow exists in the DDNS client of Foscam C1 cameras when using the 9299.org provider. An attacker who can intercept HTTP traffic could send a malicious response to overwrite memory and potentially execute code.
Originally disclosed on Cisco Talos
An exploitable buffer overflow vulnerability exists in the DDNS client used by the Foscam C1 Indoor HD Camera running application firmware 2.52.2.43. On devices with DDNS enabled, an attacker who is able to intercept HTTP connections will be able to fully compromise the device by creating a rogue HTTP server.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The DDNS client copies the IP address from the HTTP response into a fixed-size buffer without checking the length, leading to a buffer overflow.
Impact
An attacker who can intercept HTTP connections could fully compromise the device by creating a rogue HTTP server.
What the attacker needed
DDNS enabled with provider 9299.org; attacker can intercept HTTP traffic
How it was found
- Configure the device to use DDNS provider number 5 (9299.org) via the web interface or CGI command.
- Intercept the device's HTTP request to the DDNS server.
- Respond with a crafted HTTP response containing '200 OK', '\r\n\r\n', 'Current IP Address:</font>', and a long string of characters followed by a carriage return.
- The device copies the long string into a fixed-size buffer, causing a crash or potential code execution.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
This camera regularly contacts a DDNS service to learn its public IP address. If an attacker can intercept that connection, they can send a fake reply containing too much data, which overflows a fixed-size memory buffer. This can crash the camera or let the attacker run their own code on it.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.