https://github.com/flowerinthenight/windows-camera-class-filter-driver
An example of a camera class (upper) filter driver for Windows.
https://github.com/flowerinthenight/windows-camera-class-filter-driver
camera-filter-driver driver filter-driver ksthunk uvc wdm windows windows-camera
Last synced: 25 days ago
JSON representation
An example of a camera class (upper) filter driver for Windows.
- Host: GitHub
- URL: https://github.com/flowerinthenight/windows-camera-class-filter-driver
- Owner: flowerinthenight
- License: mit
- Created: 2015-11-25T09:31:34.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-01-31T03:17:02.000Z (over 4 years ago)
- Last Synced: 2023-08-03T23:58:17.320Z (almost 2 years ago)
- Topics: camera-filter-driver, driver, filter-driver, ksthunk, uvc, wdm, windows, windows-camera
- Language: C
- Homepage:
- Size: 95.7 KB
- Stars: 30
- Watchers: 7
- Forks: 16
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://ci.appveyor.com/project/flowerinthenight/windows-camera-class-filter-driver/branch/master)
## Overview
**Disclaimer:** This driver code was intended to be for POC only and was never released to production. If you're looking at the codes, you probably know that this type of driver is generally undocumented and some bits were achieved using reverse engineering.
This filter driver stores a copy of the stream buffer in a shared memory named `\\BaseNamedObjects\\{9E2288A3-7955-428F-9064-9C05C0EDC608}`. This buffer can then be streamed from userland.
This driver was tested (though not extensively; it failed on HLK) on Windows 7, 8 and 10 (2015 release) using the ThinkPad X and T series (2015 and older) on both proprietary camera drivers and Microsoft's default UVC driver.
There's a good article [here](https://www.virusbulletin.com/virusbulletin/2018/09/through-looking-glass-webcam-interception-and-protection-kernel-mode/) that explains in detail how this works.
## Generate catalog (.cat) file from package
```
inf2cat /driver: /os:
```
[https://msdn.microsoft.com/en-us/library/windows/hardware/ff547089(v=vs.85).aspx](https://msdn.microsoft.com/en-us/library/windows/hardware/ff547089(v=vs.85).aspx)## Enable test signing
```
bcdedit /set testsigning on
```## Driver setup
Use the [ccfltr-console](https://github.com/flowerinthenight/windows-camera-class-filter-driver/tree/master/ccfltr-console) tool to install/uninstall the driver. It handles the setup in relation to `ksthunk.sys`, if available. Copy the tool to the directory of the .sys and .inf file.### Installation
```
ccfltr-console.exe /install
```### Uninstallation
```
ccfltr-console.exe /uninstall
```