Skip to content

Mods for the Linux UVC driver to record & replay raw webcam frames

Notifications You must be signed in to change notification settings

severinbratus/uvcvideo-record-replay

Repository files navigation

Linux USB Video Class (UVC) Driver with RECORD & REPLAY modes

A proof of concept for spoofing face verification software and the like.

This repository contains modifications to the Linux (6.9.5) uvcvideo driver, with the modified files residing in the drivers/media/usb/uvc directory. It also contains scripts in Python & Bash for the spoofing workflow.

Example Usage

  1. Run ./inst.sh to install the kernel module, and replace the default uvcvideo driver.
  2. Run ./switchrecord to switch the module to RECORD mode.
  3. Turn on the camera, e.g. via Cheese. Multiple streams possible.
  4. Run ./styx.py k2u recorded to transfer the frames from kernelspace to userspace (as a nested directory of images named recorded).
  5. (Opt.) Run ./mirror.sh recorded/ mirrored/ to mirror (horisontally flip) the frames. This will produce a directory mirrored.
  6. Run sudo ./styx.py u2k mirrored to transfer the modified frames back to kernelspace.
  7. Run ./switchreplay to switch to REPLAY mode.
  8. Turn on the camera again. Now the frames should be mirrored.

About

Mods for the Linux UVC driver to record & replay raw webcam frames

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages