Skip to content
Memory corruption Write-up Intermediate

Research Diary: IP-Cameras Part 2

The M1033 IP camera has multiple buffer overflow vulnerabilities that can be exploited to gain a non-root shell. An attacker could use this access to search for setuid or setgid binaries to escalate privileges.

insinuator.net

Published on insinuator.net

Hi everybody, This is the second entry in our research diary on IP cameras. If you haven’t done so yet, you should read the first entry in advance.

The author, on insinuator.net

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 write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the camera's network-facing services did not properly check the size of input, leading to buffer overflows.

Impact

An attacker could gain a non-root shell on the camera and potentially escalate privileges by abusing setuid or setgid binaries.

What the attacker needed

Network access to the camera

How it was found

  1. Run a vulnerability scan on the devices.
  2. Exploit the buffer overflow vulnerabilities using Metasploit to obtain a shell.
  3. Use the find command with the -perm -4000 parameter to search for setuid executables.

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 write-up has not been written yet. The Original tab links to the source.

A buffer overflow is a bug where a program writes more data than it has space for, which can let an attacker run their own commands. Here, the camera's software had several such bugs, and a tool called Metasploit made it easy to get a command shell on the device. The attacker then looked for special programs that run with higher permissions to try to become the root user.

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.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.