  Hidden cameras, also called spy cameras, are surveillance tools commonly used
to spy on people without their knowledge. Whilst previous studies largely
focused on investigating the detection of such a camera and the privacy
implications, the security of the camera itself has received limited attention.
Compared with ordinary IP cameras, spy cameras are normally sold in bulk at
cheap prices and are ubiquitously deployed in hidden places within homes and
workplaces. A security compromise of these cameras can have severe
consequences. In this paper, we analyse a generic IP camera module, which has
been packaged and re-branded for sale by several spy camera vendors. The module
is controlled by mobile phone apps. By analysing the Android app and the
traffic data, we reverse-engineered the security design of the whole system,
including the module's Linux OS environment, the file structure, the
authentication mechanism, the session management, and the communication with a
remote server. Serious vulnerabilities have been identified in every component.
Combined together, they allow an adversary to take complete control of a spy
camera from anywhere over the Internet, enabling arbitrary code execution. This
is possible even if the camera is behind a firewall. All that an adversary
needs to launch an attack is the camera's serial number, which users sometimes
unknowingly share in online reviews. We responsibly disclosed our findings to
the manufacturer. Whilst the manufacturer acknowledged our work, they showed no
intention to fix the problems. Patching or recalling the affected cameras is
infeasible due to complexities in the supply chain. However, it is prudent to
assume that bad actors have already been exploiting these flaws. We provide
details of the identified vulnerabilities in order to raise public awareness,
especially on the grave danger of disclosing a spy camera's serial number.
