nesto-software / USBProxy

A USB proxy for rpi 4b, based on libUSB & gadgetFS - maintained by Nesto
GNU General Public License v2.0
47 stars 13 forks source link

usb mass storage #37

Open J1n-CH1na opened 2 years ago

J1n-CH1na commented 2 years ago

Hello, I'm using the USBProxy in the raspberry pi 4b.

I can stream keyboard and mouse data, but usb mass storage device is wrong ~ Please save the children :)

root@raspberrypi:/home/pi/USBProxy/src/build/tools# ./usb-mitm -v 058f -p 6387 -m -l Loading plugins from /usr/local/lib/USBProxy/ vendorId = 058f productId = 6387 DeviceProxy::nice = 50 cleaning up /tmp removing 1 Made directory /tmp/gadget-9154dk for gadget UnblockPassword= Printing Config data Strings: 5 DeviceProxy: DeviceProxy_LibUSB DeviceProxy::nice: 50 HostProxy: HostProxy_GadgetFS productId: 6387 vendorId: 058f Vectors: 1 Plugins: PacketFilter_MassStorage PacketFilter_StreamLog Pointer: 1 PacketFilter_StreamLog::file: 0xb6c1fcf0 into start control relaying |Starting libusbEventLoop thread (763) Device: 12 01 00 02 00 00 00 40 8f 05 87 63 00 01 01 02 03 01 Manufacturer: Generic Product: Mass Storage Serial: A0D883E5 Config(1): 09 02 20 00 01 01 00 80 64 Interface(0): Alt(0): 09 04 00 00 02 08 06 50 00 EP(01): 07 05 01 02 00 02 00 EP(82): 07 05 82 02 00 02 00 HS Qualifier: 0a 06 00 02 00 00 00 40 01 00 Config(1): 09 07 20 00 01 01 00 80 64 Interface(0): *Alt(0): 09 04 00 00 02 08 06 50 00 EP(01): 07 05 01 02 40 00 00 EP(82): 07 05 82 02 40 00 00 Starting injector thread (767) for [Injector]. Injector In FD[1/1]: 12 searching in [/tmp/gadget-9154dk] Starting setup reader thread (768) for EP00. Starting setup writer thread (769) for EP00. ============== Host Connect [80 06 03 03 09 04 ff 00] [80 06 03 03 09 04 12 00]: 12 03 41 00 30 00 44 00 38 00 38 00 33 00 45 00 35 00 [80 06 00 03 00 00 ff 00] [80 06 00 03 00 00 04 00]: 04 03 09 04 [80 06 02 03 09 04 ff 00] [80 06 02 03 09 04 1a 00]: 1a 03 4d 00 61 00 73 00 73 00 20 00 53 00 74 00 6f 00 72 00 61 00 67 0 0 65 00 [80 06 00 03 00 00 02 00] [80 06 00 03 00 00 02 00]: 04 03 [80 06 00 03 00 00 04 00] [80 06 00 03 00 00 04 00]: 04 03 09 04 [80 06 03 03 09 04 02 00] [80 06 03 03 09 04 02 00]: 12 03 [80 06 03 03 09 04 12 00] [80 06 03 03 09 04 12 00]: 12 03 41 00 30 00 44 00 38 00 38 00 33 00 45 00 35 00 [00 09 01 00 00 00 00 00] Opened EP01 Opened EP82 Starting reader thread (771) for EP01. Starting writer thread (772) for EP01. Starting reader thread (773) for EP82. Starting writer thread (774) for EP82. a1 fe 00 00 00 00 01 00

