usb-ks

USB Killswitch
git clone git://git.laack.co/usb-ks.git
Log | Files | Refs | README | LICENSE

README.md (1507B)


      1 # usb-ks
      2 
      3 usb-ks is a USB killswitch program, inspired by [https://github.com/BusKill/buskill-app](https://github.com/BusKill/buskill-app), but simplified and written in Go instead of Python. Additionally, usb-ks executes the specified command on all USB device changes, not just disconnects. When governments seize devices they often use USB devices to exfiltrate data and to ensure systems with FDE don't shutdown. It is thusly evident shutdown behaviors should be initiated on connection and disconnection.
      4 
      5 # installation
      6 
      7 `go install github.com/andrewlaack/usb-ks@e41c1fdaf9126800589957a3bdd568fa96086ce5`
      8 
      9 Then optionally:
     10 
     11 `sudo install ~/go/bin/usb-ks /usr/local/bin/`
     12 
     13 NOTE: ensure your go installation directory (default: ~/go/bin) is on your path as this is the default installation location. If you run the optional command, ensure the first argument to install contains the correct go installation path.
     14 
     15 ## dependencies
     16 
     17 - [go](https://go.dev/dl/)
     18     - for building
     19 - [libudev](https://www.freedesktop.org/software/systemd/man/latest/libudev.html)
     20     - for listening to usb device changes
     21 - a shell
     22     - /bin/sh to execute the specified command
     23 
     24 # usage
     25 
     26 Basic invocation, executing xscreensaver on USB device change:
     27 
     28 ```usb-ks```
     29 
     30 NOTE: Since xscreensaver does not shutdown your system (i.e. doesn't engage FDE protections), it may not be desirable for certain threat models.
     31 
     32 For better protection, I recommend using `poweroff`:
     33 
     34 ```usb-ks poweroff```
     35 
     36 See options:
     37 
     38 ```usb-ks --help```