greatscottgadgets / cynthion

USB test instrument
https://greatscottgadgets.com/cynthion/
BSD 3-Clause "New" or "Revised" License
63 stars 16 forks source link

proxy - usb 3.0 drive doesn't mount #134

Open idealdelay opened 1 month ago

idealdelay commented 1 month ago

im running the facedancer simplest usb proxy via a cynthion to proxy a usb storage stick. it seems to be running / logging but the target host computer is not mounting the device (I waited 1.5 hours), it is however present in lsusb (on the traget host). the stick mounts as expected when directly connected to the target host. (im running the newest version of everything)

dmesg shows

[4395713.714168] usb 1-9: new high-speed USB device number 67 using xhci_hcd
[4395713.906454] usb 1-9: New USB device found, idVendor=0781, idProduct=5575, bcdDevice= 1.26
[4395713.906467] usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[4395713.906473] usb 1-9: Product: Cruzer Glide
[4395713.906477] usb 1-9: Manufacturer: SanDisk
[4395713.906480] usb 1-9: SerialNumber: 20043513630585500FD0
[4395713.915753] usb-storage 1-9:1.0: USB Mass Storage device detected
[4395713.916233] scsi host9: usb-storage 1-9:1.0
[4395735.694329] usb 1-9: reset high-speed USB device number 67 using xhci_hcd

python3 proxy.py

INFO    | greatdancer    | Skipping GreatFET-based devices, as the greatfet python module isn't installed.
INFO    | moondancer     | Using the Moondancer backend.
INFO    | moondancer     | Connected HIGH speed device 'facedancer.proxy.USBProxyDevice' to target host.

