hephaest0s / usbkill

« usbkill » is an anti-forensic kill-switch that waits for a change on your USB ports and then immediately shuts down your computer.
4.38k stars 507 forks source link

Error on executing usbkill.py on Qubes. #98

Open Lafachief opened 4 years ago

Lafachief commented 4 years ago

Traceback (most recent call last): File "usbkill.py", line 466, in go() File "usbkill.py", line 463, in go loop(settings) File "usbkill.py", line 320, in loop start_devices = lsusb() File "usbkill.py", line 228, in lsusb return DeviceCountSet(DEVICE_RE[0].findall(subprocess.check_output("lsusb", shell=True).decode('utf-8').strip())) File "/usr/lib/python2.7/subprocess.py", line 223, in check_output raise CalledProcessError(retcode, cmd, output=output) subprocess.CalledProcessError: Command 'lsusb' returned non-zero exit status 1

following error is displayed.

adamthiede commented 3 years ago

I had this same problem, since these two projects seem like a great pair. The problem is Qubes' dom0 has no USB devices attached in a default set up - it all goes through the 'sys-usb' and there's no way to pass USB to dom0 (I think that's a security concern). One could implement a daemon in dom0 to watch a file or device in sys-usb. Otherwise, running this in one of qubes' VMs just shuts down the VM. I might work on this if you're still interested.

anonaddict commented 2 years ago

Did anyone get it to work?

adamthiede commented 2 years ago

I've yet to try out the latest Qubes release but thanks for reminding me. It might work better since I believe it's based on a much newer OS.

anonaddict commented 2 years ago

I don't think the OS is the issue. The issue is very likely the way Qubes is built around virtualization and compartmentalization https://forum.qubes-os.org/t/yubikey-usbkill/10053