{"id":24606,"date":"2025-08-27T20:00:51","date_gmt":"2025-08-27T16:00:51","guid":{"rendered":"https:\/\/me-en.kaspersky.com\/blog\/badcam-usb-attacks-detection-hardening\/24606\/"},"modified":"2025-08-27T20:00:51","modified_gmt":"2025-08-27T16:00:51","slug":"badcam-usb-attacks-detection-hardening","status":"publish","type":"post","link":"https:\/\/me-en.kaspersky.com\/blog\/badcam-usb-attacks-detection-hardening\/24606\/","title":{"rendered":"An APT\u2026 through your webcam"},"content":{"rendered":"<p>Computer webcams have long been <a href=\"https:\/\/www.kaspersky.com\/blog\/webcam-duct-tape\/12448\/\" target=\"_blank\" rel=\"noopener nofollow\">suspected of peeping<\/a> on folks; nothing unusual about that. But now they\u2019ve found a new role in conventional cyberattacks. At the recent BlackHat conference in Las Vegas, researchers presented the <a href=\"https:\/\/www.securityweek.com\/badcam-new-badusb-attack-turns-linux-webcams-into-persistent-threats\/\" target=\"_blank\" rel=\"nofollow noopener\">BadCam<\/a> attack, which allows an attacker to reflash a webcam and execute malicious actions on the computer it\u2019s connected to. Essentially, it\u2019s a variation of the well-known <a href=\"https:\/\/www.kaspersky.com\/blog\/badusb-solved\/12539\/\" target=\"_blank\" rel=\"noopener nofollow\">BadUSB<\/a> attack; the key difference is that with BadCam attackers don\u2019t need to prepare a malicious device in advance \u2014 they can use a \u201cclean\u201d webcam already connected to the computer. Another unwelcome novelty is that the attack can be carried out completely remotely. Although the research was conducted by ethical hackers, and BadCam hasn\u2019t yet been observed in real-world attacks, it won\u2019t be difficult for criminals to figure it out and reproduce the necessary steps. That\u2019s why organizations should understand how BadCam works and implement protective measures.<\/p>\n<h2>The return of BadUSB<\/h2>\n<p>It was also at BlackHat that <a href=\"https:\/\/www.wired.com\/2014\/10\/code-published-for-unfixable-usb-attack\/\" target=\"_blank\" rel=\"nofollow noopener\">BadUSB<\/a> was unveiled to the world \u2014 back in 2014. It works by taking a seemingly harmless device (say, a USB stick) and reprogramming its firmware. When it connects to a computer, the malicious gadget presents itself as a composite USB device with multiple components, such as a flash drive, keyboard, or network adapter. Its storage functions work normally, so the user interacts with the flash drive as usual. Meanwhile, a hidden firmware component impersonating a keyboard sends commands to the computer \u2014 for example, a key combination to launch PowerShell and enter commands to download malware from the internet, or to open a tunnel to the attackers\u2019 server. BadUSB techniques are still widely used in red team exercises \u2014 often implemented via specialized hacker multitools like Hak5 Rubber Ducky or Flipper Zero.<\/p>\n<h2>From BadUSB to BadCam<\/h2>\n<p>Researchers at Eclypsium managed to replicate this firmware-rewriting trick on Lenovo 510 FHD and Lenovo Performance FHD webcams. Both use a SigmaStar <a href=\"https:\/\/en.wikipedia.org\/wiki\/System_on_a_chip\" target=\"_blank\" rel=\"nofollow noopener\">SoC<\/a>, which has two interesting features. First, the webcam software is Linux-based and supports USB Gadget extensions. This Linux kernel feature allows the device to present itself as a USB peripheral such as a keyboard or network adapter. Second, the webcam\u2019s firmware update process lacks cryptographic protection \u2014 it\u2019s enough to send a couple of commands and a new memory image over the USB interface. Reflashing can be carried out by running software on the computer with standard user privileges. With this altered firmware, Lenovo webcams turn into a keyboard-camera hybrid capable of sending predefined commands to the computer.<\/p>\n<p>Although the researchers tested only Lenovo webcams, they note that other Linux-based USB devices may be similarly vulnerable.<\/p>\n<h2>Cyber-risks of the BadCam attack<\/h2>\n<p>Potential attack vectors for BadCam against an organization include:<\/p>\n<ul>\n<li>A new camera sent by the attacker<\/li>\n<li>A camera temporarily disconnected from a corporate computer and connected to the attacker\u2019s laptop for reflashing<\/li>\n<li>A camera that was never disconnected from the organization\u2019s computer, and compromised remotely via malware<\/li>\n<\/ul>\n<p>Detecting this malware through behavior analysis can be tricky, since it doesn\u2019t need to make suspicious changes to the registry, files, or network \u2014 it only has to communicate with the webcam. If the first phase of the attack succeeds, the malicious firmware can then send keyboard commands to:<\/p>\n<ul>\n<li>disable security tools;<\/li>\n<li>download and execute additional malware;<\/li>\n<li>launch legitimate tools for a <a href=\"https:\/\/www.kaspersky.com\/blog\/lotl-attacks-detection-hardening-guidance\/50826\/\" target=\"_blank\" rel=\"nofollow noopener\">Living Off the Land (LotL)<\/a> attack;<\/li>\n<li>respond to system prompts, for example for elevating privileges;<\/li>\n<li>exfiltrate data from the computer over the network.<\/li>\n<\/ul>\n<p>At the same time, standard software scans won\u2019t detect the threat, and even a full system reinstall won\u2019t remove the implant. System logs will show that the malicious actions were performed from the logged-in user\u2019s keyboard. For this reason, such attacks will most likely be deployed for persistence in the compromised system \u2014 although in the MITRE ATT&amp;CK matrix, BadUSB techniques are listed under T1200 (Hardware Additions) and assigned to the Initial Access phase.<\/p>\n<h2>How to defend against BadCam attacks<\/h2>\n<p>The attack can be stopped at several stages using standard security tools that block trojanized peripherals and make LotL attacks more difficult. We recommend that you:<\/p>\n<ul>\n<li>Configure your EDR\/EPP solution to monitor connected HID devices. In <a href=\"https:\/\/me-en.kaspersky.com\/next?icid=me-en_kdailyplacehold_acq_ona_smm__onl_b2b_kdaily_wpplaceholder_sm-team___knext____655fe72318f39647\" target=\"_blank\" rel=\"noopener\">Kaspersky Next<\/a>, this feature is called <a href=\"https:\/\/support.kaspersky.com\/help\/NextPro\/1.0\/en-US\/230866.htm\" target=\"_blank\" rel=\"nofollow noopener\">BadUSB Attack Prevention<\/a>. When a device with keyboard functionality is connected, the user must enter a numeric code displayed on the screen, without which the new keyboard can\u2019t control the system.<\/li>\n<li>Configure your  and <a href=\"https:\/\/me-en.kaspersky.com\/next?icid=me-en_kdailyplacehold_acq_ona_smm__onl_b2b_kdaily_wpplaceholder_sm-team___knext____655fe72318f39647\" target=\"_blank\" rel=\"noopener\">XDR<\/a> solutions to collect and analyze detailed telemetry for HID device connections and disconnections.<\/li>\n<li>Set up USB port control in your MDM\/EMM solution. Depending on its capabilities, you can disable USB ports altogether or create an allowlist of devices (by VID\/PID identifiers) permitted to connect to the computer.<\/li>\n<li>Where possible, enforce an application allowlist on employee computers so that only approved software can run and all other applications are blocked.<\/li>\n<li>Regularly update not only the software but also the firmware of standard equipment. For example, Lenovo has <a href=\"https:\/\/support.lenovo.com\/us\/en\/product_security\/LEN-194466\" target=\"_blank\" rel=\"nofollow noopener\">released patches<\/a> for the two camera models used in the research, making malicious firmware updates more difficult.<\/li>\n<li>Apply the Principle of Least Privilege, ensuring each employee has only the access rights strictly necessary for their role.<\/li>\n<li>Include BadUSB and BadCam in employee security-awareness training, with simple guidance on what to do if a USB device behaves unexpectedly \u2014 for example, if it starts typing commands on its own.<\/li>\n<\/ul>\n<input type=\"hidden\" class=\"category_for_banner\" value=\"kaspersky-next\">\n","protected":false},"excerpt":{"rendered":"<p>How attackers can hijack your computer through its webcam \u2014 and how to stop it.<\/p>\n","protected":false},"author":2722,"featured_media":24607,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1318,1916,1917],"tags":[2088,2850,2294,2746,2747,2748,2749,2097,2494,424,712,2297],"class_list":{"0":"post-24606","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-business","8":"category-enterprise","9":"category-smb","10":"tag-tips","11":"tag-badusb","12":"tag-edr","13":"tag-lolbas","14":"tag-lolbin","15":"tag-lotl","16":"tag-monitoring","17":"tag-siem","18":"tag-strategy","19":"tag-usb","20":"tag-webcam","21":"tag-xdr"},"hreflang":[{"hreflang":"en-ae","url":"https:\/\/me-en.kaspersky.com\/blog\/badcam-usb-attacks-detection-hardening\/24606\/"},{"hreflang":"en-in","url":"https:\/\/www.kaspersky.co.in\/blog\/badcam-usb-attacks-detection-hardening\/29497\/"},{"hreflang":"en-gb","url":"https:\/\/www.kaspersky.co.uk\/blog\/badcam-usb-attacks-detection-hardening\/29433\/"},{"hreflang":"ru","url":"https:\/\/www.kaspersky.ru\/blog\/badcam-usb-attacks-detection-hardening\/40349\/"},{"hreflang":"x-default","url":"https:\/\/www.kaspersky.com\/blog\/badcam-usb-attacks-detection-hardening\/54219\/"},{"hreflang":"ru-kz","url":"https:\/\/blog.kaspersky.kz\/badcam-usb-attacks-detection-hardening\/29607\/"},{"hreflang":"en-au","url":"https:\/\/www.kaspersky.com.au\/blog\/badcam-usb-attacks-detection-hardening\/35361\/"},{"hreflang":"en-za","url":"https:\/\/www.kaspersky.co.za\/blog\/badcam-usb-attacks-detection-hardening\/34990\/"}],"acf":[],"banners":"","maintag":{"url":"https:\/\/me-en.kaspersky.com\/blog\/tag\/usb\/","name":"USB"},"_links":{"self":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/24606","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/users\/2722"}],"replies":[{"embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/comments?post=24606"}],"version-history":[{"count":0,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/24606\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/media\/24607"}],"wp:attachment":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/media?parent=24606"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/categories?post=24606"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/tags?post=24606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}