Hardware, firmware, driver, software
In theory, the indicator light should be a hardware function. When power is supplied to the sensor, it should also be supplied to an indicator light. This would make the light impossible to hack. However, I don't think anybody does this.
In some cases, it's a firmware function. Webcams have their own wimpy microprocessors and run code directly within the webcam. Control the light is one of those firmware functions. Some, like Steve Jobs, might describe this as "hardware" control, because it resides wholly within the webcam hardware, but it's still a form of software. This is especially true because firmware blobs are
unsigned, and therefore, can be hacked.
In some cases, it's the driver, either within the kernel mode driver that interfaces at a low-level with the hardware, or a DLL that interfaces at a high-level with software.
How to
As reverse engineers, we simply grab these bits of software/firmware/drivers and open them in our reverse engineering tools, like IDApro. It doesn't take us long to find something to hack.
For example, on our Dell laptop, we find the DLL that comes with the RealTek drivers for our webcam. We quickly zero in on the exported function "TurnOnOffLED()".
We can quickly make a binary edit to this routine, causing it to return immediately without turning on the light. Dave shows in the in the video below. First, the light turns on as normal, then he stops the webcam, replaces the DLLs with his modified ones, and then turns on the webcam again. As the following video shows, after the change, the webcam is recording him recording the video, but the light is no longer on.
The deal with USB
Almost all webcams, even those inside your laptop's screen, are USB devices. There is a standard for USB video cameras, the UVC standard. This means most hardware will run under standard operating systems (Windows, Mac, Linux) without drivers from the manufacturer -- at least enough to get Skype working. Only the more advanced features particular to each vendor need vendor specific drivers.
According to this standard, the LED indicator light is controlled by the host software. The UVC utilities that come with Linux allow you to control this light directly with a command-line tool, being able to turn off the light while the camera is on.
To hack this on Windows appears to require a filter driver. We are too lazy to write one, which is why we just hacked the DLLs in the demonstration above. We believe this is what the FBI has done: a filter driver for the UVC standard would get most webcam products from different vendors, without the FBI haven't to write a custom hack for different vendors.
USB has lots of interesting features. It's designed with the idea that a person without root/administrator access may still want to plug in a device and use it. Therefore, there is the idea of "user-mode" drivers, where a non-administrator can nonetheless install drivers to access the USB device.
This can be exploited with the Device Firmware Update (DFU) standard. It means in many cases that in user-mode, without administrator privileges, the firmware of the webcam can be updated. The researchers in the paper above demonstrate this with a 2008 MacBook, but in principle, it should work on modern Windows 7 notebook computers as well, using most devices. The problem for a hacker is that they would have to build a hacked firmware for lots of different webcam chips. The upside is that they can do this all without getting root/administrator access to the machine.
Conclusion
In the above video, Dave shows that the story of the FBI virus secretly enabling the webcam can work on at least one Windows machine. In our research we believe it can be done generically across most any webcam, using most any operating system.
Special note: Modern MacBooks do not use USB cameras. Instead, it hangs directly off the PCIe bus. That means things like UVC and DFU aren't going to work on them. Maybe Steve Jobs actually did build a chip with a hardware light.
3 comments:
I'm looking at the UVC 1.5 Class Specification PDF and don't see anything about a command to control an indicator light. The closest I could find was this: "4.2.2.1.18 Privacy Control
The Privacy Control setting is used to prevent video from being acquired by the camera sensor. A value of 0 indicates that the camera sensor is able to capture video images, and a value of 1 indicates that the camera sensor is prevented from capturing video images."
Are you sure this is not a camera with a vendor-specific interface descriptor to control the light?
UVC itself doesn't provide a "LED" on off button. What UVC does is allow fo you to interact with the low level camera bits like the motor, the pan/tilt, and various color settings. If you have done your home work you will be able to manipulate the LED with a Linux command line option like: uvcdynctrl -s "LED1 Mode" 0
My System Manufacturer is ASUSTeK COMPUTER INC.
my system model is :VivoBook_ASUSLaptop X512DA_X512DA
my BIOS:X512DA.308
Processor: AMD Ryzen3 300U with Radeon Vega Mobile Gfx (4CPUs), ~2.6GHz
Memory:8192MB Ram
Web-Cam name is: USB2.0 HD UVC Web-cam
Also want to do this on my HP-g018 the camera driver is :10.0.18362.815, name HP Intergrated Web-cam
they both have Built in web-cams
Is it possible for this one as well? i've been trying to do it through System "Registry Editor but i don't know what to look for and i'm unsure if it would work,
I also have an HP-g018 I've been trying to do this to aswell is it possible? , please an thank you i've been wanting to turn my PC's into a Survelliance Camera for my house and i've been told it is possible i just want to know how.
Post a Comment