I wrote 'tourniquet' as a simple exercise for securing a booted laptop from a snatch-n-grab scenario using over-the-counter hardware.
When you plug a flash-drive into a computer, the USB drivers installed on your operating system go to work identifying that device and what it's supposed to do. On a Linux box, this involves assigning a UUID to the external drive.
With a little shell coding, I managed to get my primary workstation to routinely probe my USB bus (that's redundant if you're paying attention) for a specific, pre-identified, UUID or device serial number. With this little program running constantly one can easily program a sequence of events to occur should the system startup without said device or if it were suddenly removed.
My real world application is a thumbdrive being plugged in the laptop with a lanyard likewise attached to the users wrist. In the event the laptop was snatched away by a thief, the USB thumbdrive would dislodge. As soon as the UUID or serial number disappeared, the machine could be set to automatically shutdown or quite literally self-destruct, all without the user having to run any commands.
Things learned: cron, UUIDs, full-disk encryption.
Project Link: https://github.com/warybyte/tourniquet