This USB Cable Can Kill Your Laptop If It Is Pulled Away

Imagine you are working in a public area (like a coffee shop) and while you are looking away someone steals your laptop. Most people have encryption enabled for their drives in case these types of situations happen. But what if you were already logged in and your laptop lid was open? What happens then? Well, Michael Altfield has come up with a solution to this dilemma. He has created a USB cable that kills your laptop when it is pulled away.

Michael calls the solution: BusKill. On his blog post, Michael described how Linux laptop owners can build their own $20 BusKill that automatically locks or shuts down their machine if it is ever taken away from them.

The Solution


The solution is actually very simple. On a Linux laptop, you add a new udev rule to /etc/udev/rules.d/. The rule will trigger the screen saver to lock the screen every time any USB drive is removed.

1. cat << EOF | sudo tee /etc/udev/rules.d/busKill.rules
2. ACTION=="remove", SUBSYSTEM=="usb", RUN+="DISPLAY=:0 xscreensaver-command -lock"
3. EOF
4. sudo udevadm control --reload

However, the above rule is too vast, because removal of any USB will lock your screen. So, if you want a specific USB brand to trigger the screensaver, then follow the following steps:

  1. First, insert your USB into your laptop.
  2. Then run udevadm monitor --environment --udev on the terminal.
  3. Now, remove your USB.
  4. Check the output of the udevadm command. You should see the manufacturer or model of your drive. Every USB will have a different model to identify it.

Now, update the rule with the model:

1. cat << EOF | sudo tee /etc/udev/rules.d/busKill.rules
2. ACTION=="remove", SUBSYSTEM=="usb", ENV{ID_MODEL}=="Micromax_A74", RUN+="DISPLAY=:0 xscreensaver-command -lock"
3. EOF
4. sudo udevadm control --reload

Instead of locking the screen, if you want to shut down your laptop, then use the following rule:

1. cat << EOF | sudo tee /etc/udev/rules.d/busKill.rules
2. ACTION=="remove", SUBSYSTEM=="usb", ENV{ID_MODEL}=="Micromax_A74", RUN+="shutdown -h now"
3. EOF
4. sudo udevadm control --reload

Michael applied the rule to a $4 USB drive. He then connected the drive to a $6 carabiner so he could attach BusKill to his belt. Michael also used a $7 magnetic breakaway USB adapter and a $3 one-meter USB extension cable. He bought all these for $20. If you shop around, you could probably get the items for less. If your laptop does not support USB-A, you will have to create a USB-C BusKill, which will cost more.

Read Also: Dell XPS 13 2-in-1 (2019) Review – Is it the Ultimate Laptop?

USB Cable - Image 1
Image Credit: Michael Altfield

As I mentioned at the start, this solution is only for Linux laptops and not macOS or Windows. That is because the solution relies on udev remove to trigger an action and this ability is not available in the other operating systems.

Also Try: Apple Files a Patent for Touchscreen MacBook Pro

Do you often work in public places, like a cafe or library? If so, have you ever worried about your laptop getting stolen? Now that you know about BusKill, will you be building one for yourself? Let us know your thoughts in the comments below! Continue to check out Maticstoday for the latest news items, product reviews, security practices, and video game discussions.

Javeria Qureshi

Javeria Qureshi is a Content Writer and Web Developer at Codematics Inc. In her free time, you can find her watching Patriot Act with Hasan Minhaj, reading books or drinking chai. Search for her articles under the hashtag #JQArticle on Twitter or LinkedIn.

Leave a Reply

Your email address will not be published.