Re: [qubes-users] mooltipass hardware password manager

2019-01-10 Thread Benjamin Richter
Hi,

thanks for you help!

I dug around a little more, but could not find anything wrong within qubes, the 
device seems to be recognized as a keyboard, everything looks fine.

So I went to test the device itself, and it turns out it simply does not type 
out the password.

So I'll ask the mooltipass people for advice instead.

Thanks again, it was very helpful :)

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/871b926d-a645-44d5-8c3b-0c93ff115336%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] mooltipass hardware password manager

2019-01-09 Thread Marek Marczykowski-Górecki
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On Wed, Jan 09, 2019 at 03:26:02PM -0800, Benjamin Richter wrote:
> Hi,
> 
> I have a Mooltipass Mini Hardware Password manager 
> (https://www.themooltipass.com/), which identifies as a USB keyboard in order 
> to input passwords.
> 
> I can attach the USB device to a VM to connect to the mooltipass mini and put 
> in credentials, but I cannot get it to input the password, neither 

> by attaching it to a VM directly, 

This may be about permissions to /dev/input/event* device files in the
target qube. See X server log about it. If that's the case, you need an
udev rule to allow it, like this:

/etc/udev/rules.d/90-allow-input-for-qubes.rules:
KERNEL=="event*", GROUP="qubes", MODE="0660"

> nor by leaving it in the USB qube via the input proxy.
> The key events just don't seem to turn up anywhere.

I'm not sure how this device really works, but with input proxy it may
be missing some feedback channel (browser -> device), for example to
choose the right credentials.

> I'm running latest stable R4. My USB keyboard, touchpad and touchscreen work, 
> also I don't have any problems with other USB devices. How can I debug this 
> further?
> 
> journalctl output while connecting:
> 
> Jan 10 00:21:07 sys-usb kernel: usb 2-1: new full-speed USB device number 10 
> using xhci_hcd
> Jan 10 00:21:07 sys-usb kernel: usb 2-1: New USB device found, idVendor=16d0, 
> idProduct=09a0
> Jan 10 00:21:07 sys-usb kernel: usb 2-1: New USB device strings: Mfr=1, 
> Product=2, SerialNumber=0
> Jan 10 00:21:07 sys-usb kernel: usb 2-1: Product: Mooltipass
> Jan 10 00:21:07 sys-usb kernel: usb 2-1: Manufacturer: SE
> Jan 10 00:21:07 sys-usb kernel: hid-generic 0003:16D0:09A0.001B: 
> hiddev96,hidraw1: USB HID v1.11 Device [SE Mooltipass] on 
> usb-:00:07.0-1/input0
> Jan 10 00:21:07 sys-usb kernel: input: SE Mooltipass as 
> /devices/pci:00/:00:07.0/usb2/2-1/2-1:1.1/0003:16D0:09A0.001C/input/input36
> Jan 10 00:21:07 sys-usb kernel: hid-generic 0003:16D0:09A0.001C: 
> input,hidraw2: USB HID v1.11 Keyboard [SE Mooltipass] on 
> usb-:00:07.0-1/input1
> Jan 10 00:21:07 sys-usb mtp-probe[30635]: checking bus 2, device 10: 
> "/sys/devices/pci:00/:00:07.0/usb2/2-1"
> Jan 10 00:21:07 sys-usb mtp-probe[30635]: bus: 2, device: 10 was not an MTP 
> device
> Jan 10 00:21:07 sys-usb kernel: audit: type=1130 audit(1547076067.807:236): 
> pid=1 uid=0 auid=4294967295 ses=4294967295 
> msg='unit=qubes-input-sender-keyboard@event6 comm="systemd" 
> exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
> Jan 10 00:21:07 sys-usb audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 
> ses=4294967295 msg='unit=qubes-input-sender-keyboard@event6 comm="systemd" 
> exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
> Jan 10 00:21:07 sys-usb systemd[1]: Started Qubes input proxy sender 
> (keyboard).

This looks promising. What do you have in
/etc/qubes-rpc/policy/qubes.InputKeyboard in dom0? As your USB keyboard
works, you probably have it configured correctly already, but see 
https://www.qubes-os.org/doc/usb/#how-to-use-a-usb-keyboard

You can also see qrexec connections log in dom0 with
`journalctl SYSLOG_IDENTIFIER=qrexec` (or simply grep for qrexec, if you
hate to type that long field name...)

Checking if X server in dom0 sees the device (xinput tool) also may be
helpful. evtest in dom0 may also give some hints.

> Jan 10 00:21:07 sys-usb systemd-logind[436]: Watching system buttons on 
> /dev/input/event6 (SE Mooltipass)

(...)

> Testing ... (interrupt to exit)
> ***
>   This device is grabbed by another process.

This is most likely the input proxy. Which means it's running.

- -- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEEhrpukzGPukRmQqkK24/THMrX1ywFAlw2liwACgkQ24/THMrX
1yyIcAf/R5t1JsBeH4V9bOJtevq7qbjwhCW17jWgNyZuAX9KR5EmdzIgXg5w8kwI
XvY3M+rfy5IPEyk8le4IifX4c8OhbfXAkETqAibUxX+qrtRZHTBoIsgsCDWpKj90
T+CYEsGx+I4ilb0ygBzn4v7zDZ/VTiDixJalIY1oQ4+xaDHS/BrFEcZ+EeG9eqeh
vncKoRmPrdA1OR5xvwfG7NBm2pUJHumPP0yu072yKh/a59aAe3ZRxgxZTwbWkbgo
LinsbjG6G57JTjnS9oNAVrMjdTaB3xWG3cMA2343nIZCg8bEEjeiw+qjxo25jyLl
z+uTpLuBbXeUNiKaqLjWhc2ta1Vq0w==
=94WL
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/20190110004740.GD7536%40mail-itl.
For more options, visit https://groups.google.com/d/optout.


[qubes-users] mooltipass hardware password manager

2019-01-09 Thread Benjamin Richter
Hi,

I have a Mooltipass Mini Hardware Password manager 
(https://www.themooltipass.com/), which identifies as a USB keyboard in order 
to input passwords.

I can attach the USB device to a VM to connect to the mooltipass mini and put 
in credentials, but I cannot get it to input the password, neither by attaching 
it to a VM directly, nor by leaving it in the USB qube via the input proxy.
The key events just don't seem to turn up anywhere.

I'm running latest stable R4. My USB keyboard, touchpad and touchscreen work, 
also I don't have any problems with other USB devices. How can I debug this 
further?

journalctl output while connecting:

Jan 10 00:21:07 sys-usb kernel: usb 2-1: new full-speed USB device number 10 
using xhci_hcd
Jan 10 00:21:07 sys-usb kernel: usb 2-1: New USB device found, idVendor=16d0, 
idProduct=09a0
Jan 10 00:21:07 sys-usb kernel: usb 2-1: New USB device strings: Mfr=1, 
Product=2, SerialNumber=0
Jan 10 00:21:07 sys-usb kernel: usb 2-1: Product: Mooltipass
Jan 10 00:21:07 sys-usb kernel: usb 2-1: Manufacturer: SE
Jan 10 00:21:07 sys-usb kernel: hid-generic 0003:16D0:09A0.001B: 
hiddev96,hidraw1: USB HID v1.11 Device [SE Mooltipass] on 
usb-:00:07.0-1/input0
Jan 10 00:21:07 sys-usb kernel: input: SE Mooltipass as 
/devices/pci:00/:00:07.0/usb2/2-1/2-1:1.1/0003:16D0:09A0.001C/input/input36
Jan 10 00:21:07 sys-usb kernel: hid-generic 0003:16D0:09A0.001C: input,hidraw2: 
USB HID v1.11 Keyboard [SE Mooltipass] on usb-:00:07.0-1/input1
Jan 10 00:21:07 sys-usb mtp-probe[30635]: checking bus 2, device 10: 
"/sys/devices/pci:00/:00:07.0/usb2/2-1"
Jan 10 00:21:07 sys-usb mtp-probe[30635]: bus: 2, device: 10 was not an MTP 
device
Jan 10 00:21:07 sys-usb kernel: audit: type=1130 audit(1547076067.807:236): 
pid=1 uid=0 auid=4294967295 ses=4294967295 
msg='unit=qubes-input-sender-keyboard@event6 comm="systemd" 
exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jan 10 00:21:07 sys-usb audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 
ses=4294967295 msg='unit=qubes-input-sender-keyboard@event6 comm="systemd" 
exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jan 10 00:21:07 sys-usb systemd[1]: Started Qubes input proxy sender (keyboard).
Jan 10 00:21:07 sys-usb systemd-logind[436]: Watching system buttons on 
/dev/input/event6 (SE Mooltipass)



lsusb output of the device:

Bus 002 Device 010: ID 16d0:09a0 MCS 
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   2.00
  bDeviceClass0 
  bDeviceSubClass 0 
  bDeviceProtocol 0 
  bMaxPacketSize032
  idVendor   0x16d0 MCS
  idProduct  0x09a0 
  bcdDevice1.00
  iManufacturer   1 SE
  iProduct2 Mooltipass
  iSerial 0 
  bNumConfigurations  1
  Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength   66
bNumInterfaces  2
bConfigurationValue 1
iConfiguration  0 
bmAttributes 0x80
  (Bus Powered)
MaxPower  100mA
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber0
  bAlternateSetting   0
  bNumEndpoints   2
  bInterfaceClass 3 Human Interface Device
  bInterfaceSubClass  0 
  bInterfaceProtocol  0 
  iInterface  0 
HID Device Descriptor:
  bLength 9
  bDescriptorType33
  bcdHID   1.11
  bCountryCode0 Not supported
  bNumDescriptors 1
  bDescriptorType34 Report
  wDescriptorLength  28
 Report Descriptors: 
   ** UNAVAILABLE **
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02  EP 2 OUT
bmAttributes3
  Transfer TypeInterrupt
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0040  1x 64 bytes
bInterval   1
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81  EP 1 IN
bmAttributes3
  Transfer TypeInterrupt
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0040  1x 64 bytes
bInterval   1
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber1
  bAlternateSetting   0
  bNumEndpoints   1
  bInterfaceClass 3 Human Interface Device
  bInterfaceSubClass  1 Boot Interface Subclass
  bInterfaceProtocol  1 Keyboard
  iInterface  0