Build a Cheap Mouse Jiggler to Keep a Computer From Falling Asleep

This guide will walk you through how to build a cheap mouse jiggler using a Digispark board.

Cameron Coward
3 years agoSecurity

There is a reason that your computer automatically goes to sleep and locks itself when you don’t use it for a little while, and it isn’t just to save power. It is a simple and effective way to improve security, since so few people care enough to manually lock their computer when they take their lunch breaks or leave for the night. A really easy way to circumvent that security is to keep the computer from going to sleep by tricking it into thinking the user is still there. One device that can be used to achieve that is a mouse jiggler, and this guide will walk you through how to build a cheap one using a Digispark board.

A mouse jiggler is a simple device that does exactly what it says on the tin: moves your mouse around slightly. It doesn’t do that by physically moving your mouse, but by emulating a second mouse and sending pointer movement commands. If the mouse jiggler is intended for something like pentesting, then those movements will be tiny — just a pixel or two. That is enough to trick the computer into thinking that it is being used, but isn’t likely to be noticed by the user when they’re still at their computer. That’s less important if you’re using the mouse jiggler to simply keep your computer awake, like you might want to do if you’re taking an online course that requires that you watch an entire lecture.

The mouse jiggler device in this tutorial is based on a Digispark, which is an affordable board based on the Microchip ATtiny85. It’s very small and plugs directly into a USB port, which makes it ideal for unobtrusive pentesting. No other hardware is required, because the provided Arduino code handles all of the other functionality. This works thanks to the DigiMouse library, which is based on AVRUSB code. With this library, you can turn your Digispark into a standard USB HID mouse that shows up like any other mouse when it is plugged into a computer. The code will cause the mouse pointer to move in a tiny one pixel square over and over again, preventing the computer from falling asleep or locking. If you want to do some white hat hacking or simply need to keep your computer active for remote work, this is a cheap and easy device to make.

Cameron Coward
Writer for Hackster News. Proud husband and dog dad. Maker and serial hobbyist. Check out my YouTube channel: Serial Hobbyism
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles