Who’s using my macbook camera?
So the other day I was working away on my Macbook Pro and suddenly, out of the blue, the light next to my camera came on. Now, this is a new macbook so I don’t have my little sliding window sticker that blocks my webcam yet. Even if I did have it, I’d still be equally worried. So I started digging. The only apps I had open at the time were:
- BlueJeans (video conferencing software)
- Intellij IDEA
- Visual Studio Code
Basically the Software Engineer’s toolkit.
After a little digging on the Internet, I found a few commands that could help me. I have conveniently combined them all into this single command:
lsof | grep -e "AppleCamera" -e "iSight" -e "VDC"
This gave me the following:
➜ ~ lsof | grep -e "AppleCamera" -e "iSight" -e "VDC" firefox 1956 mdave txt REG 1,5 424176 1152921500312438057 /System/Library/Frameworks/CoreMediaIO.framework/Versions/A/Resources/VDC.plugin/Contents/MacOS/VDC
Hmm so its Firefox? Weird because usually its very good with permissions. Most of my tabs were DuckDuckGo, StackOverflow, Jira, Confluence, Gmail and a few other “trusty” company web pages. This couldn’t be it?
I did some digging around in settings but no luck. Finally, I brought down the hammer and took away the permissions to Camera (and Microphone for safety) from the System Preferences. And viola!
➜ ~ lsof | grep -e "AppleCamera" -e "iSight" -e "VDC" firefox 1956 mdave txt REG 1,5 424176 1152921500312438057 /System/Library/Frameworks/CoreMediaIO.framework/Versions/A/Resources/VDC.plugin/Contents/MacOS/VDC ➜ ~ lsof | grep -e "AppleCamera" -e "iSight" -e "VDC" ➜ ~
No more naughty webcam access! I guess if I need it again, I’ll just give it permissions explicitly through the System Preferences. Or perhaps I can side-install another firefox browser when I need to grant it permissions to view my webcam – the number of websites that I use that need this permission are very small in number and I can live with using a dedicated web browser for it.