01[31]: 55 53 42 43 10 a0 17 e9 24 00 00 00 80 00 06 12 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 82[36]: 00 80 04 02 1f 00 00 00 47 65 6e 65 72 69 63 20 46 6c 61 73 68 20 44 69 73 6b 20 20 20 20 20 20 38 2e 30 37 82[13]: 55 53 42 53 10 a0 17 e9 00 00 00 00 00 01[31]: 55 53 42 43 a0 19 a3 e5 24 00 00 00 80 00 06 12 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 82[36]: 00 80 04 02 1f 00 00 00 47 65 6e 65 72 69 63 20 46 6c 61 73 68 20 44 69 73 6b 20 20 20 20 20 20 38 2e 30 37 82[13]: 55 53 42 53 a0 19 a3 e5 00 00 00 00 00 01[31]: 55 53 42 43 a0 19 a3 e5 fc 00 00 00 80 00 0a 23 00 00 00 00 00 00 00 fc 00 00 00 00 00 00 00 82[20]: 00 00 00 10 00 f0 00 00 02 00 02 00 00 f0 00 00 00 00 02 00 82[13]: 55 53 42 53 a0 19 a3 e5 00 00 00 00 00 01[31]: 55 53 42 43 a0 19 a3 e5 ff 00 00 00 80 00 06 12 01 80 00 ff 00 00 00 00 00 00 00 00 00 00 00 82[22]: 00 80 00 12 03 41 00 30 00 44 00 38 00 38 00 33 00 45 00 35 00 01 82[13]: 55 53 42 53 a0 19 a3 e5 00 00 00 00 00 [80 06 00 03 00 00 ff 00] [80 06 00 03 00 00 04 00]: 04 03 09 04 [80 06 01 03 09 04 ff 00] 01[31]: 55 53 42 43 50 4a d4 e7 08 00 00 00 80 00 0a 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [80 06 01 03 09 04 10 00]: 10 03 47 00 65 00 6e 00 65 00 72 00 69 00 63 00 [80 06 02 03 09 04 ff 00] [80 06 02 03 09 04 10 00]: 00 00 00 00 00 00 00 00 65 00 72 00 69 00 63 00 82[8]: 00 ef ff ff 00 00 02 00 82[13]: 55 53 42 53 50 4a d4 e7 00 00 00 00 00 01[31]: 55 53 42 43 60 3a 06 e7 c0 00 00 00 80 00 06 1a 00 1c 00 c0 00 00 00 00 00 00 00 00 00 00 00 82[16]: 0f 00 00 00 1c 0a 00 00 00 00 00 00 00 00 00 00 82[13]: 55 53 42 53 60 3a 06 e7 00 00 00 00 00 01[31]: 55 53 42 43 b0 86 a9 e5 c0 00 00 00 80 00 06 1a 00 08 00 c0 00 00 00 00 00 00 00 00 00 00 00 82[24]: 17 00 00 00 08 12 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82[13]: 55 53 42 53 b0 86 a9 e5 00 00 00 00 00 01[31]: 55 53 42 43 10 20 a8 e5 08 00 00 00 80 00 0a 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82[8]: 00 ef ff ff 00 00 02 00 82[13]: 55 53 42 53 10 20 a8 e5 00 00 00 00 00 01[31]: 55 53 42 43 10 20 a8 e5 24 00 00 00 80 00 06 12 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 82[36]: 00 80 04 02 1f 00 00 00 47 65 6e 65 72 69 63 20 46 6c 61 73 68 20 44 69 73 6b 20 20 20 20 20 20 38 2e 30 37 82[13]: 55 53 42 53 10 20 a8 e5 00 00 00 00 00 01[31]: 55 53 42 43 a0 59 79 e6 08 00 00 00 80 00 0a 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82[8]: 00 ef ff ff 00 00 02 00 82[13]: 55 53 42 53 a0 59 79 e6 00 00 00 00 00 01[31]: 55 53 42 43 70 42 3d e5 08 00 00 00 80 00 0a 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82[8]: 00 ef ff ff 00 00 02 00 82[13]: 55 53 42 53 70 42 3d e5 00 00 00 00 00 01[31]: 55 53 42 43 b0 86 a9 e5 08 00 00 00 80 00 0a 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82[8]: 00 ef ff ff 00 00 02 00 82[13]: 55 53 42 53 b0 86 a9 e5 00 00 00 00 00 01[31]: 55 53 42 43 40 5a 7a e7 00 02 00 00 80 00 0a 28 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 82[512]: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 eb d5 d5 46 00 00 80 20 21 00 0c fe ff d2 00 08 00 00 00 f8 ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa 82[13]: 55 53 42 53 40 5a 7a e7 00 00 00 00 00 01[31]: 55 53 42 43 10 a0 d3 e7 08 00 00 00 80 00 0a 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82[8]: 00 ef ff ff 00 00 02 00 82[13]: 55 53 42 53 10 a0 d3 e7 00 00 00 00 00 01[31]: 55 53 42 43 a0 59 79 e6 08 00 00 00 80 00 0a 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82[8]: 00 ef ff ff 00 00 02 00 82[13]: 55 53 42 53 a0 59 79 e6 00 00 00 00 00 01[31]: 55 53 42 43 10 a0 d3 e7 08 00 00 00 80 00 0a 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82[8]: 00 ef ff ff 00 00 02 00 82[13]: 55 53 42 53 10 a0 d3 e7 00 00 00 00 00 01[31]: 55 53 42 43 a0 e9 9d e7 00 00 00 00 00 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82[13]: 55 53 42 53 a0 e9 9d e7 00 00 00 00 00 01[31]: 55 53 42 43 40 5a 7a e7 08 00 00 00 80 00 0a 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82[8]: 00 ef ff ff 00 00 02 00 82[13]: 55 53 42 53 40 5a 7a e7 00 00 00 00 00 01[31]: 55 53 42 43 40 5a 7a e7 08 00 00 00 80 00 0a 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82[8]: 00 ef ff ff 00 00 02 00 82[13]: 55 53 42 53 40 5a 7a e7 00 00 00 00 00 01[31]: 55 53 42 43 40 5a 7a e7 00 02 00 00 80 00 0a 28 00 00 00 00 02 00 00 01 00 00 00 00 00 00 00 82[512]: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82[13]: 55 53 42 53 40 5a 7a e7 00 00 00 00 00 01[31]: 55 53 42 43 b0 86 a9 e5 08 00 00 00 80 00 0a 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82[8]: 00 ef ff ff 00 00 02 00 82[13]: 55 53 42 53 b0 86 a9 e5 00 00 00 00 00 01[31]: 55 53 42 43 b0 86 a9 e5 08 00 00 00 80 00 0a 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82[8]: 00 ef ff ff 00 00 02 00 82[13]: 55 53 42 53 b0 86 a9 e5 00 00 00 00 00 01[31]: 55 53 42 43 a0 89 25 e7 00 02 00 00 80 00 0a 28 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 82[512]: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 eb d5 d5 46 00 00 80 20 21 00 0c fe ff d2 00 08 00 00 00 f8 ef 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa 82[13]: 55 53 42 53 a0 89 25 e7 00 00 00 00 00 01[31]: 55 53 42 43 b0 86 a9 e5 00 02 00 00 80 00 0a 28 00 00 00 08 00 00 00 01 00 00 00 00 00 00 00 82[512]: eb 58 90 4d 53 44 4f 53 35 2e 30 00 02 08 42 08 02 00 00 00 00 f8 00 00 3f 00 ff 00 00 08 00 00 00 f8 ef 00 df 3b 00 00 00 00 00 00 02 00 00 00 01 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 29 70 c9 21 56 4e 4f 20 4e 41 4d 45 20 20 20 20 46 41 54 33 32 20 20 20 33 c9 8e d1 bc f4 7b 8e c1 8e d9 bd 00 7c 88 56 40 88 4e 02 8a 56 40 b4 41 bb aa 55 cd 13 72 10 81 fb 55 aa 75 0a f6 c1 01 74 05 fe 46 02 eb 2d 8a 56 40 b4 08 cd 13 73 05 b9 ff ff 8a f1 66 0f b6 c6 40 66 0f b6 d1 80 e2 3f f7 e2 86 cd c0 ed 06 41 66 0f b7 c9 66 f7 e1 66 89 46 f8 83 7e 16 00 75 39 83 7e 2a 00 77 33 66 8b 46 1c 66 83 c0 0c bb 00 80 b9 01 00 e8 2c 00 e9 a8 03 a1 f8 7d 80 c4 7c 8b f0 ac 84 c0 74 17 3c ff 74 09 b4 0e bb 07 00 cd 10 eb ee a1 fa 7d eb e4 a1 7d 80 eb df 98 cd 16 cd 19 66 60 80 7e 02 00 0f 84 20 00 66 6a 00 66 50 06 53 66 68 10 00 01 00 b4 42 8a 56 40 8b f4 cd 13 66 58 66 58 66 58 66 58 eb 33 66 3b 46 f8 72 03 f9 eb 2a 66 33 d2 66 0f b7 4e 18 66 f7 f1 fe c2 8a ca 66 8b d0 66 c1 ea 10 f7 76 1a 86 d6 8a 56 40 8a e8 c0 e4 06 0a cc b8 01 02 cd 13 66 61 0f 82 74 ff 81 c3 00 02 66 40 49 75 94 c3 42 4f 4f 54 4d 47 52 20 20 20 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0d 0a 44 69 73 6b 20 65 72 72 6f 72 ff 0d 0a 50 72 65 73 73 20 61 6e 79 20 6b 65 79 20 74 6f 20 72 65 73 74 61 72 74 0d 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ac 01 b9 01 00 00 55 aa 82[13]: 55 53 42 53 b0 86 a9 e5 00 00 00 00 00

I can only see the “F://”,but can't cd into it.

MartinLoeper commented 2 years ago

Thanks for reporting this issue @J1n-CH1na! Unfortunately, I do not know much about the mass storage interface. I will come back to this one as soon as I find someone who knows this stuff.

J1n-CH1na commented 2 years ago

I just want to relay KBD, MOUSE, and USB_MASS_STORAGE device. Using configfs is a good idea, although it looks stupid. :)

J1n-CH1na commented 2 years ago

I think I need to restart this project. I must transmit in endpoints because I need to relay all usb data. We can have a talk who has a good idea.