INFO    | device         | Host issued a bus reset; resetting our connection.
INFO    | standard       | -- Patched device descriptor. --
INFO    | logging        | [11:27:50] USBControlRequest(direction=1, type=0, recipient=0, number=6, value=256, index=0, length=64, data=bytearray(b''), device=USBProxyDevice(name='generic device', device_class=0, device_subclass=0, protocol_revision_number=0, max_packet_size_ep0=64, vendor_id=24843, product_id=18003, manufacturer_string='Facedancer', product_string='Generic USB Device', serial_number_string='S/N 3420E', supported_languages=(<LanguageIDs.ENGLISH_US: 1033>,), device_revision=0, usb_spec_version=2, device_speed=None, descriptors={<DescriptorTypes.DEVICE: 1>: <function USBBaseDevice.__post_init__.<locals>.<lambda> at 0x7fca7d3ebb50>, <DescriptorTypes.CONFIGURATION: 2>: <bound method USBBaseDevice.get_configuration_descriptor of ...>, <DescriptorTypes.STRING: 3>: <bound method USBBaseDevice.get_string_descriptor of ...>}, configurations={}, backend=<facedancer.backends.moondancer.MoondancerApp object at 0x7fca7c536170>))
INFO    | logging        | [11:27:50] <: b'\x12\x01\x00\x02\x00\x00\x00@\x81\x07uU&\x01\x01\x02\x03\x01'
INFO    | device         | Host issued a bus reset; resetting our connection.
INFO    | standard       | -- Patched device descriptor. --
INFO    | logging        | [11:27:50] USBControlRequest(direction=1, type=0, recipient=0, number=6, value=256, index=0, length=18, data=bytearray(b''), device=USBProxyDevice(name='generic device', device_class=0, device_subclass=0, protocol_revision_number=0, max_packet_size_ep0=64, vendor_id=24843, product_id=18003, manufacturer_string='Facedancer', product_string='Generic USB Device', serial_number_string='S/N 3420E', supported_languages=(<LanguageIDs.ENGLISH_US: 1033>,), device_revision=0, usb_spec_version=2, device_speed=None, descriptors={<DescriptorTypes.DEVICE: 1>: <function USBBaseDevice.__post_init__.<locals>.<lambda> at 0x7fca7d3ebb50>, <DescriptorTypes.CONFIGURATION: 2>: <bound method USBBaseDevice.get_configuration_descriptor of ...>, <DescriptorTypes.STRING: 3>: <bound method USBBaseDevice.get_string_descriptor of ...>}, configurations={}, backend=<facedancer.backends.moondancer.MoondancerApp object at 0x7fca7c536170>))
INFO    | logging        | [11:27:50] <: b'\x12\x01\x00\x02\x00\x00\x00@\x81\x07uU&\x01\x01\x02\x03\x01'
INFO    | logging        | [11:27:50] USBControlRequest(direction=1, type=0, recipient=0, number=6, value=512, index=0, length=9, data=bytearray(b''), device=USBProxyDevice(name='generic device', device_class=0, device_subclass=0, protocol_revision_number=0, max_packet_size_ep0=64, vendor_id=24843, product_id=18003, manufacturer_string='Facedancer', product_string='Generic USB Device', serial_number_string='S/N 3420E', supported_languages=(<LanguageIDs.ENGLISH_US: 1033>,), device_revision=0, usb_spec_version=2, device_speed=None, descriptors={<DescriptorTypes.DEVICE: 1>: <function USBBaseDevice.__post_init__.<locals>.<lambda> at 0x7fca7d3ebb50>, <DescriptorTypes.CONFIGURATION: 2>: <bound method USBBaseDevice.get_configuration_descriptor of ...>, <DescriptorTypes.STRING: 3>: <bound method USBBaseDevice.get_string_descriptor of ...>}, configurations={}, backend=<facedancer.backends.moondancer.MoondancerApp object at 0x7fca7c536170>))
INFO    | logging        | [11:27:50] <: b'\t\x02 \x00\x01\x01\x00\x80d'
INFO    | standard       | -- Storing configuration USBConfiguration(number=1, configuration_string=0, max_power=100, self_powered=0, supports_remote_wakeup=0, parent=None, interfaces={0: USBInterface(name=None, number=0, alternate=0, class_number=8, subclass_number=6, protocol_number=80, interface_string=0, descriptors={<USBDescriptorTypeNumber.INTERFACE: 4>: <bound method USBInterface.get_descriptor of ...>}, class_descriptor=None, endpoints={129: USBEndpoint(number=1, direction=1, transfer_type=2, synchronization_type=0, usage_type=0, max_packet_size=512, interval=0, parent=...), 2: USBEndpoint(number=2, direction=0, transfer_type=2, synchronization_type=0, usage_type=0, max_packet_size=512, interval=1, parent=...)}, parent=None)}) --
INFO    | logging        | [11:27:50] USBControlRequest(direction=1, type=0, recipient=0, number=6, value=512, index=0, length=32, data=bytearray(b''), device=USBProxyDevice(name='generic device', device_class=0, device_subclass=0, protocol_revision_number=0, max_packet_size_ep0=64, vendor_id=24843, product_id=18003, manufacturer_string='Facedancer', product_string='Generic USB Device', serial_number_string='S/N 3420E', supported_languages=(<LanguageIDs.ENGLISH_US: 1033>,), device_revision=0, usb_spec_version=2, device_speed=None, descriptors={<DescriptorTypes.DEVICE: 1>: <function USBBaseDevice.__post_init__.<locals>.<lambda> at 0x7fca7d3ebb50>, <DescriptorTypes.CONFIGURATION: 2>: <bound method USBBaseDevice.get_configuration_descriptor of ...>, <DescriptorTypes.STRING: 3>: <bound method USBBaseDevice.get_string_descriptor of ...>}, configurations={}, backend=<facedancer.backends.moondancer.MoondancerApp object at 0x7fca7c536170>))
INFO    | logging        | [11:27:50] <: b'\t\x02 \x00\x01\x01\x00\x80d\t\x04\x00\x00\x02\x08\x06P\x00\x07\x05\x81\x02\x00\x02\x00\x07\x05\x02\x02\x00\x02\x01'
INFO    | logging        | [11:27:50] USBControlRequest(direction=1, type=0, recipient=0, number=6, value=768, index=0, length=255, data=bytearray(b''), device=USBProxyDevice(name='generic device', device_class=0, device_subclass=0, protocol_revision_number=0, max_packet_size_ep0=64, vendor_id=24843, product_id=18003, manufacturer_string='Facedancer', product_string='Generic USB Device', serial_number_string='S/N 3420E', supported_languages=(<LanguageIDs.ENGLISH_US: 1033>,), device_revision=0, usb_spec_version=2, device_speed=None, descriptors={<DescriptorTypes.DEVICE: 1>: <function USBBaseDevice.__post_init__.<locals>.<lambda> at 0x7fca7d3ebb50>, <DescriptorTypes.CONFIGURATION: 2>: <bound method USBBaseDevice.get_configuration_descriptor of ...>, <DescriptorTypes.STRING: 3>: <bound method USBBaseDevice.get_string_descriptor of ...>}, configurations={}, backend=<facedancer.backends.moondancer.MoondancerApp object at 0x7fca7c536170>))
INFO    | logging        | [11:27:50] <: ̄Љ
INFO    | logging        | [11:27:50] USBControlRequest(direction=1, type=0, recipient=0, number=6, value=770, index=1033, length=255, data=bytearray(b''), device=USBProxyDevice(name='generic device', device_class=0, device_subclass=0, protocol_revision_number=0, max_packet_size_ep0=64, vendor_id=24843, product_id=18003, manufacturer_string='Facedancer', product_string='Generic USB Device', serial_number_string='S/N 3420E', supported_languages=(<LanguageIDs.ENGLISH_US: 1033>,), device_revision=0, usb_spec_version=2, device_speed=None, descriptors={<DescriptorTypes.DEVICE: 1>: <function USBBaseDevice.__post_init__.<locals>.<lambda> at 0x7fca7d3ebb50>, <DescriptorTypes.CONFIGURATION: 2>: <bound method USBBaseDevice.get_configuration_descriptor of ...>, <DescriptorTypes.STRING: 3>: <bound method USBBaseDevice.get_string_descriptor of ...>}, configurations={}, backend=<facedancer.backends.moondancer.MoondancerApp object at 0x7fca7c536170>))
INFO    | logging        | [11:27:50] <: ̚Cruzer Glide
INFO    | logging        | [11:27:50] USBControlRequest(direction=1, type=0, recipient=0, number=6, value=769, index=1033, length=255, data=bytearray(b''), device=USBProxyDevice(name='generic device', device_class=0, device_subclass=0, protocol_revision_number=0, max_packet_size_ep0=64, vendor_id=24843, product_id=18003, manufacturer_string='Facedancer', product_string='Generic USB Device', serial_number_string='S/N 3420E', supported_languages=(<LanguageIDs.ENGLISH_US: 1033>,), device_revision=0, usb_spec_version=2, device_speed=None, descriptors={<DescriptorTypes.DEVICE: 1>: <function USBBaseDevice.__post_init__.<locals>.<lambda> at 0x7fca7d3ebb50>, <DescriptorTypes.CONFIGURATION: 2>: <bound method USBBaseDevice.get_configuration_descriptor of ...>, <DescriptorTypes.STRING: 3>: <bound method USBBaseDevice.get_string_descriptor of ...>}, configurations={}, backend=<facedancer.backends.moondancer.MoondancerApp object at 0x7fca7c536170>))
INFO    | logging        | [11:27:50] <: ̐SanDisk
INFO    | logging        | [11:27:50] USBControlRequest(direction=1, type=0, recipient=0, number=6, value=771, index=1033, length=255, data=bytearray(b''), device=USBProxyDevice(name='generic device', device_class=0, device_subclass=0, protocol_revision_number=0, max_packet_size_ep0=64, vendor_id=24843, product_id=18003, manufacturer_string='Facedancer', product_string='Generic USB Device', serial_number_string='S/N 3420E', supported_languages=(<LanguageIDs.ENGLISH_US: 1033>,), device_revision=0, usb_spec_version=2, device_speed=None, descriptors={<DescriptorTypes.DEVICE: 1>: <function USBBaseDevice.__post_init__.<locals>.<lambda> at 0x7fca7d3ebb50>, <DescriptorTypes.CONFIGURATION: 2>: <bound method USBBaseDevice.get_configuration_descriptor of ...>, <DescriptorTypes.STRING: 3>: <bound method USBBaseDevice.get_string_descriptor of ...>}, configurations={}, backend=<facedancer.backends.moondancer.MoondancerApp object at 0x7fca7c536170>))
INFO    | logging        | [11:27:50] <: ̪20043513630585500FD0
INFO    | standard       | -- Applying configuration USBConfiguration(number=1, configuration_string=0, max_power=100, self_powered=0, supports_remote_wakeup=0, parent=None, interfaces={0: USBInterface(name=None, number=0, alternate=0, class_number=8, subclass_number=6, protocol_number=80, interface_string=0, descriptors={<USBDescriptorTypeNumber.INTERFACE: 4>: <bound method USBInterface.get_descriptor of ...>}, class_descriptor=None, endpoints={129: USBEndpoint(number=1, direction=1, transfer_type=2, synchronization_type=0, usage_type=0, max_packet_size=512, interval=0, parent=...), 2: USBEndpoint(number=2, direction=0, transfer_type=2, synchronization_type=0, usage_type=0, max_packet_size=512, interval=1, parent=...)}, parent=None)}) --
INFO    | moondancer     | Target host configuration complete.
INFO    | logging        | [11:27:50] USBControlRequest(direction=0, type=0, recipient=0, number=9, value=1, index=0, length=0, data=bytearray(b''), device=USBProxyDevice(name='generic device', device_class=0, device_subclass=0, protocol_revision_number=0, max_packet_size_ep0=64, vendor_id=24843, product_id=18003, manufacturer_string='Facedancer', product_string='Generic USB Device', serial_number_string='S/N 3420E', supported_languages=(<LanguageIDs.ENGLISH_US: 1033>,), device_revision=0, usb_spec_version=2, device_speed=None, descriptors={<DescriptorTypes.DEVICE: 1>: <function USBBaseDevice.__post_init__.<locals>.<lambda> at 0x7fca7d3ebb50>, <DescriptorTypes.CONFIGURATION: 2>: <bound method USBBaseDevice.get_configuration_descriptor of ...>, <DescriptorTypes.STRING: 3>: <bound method USBBaseDevice.get_string_descriptor of ...>}, configurations={}, backend=<facedancer.backends.moondancer.MoondancerApp object at 0x7fca7c536170>))
INFO    | logging        | [11:27:51] USBControlRequest(direction=1, type=1, recipient=1, number=254, value=0, index=0, length=1, data=bytearray(b''), device=USBProxyDevice(name='generic device', device_class=0, device_subclass=0, protocol_revision_number=0, max_packet_size_ep0=64, vendor_id=24843, product_id=18003, manufacturer_string='Facedancer', product_string='Generic USB Device', serial_number_string='S/N 3420E', supported_languages=(<LanguageIDs.ENGLISH_US: 1033>,), device_revision=0, usb_spec_version=2, device_speed=None, descriptors={<DescriptorTypes.DEVICE: 1>: <function USBBaseDevice.__post_init__.<locals>.<lambda> at 0x7fca7d3ebb50>, <DescriptorTypes.CONFIGURATION: 2>: <bound method USBBaseDevice.get_configuration_descriptor of ...>, <DescriptorTypes.STRING: 3>: <bound method USBBaseDevice.get_string_descriptor of ...>}, configurations={}, backend=<facedancer.backends.moondancer.MoondancerApp object at 0x7fca7c536170>))
INFO    | logging        | [11:27:51] <: b'\x00'
INFO    | device         | Host issued a bus reset; resetting our connection.
INFO    | standard       | -- Patched device descriptor. --
INFO    | logging        | [11:28:12] USBControlRequest(direction=1, type=0, recipient=0, number=6, value=256, index=0, length=64, data=bytearray(b''), device=USBProxyDevice(name='generic device', device_class=0, device_subclass=0, protocol_revision_number=0, max_packet_size_ep0=64, vendor_id=24843, product_id=18003, manufacturer_string='Facedancer', product_string='Generic USB Device', serial_number_string='S/N 3420E', supported_languages=(<LanguageIDs.ENGLISH_US: 1033>,), device_revision=0, usb_spec_version=2, device_speed=None, descriptors={<DescriptorTypes.DEVICE: 1>: <function USBBaseDevice.__post_init__.<locals>.<lambda> at 0x7fca7d3ebb50>, <DescriptorTypes.CONFIGURATION: 2>: <bound method USBBaseDevice.get_configuration_descriptor of ...>, <DescriptorTypes.STRING: 3>: <bound method USBBaseDevice.get_string_descriptor of ...>}, configurations={}, backend=<facedancer.backends.moondancer.MoondancerApp object at 0x7fca7c536170>))
INFO    | logging        | [11:28:12] <: b'\x12\x01\x00\x02\x00\x00\x00@\x81\x07uU&\x01\x01\x02\x03\x01'
INFO    | device         | Host issued a bus reset; resetting our connection.
INFO    | standard       | -- Patched device descriptor. --
INFO    | logging        | [11:28:12] USBControlRequest(direction=1, type=0, recipient=0, number=6, value=256, index=0, length=18, data=bytearray(b''), device=USBProxyDevice(name='generic device', device_class=0, device_subclass=0, protocol_revision_number=0, max_packet_size_ep0=64, vendor_id=24843, product_id=18003, manufacturer_string='Facedancer', product_string='Generic USB Device', serial_number_string='S/N 3420E', supported_languages=(<LanguageIDs.ENGLISH_US: 1033>,), device_revision=0, usb_spec_version=2, device_speed=None, descriptors={<DescriptorTypes.DEVICE: 1>: <function USBBaseDevice.__post_init__.<locals>.<lambda> at 0x7fca7d3ebb50>, <DescriptorTypes.CONFIGURATION: 2>: <bound method USBBaseDevice.get_configuration_descriptor of ...>, <DescriptorTypes.STRING: 3>: <bound method USBBaseDevice.get_string_descriptor of ...>}, configurations={}, backend=<facedancer.backends.moondancer.MoondancerApp object at 0x7fca7c536170>))
INFO    | logging        | [11:28:12] <: b'\x12\x01\x00\x02\x00\x00\x00@\x81\x07uU&\x01\x01\x02\x03\x01'
INFO    | standard       | -- Storing configuration USBConfiguration(number=1, configuration_string=0, max_power=100, self_powered=0, supports_remote_wakeup=0, parent=None, interfaces={0: USBInterface(name=None, number=0, alternate=0, class_number=8, subclass_number=6, protocol_number=80, interface_string=0, descriptors={<USBDescriptorTypeNumber.INTERFACE: 4>: <bound method USBInterface.get_descriptor of ...>}, class_descriptor=None, endpoints={129: USBEndpoint(number=1, direction=1, transfer_type=2, synchronization_type=0, usage_type=0, max_packet_size=512, interval=0, parent=...), 2: USBEndpoint(number=2, direction=0, transfer_type=2, synchronization_type=0, usage_type=0, max_packet_size=512, interval=1, parent=...)}, parent=None)}) --
INFO    | logging        | [11:28:12] USBControlRequest(direction=1, type=0, recipient=0, number=6, value=512, index=0, length=32, data=bytearray(b''), device=USBProxyDevice(name='generic device', device_class=0, device_subclass=0, protocol_revision_number=0, max_packet_size_ep0=64, vendor_id=24843, product_id=18003, manufacturer_string='Facedancer', product_string='Generic USB Device', serial_number_string='S/N 3420E', supported_languages=(<LanguageIDs.ENGLISH_US: 1033>,), device_revision=0, usb_spec_version=2, device_speed=None, descriptors={<DescriptorTypes.DEVICE: 1>: <function USBBaseDevice.__post_init__.<locals>.<lambda> at 0x7fca7d3ebb50>, <DescriptorTypes.CONFIGURATION: 2>: <bound method USBBaseDevice.get_configuration_descriptor of ...>, <DescriptorTypes.STRING: 3>: <bound method USBBaseDevice.get_string_descriptor of ...>}, configurations={}, backend=<facedancer.backends.moondancer.MoondancerApp object at 0x7fca7c536170>))
INFO    | logging        | [11:28:12] <: b'\t\x02 \x00\x01\x01\x00\x80d\t\x04\x00\x00\x02\x08\x06P\x00\x07\x05\x81\x02\x00\x02\x00\x07\x05\x02\x02\x00\x02\x01'
INFO    | logging        | [11:28:12] USBControlRequest(direction=1, type=0, recipient=0, number=6, value=771, index=1033, length=255, data=bytearray(b''), device=USBProxyDevice(name='generic device', device_class=0, device_subclass=0, protocol_revision_number=0, max_packet_size_ep0=64, vendor_id=24843, product_id=18003, manufacturer_string='Facedancer', product_string='Generic USB Device', serial_number_string='S/N 3420E', supported_languages=(<LanguageIDs.ENGLISH_US: 1033>,), device_revision=0, usb_spec_version=2, device_speed=None, descriptors={<DescriptorTypes.DEVICE: 1>: <function USBBaseDevice.__post_init__.<locals>.<lambda> at 0x7fca7d3ebb50>, <DescriptorTypes.CONFIGURATION: 2>: <bound method USBBaseDevice.get_configuration_descriptor of ...>, <DescriptorTypes.STRING: 3>: <bound method USBBaseDevice.get_string_descriptor of ...>}, configurations={}, backend=<facedancer.backends.moondancer.MoondancerApp object at 0x7fca7c536170>))
INFO    | logging        | [11:28:12] <: ̪20043513630585500FD0
INFO    | standard       | -- Applying configuration USBConfiguration(number=1, configuration_string=0, max_power=100, self_powered=0, supports_remote_wakeup=0, parent=None, interfaces={0: USBInterface(name=None, number=0, alternate=0, class_number=8, subclass_number=6, protocol_number=80, interface_string=0, descriptors={<USBDescriptorTypeNumber.INTERFACE: 4>: <bound method USBInterface.get_descriptor of ...>}, class_descriptor=None, endpoints={129: USBEndpoint(number=1, direction=1, transfer_type=2, synchronization_type=0, usage_type=0, max_packet_size=512, interval=0, parent=...), 2: USBEndpoint(number=2, direction=0, transfer_type=2, synchronization_type=0, usage_type=0, max_packet_size=512, interval=1, parent=...)}, parent=None)}) --
INFO    | moondancer     | Target host configuration complete.
INFO    | logging        | [11:28:12] USBControlRequest(direction=0, type=0, recipient=0, number=9, value=1, index=0, length=0, data=bytearray(b''), device=USBProxyDevice(name='generic device', device_class=0, device_subclass=0, protocol_revision_number=0, max_packet_size_ep0=64, vendor_id=24843, product_id=18003, manufacturer_string='Facedancer', product_string='Generic USB Device', serial_number_string='S/N 3420E', supported_languages=(<LanguageIDs.ENGLISH_US: 1033>,), device_revision=0, usb_spec_version=2, device_speed=None, descriptors={<DescriptorTypes.DEVICE: 1>: <function USBBaseDevice.__post_init__.<locals>.<lambda> at 0x7fca7d3ebb50>, <DescriptorTypes.CONFIGURATION: 2>: <bound method USBBaseDevice.get_configuration_descriptor of ...>, <DescriptorTypes.STRING: 3>: <bound method USBBaseDevice.get_string_descriptor of ...>}, configurations={}, backend=<facedancer.backends.moondancer.MoondancerApp object at 0x7fca7c536170>))
antoinevg commented 1 month ago

SanDisk Ultra 16GB USB 3.0:

[35343.586852] scsi host6: usb-storage 3-3:1.0
[35344.621308] scsi 6:0:0:0: Direct-Access     SanDisk  Ultra USB 3.0    1.00 PQ: 0 ANSI: 6
[35344.621522] sd 6:0:0:0: Attached scsi generic sg2 type 0
[35344.636509] sd 6:0:0:0: [sdb] 30031872 512-byte logical blocks: (15.4 GB/14.3 GiB)
[35344.637164] sd 6:0:0:0: [sdb] Write Protect is off
[35344.637168] sd 6:0:0:0: [sdb] Mode Sense: 43 00 00 00
[35344.637484] sd 6:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[35344.641892]  sdb: sdb1
[35344.642036] sd 6:0:0:0: [sdb] Attached SCSI removable disk
antoinevg commented 1 month ago

Also: Sandisk 3.2Gen1 BM2209005782w sdddc3

dominikfehr commented 3 weeks ago

can confirm same behavior to Windows 11 target host (visible in device manager, no mounting)

antoinevg commented 6 days ago

Can you please try to instead plug the device to be proxied into a High-speed USB 2.0 hub that's plugged into the target host?