Skip to content

Small Python Script for Shoulder Surfing Sessions, which takes pictures from a Laptop's Webcam in stealth mode, without opening terminals or images. Images are saved in Windows %userprofile% folder, path and image names can be easily set as desired.

Notifications You must be signed in to change notification settings

JonnyBanana/Stealth_Shoulder_Surfer

Repository files navigation


Alt text


How it Works


The script takes pictures from a Laptop's Webcam in stealth mode, without opening terminals or images.
It does not open any terminals and acts completely stealthily (both .pyw and exe files), making it ideal
for Shoulder Surfing sessions. The program saves the pictures captured by the webcam in the user profile folder.
To avoid overwriting existing images, each new image is saved with an incremental name. The path and name of the
images can be easily set in the code. I purposely avoided the use of code checks, to avoid the output of error
prompts, this is to avoid creating suspicion in case the program, for some reason, fails.


IMPORTANT NOTE: The .pyw file may need to add the Python binary to PATH in order to be launched correctly.


Guide Here:

https://phoenixnap.com/kb/add-python-to-path


Tested on: Win10 Home
Ver: 22H2
Build: 19045.4651


How, and Why, To Use It in a Real Scenario


Nowadays everyone has a smartphone in their pocket, and thus the ability to
take pictures in very few seconds, so why the need to create a laptop script?
Well first of all because anyway, in some cases, the gesture of taking a picture via smartphone can create
suspicion, and then there are some cases where doing things from laptop from a certain concealability.
Imagine a high-security place, such as an airport, or at a classic coffee shop with free
wifi conection, where people often bring their laptops with them.
Wouldn't it be nice to have the ability to do this from a computer, and without arousing any suspicion?


As everyone knows usually laptops have the camera on the front (apart from some models with rotating camera,
such as some models of Acer Spin Series and Lenovo Yoga Series), so when you shoot you need to move out of
the camera frame, otherwise instead of photographing any data, you will be photographing yourself, at least in
most of the shots. Any excuse, such as bending down to pick up an alleged object dropped on the ground, will
more than suffice for the purpose. Keep in mind that the program generally takes 2/5 seconds before taking the
picture, which gives plenty of time to move.


Alt text
Example of a photo shot taken with the program (really bad webcam quality)


Requirements

  • Python3
  • opencv-python

To install the library:

pip install opencv-python


Tested on: Python 3.12


Release


The exe can be downloaded from here:

https://github.com/JonnyBanana/Stealth_Shoulder_Surfer/releases/tag/shoulder_surfing


How to compile the script


If you want to compile the script yourself, it is possible to do so with the library “pyinstaller”


To install the library:

pip install pyinstaller


Commands to compile the exe:

Move to the Stealth_Shoulder_Surfer folder

cd path/of/Stealth_Shoulder_Surfer

Then compile the .pyw file with this command:

pyinstaller --onefile --noconsole Stealth_Shoulder_Surfer.pyw

Or if you want to fill in with custom icon:

pyinstaller --onefile --noconsole --icon=icon.ico Stealth_Shoulder_Surfer.pyw


Add More Stealth


The last thing to do to be truly invisible is to turn off the webcam's LED, which lights up every time it clicks.
Unfortunately, doing this via software is complex, this is because you have to modify one or more registry keys
(not known) that change depending on the brand and model of the webcam. I attempted to write a script that
would at least search the registry for suitable keys to make the job easier, but it was impossible for me
to terminate such a program. I therefore opted for the “easy way,” but if anyone would like to try their hand at it,
some known paths to the drivers and webcam services are:


Key for Device Drivers:
Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class


Key for Services:
Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services


Webcam Settings Key:
Path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAssociation\Devices


You can also manually search for keys such as “LED” , “WEBCAM” or “CAMERA” in the registry search function.


In any case, the best solutions are the simplest:


  • Stickers
  • Paint or Acrylic marker (such as Uni Posca)
  • Disabling the Led at the Hardware level (desoldering, burning, or breaking)
  • A WebCam Cover (opened)

Finally, if you want to change the script icon, without compiling the file, simply create a link
to the .pyw script and then change the icon from the “properties” option within the link icon menu.


Happy Shoulder Surfing to All!


Demo


Click the cat


BQOD


Stealth Shoulder Surfer #2 (Video Version)


In this version I slightly modified the code to shoot video instead of taking pictures from the webcam.
The video is saved in .avi format, to get the videos in the best possible quality. By default it is set to shoot
30-second videos, but it is easily set as needed. It uses the same libs as v1, so no further installation is needed,
I did not compile an exe because it is more convenient the .pyw file to set the duration of the video (it would
not have been possible to have the user set the duration, as it requires a gui and would make it less stealthy).
Important note, when shooting video the webcam led stays on steady and it is therefore essential to disable
the led, as explained in the “Add More Stealth” section.


Stealth Shoulder Surfer #3 (Multishot Version)


Finally, I thought a version that takes multiple photos (multishot) would be useful, so I further modified the code.
In this version, 10 photos are taken with a delay of 1 sec between each shot. To change the settings for the number
of shots and the delay, simply modify the last function (for i in range(10)). Disabling the led is also essential
for this version, as the led blinks with every shot, making the session very suspicious....


About

Small Python Script for Shoulder Surfing Sessions, which takes pictures from a Laptop's Webcam in stealth mode, without opening terminals or images. Images are saved in Windows %userprofile% folder, path and image names can be easily set as desired.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages