32

This question already has an answer here:

When I was running Windows 7 on my Lenovo machine there was a pre-installed Lenovo utility which would make it so that anyone trying to see what my webcam sees would instead see a still image of a camera with a cross over it. And thus preventing applications and hackers without root privileges from seeing out of my webcam. I say root privileges because root privileges were required in order to change the settings of the program in order to allow programs to actually use my webcam and get what it sees rather than the still image.

This was a very useful utility for privacy and security reasons, however on Ubuntu I have been unable to find a similar utility which has the ability to do the same. Is there such a utility or is there any way of achieving what I have described?

I am running Ubuntu GNOME 16.04 with GNOME 3.20.

marked as duplicate by Byte Commander, Eric Carvalho, karel, Yaron, Kevin Bowen Sep 4 '17 at 20:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

87

A foolproof way to block webcam input

Webcam blocker

Picture provided by Darkreading.com

  • 37
    THE solution! No drivers required, cross-platform and no licences to worry about. – winny May 31 '16 at 13:26
  • 5
    I was going to say a sock, or shoot at it like in a robbery movie, but I think this solution is more elegant. – user508889 May 31 '16 at 13:32
  • 11
    Wow you even have the luxurious decorative variant! For us lower class people a piece of tape is sufficient. – Gigala May 31 '16 at 14:51
  • 7
    This also works if somebody manages to get root permissions on your computer. – alex.forencich May 31 '16 at 22:04
  • 14
    I think you would be hard pressed to find a computer that DOESN'T have a web cam these days. It costs so little to stick a crappy little camera in there that it's basically stupid for companies not to do so. Fortunately, it's easy to fix with a small piece of electrical tape, at least for the vision side. What would be nice, though, is a physical switch that completely disconnects the camera (not a software thing, something that physically cuts the power). – alex.forencich May 31 '16 at 23:31
15

Disable the webcam kernel module:

modprobe -r uvcvideo

uvcvideo is the most common module name. If not found, check lsmod | grep uvcv and you'll get the module name.

This will disable it for this session.

To make it permanent, add blacklist + module name to /etc/modprobe.d/blacklist.conf. (Like blacklist uvcvideo)

  • 1
    Doesn’t a user have to be in the video group to access the webcam in the first place? – Michael May 31 '16 at 19:53
  • @Michael so? If some code (i.e. malware) running under your user account tries to access the webcam, it will have the correct permissions. So you could take yourself out of the video group, but then you would have to log out for the change to take effect. And it would not help against an attacker that does manage to get root permissions. – alex.forencich May 31 '16 at 22:03
  • 3
    @alex.forencich Disabling the driver does not help against someone with root permissions either. – pipe May 31 '16 at 23:26
  • 1
    Not disputing that. My point was that if you're in the video group so you can access the webcam, then any software running as your user can also access the webcam. And switching what groups you are in requires logging in and out while adding/removing a kernel module does not. – alex.forencich May 31 '16 at 23:28
  • 1
    This does not block input to the webcam. Most webcams are connected via USB and users with the right permissions can interact directly with USB devices regardless of whether a kernel module is loaded for them or not (see libusb). – Nathan Osman Mar 28 '17 at 23:35
11

Another foolproof solution that wouldn't work for everyone:

Open the laptop up, and unplug the webcam. Use an external webcam instead, pluggin it in only as required. I actually did this in the opposite order as the internal webcam was poor quality and I didn't want it on the same angle as the screen.

  • 2
    Most USB cameras in laptops are connected internally via USB, so if you wanted to really be clever, you could splice the data wires (data+ and data-) and connect an external switch to them. Then you could simulate plugging in and unplugging the webcam without opening up the device. – Nathan Osman Mar 28 '17 at 23:31
  • @NathanOsman indeed. I considered repurposing the connection for a Bluetooth dongle on my netbook (and a switch between the two). lsusb is your friend here if your want to check before taking screws out. – Chris H Mar 29 '17 at 5:36
1

First, try disabling it in the BIOS. You might want to Google "how to disable hardware in {your computer's model name} bios" and then disable the "internal webcam" or something like that.

If you can't get that to work, just cover it up.

Why this works: A hacker with remote access is not able to access the BIOS of a computer, as it is on the motherboard. However, a hacker can easily access your terminal and circumvent your protection.

Source: http://www.howtogeek.com/210921/how-to-disable-your-webcam-and-why-you-should/

  • 2
    Disabling the webcam is not quite equivalent to replacing the webcam image with a dummy, as the original utility does. Useful for some messengers that will only receive video if there is a local webcam too (older skype versions had that strange restriction). – rackandboneman Jun 2 '16 at 11:22