ufrisk / pcileech

Direct Memory Access (DMA) Attack Software
GNU Affero General Public License v3.0
4.87k stars 718 forks source link

HELP: FT_Readpipe always return 19 (FT_Timeout) #171

Closed NickYang713 closed 1 year ago

NickYang713 commented 3 years ago

Device: Screamer PCIe USB-C (R04). Gateware: Has been reprogramed (pcileech_screamer_m2_4_7), LED1, LED3 are ON and LED2 is OFF when working . System: Both windows 10 FTD Drivers: newest 2019 FTD Drivers (FTD3XXDriver_WHQLCertified_v1.3.0.4) image

Command: pcileech probe -device fpga -v

device_fpga.c , line1485-1489

    status = ctx->dev.pfnFT_WritePipe(ctx->dev.hFTDI, 0x02, pbTX_Dummy, sizeof(pbTX_Dummy), &cbTX, NULL);
    if(status) { goto fail; 

>  status == 0 , pass

    Sleep(25);
    status = ctx->dev.pfnFT_ReadPipe(ctx->dev.hFTDI, 0x82, pbRX, 0x1000, &cbRX, NULL);
    if(status) { goto fail; }   

> status == 19 (timeout) , goto fail 

image

I have tried change control computer and other USB port, but didn't work. Is there any suggestion? Looking for your reply. Best Regards.

ufrisk commented 3 years ago

Do you know if the middle LED (LD2) blink at power-on?

NickYang713 commented 3 years ago

Do you know if the middle LED (LD2) blink at power-on?

Yes, it blinks about three times at power-on.

ufrisk commented 3 years ago

I don't quite understand this, this means your computer is finding the usb chip, but somehow it's unable to communicate with the fpga chip.

1) make sure you flash the most recent default bitstream from my github. If you're running some custom version please re-flash with the default one from my github anyway for the error finding.

2) are you able to see the device in windows device manager? it should show up as xilinx ethernet card; probably with a yellow exclamation mark (i.e. no driver).

NickYang713 commented 3 years ago

I just re-flashed the most recent v4.8 bitstream by vivado from github.com/ufrisk/pcileech-fpga/tree/master/ScreamerM2_, and restarted the target computer, errors still remained, however. image

The device in windows device manager shows up as you said, a yellow exclamation mark.

You mentioned my computer is finding the usb chip, but somehow it's unable to communicate with the fpga chip. ,But the status returned a normally "0" in Line1485, Does this mean that it has at least successfully one-way communicated with FPGA on Writepipe .

By the way, before I update the newest FTD driver , I was using the version (2016) automatically installed by windows 10. At that time, even the _ctx->dev.pfnFTWritePipe returned a "32" (FT_other error).

ufrisk commented 3 years ago

I don't have a good explanation for this. When people had issues in the past it's been issues around cabling and such; switching USB cable to get it to work and other strange reasons; but seeing how you pass the initialization stage I don't have a good answer for this since the FPGA seems to be working.

That the write is successful doesn't necessarily mean anything; this is the error I'd expect when the USB chip doesn't really get an answer from the FPGA. It could be a driver issue; or worst case faulty hardware.

It would be good if you could try this with another usb cable on another computer/usb port (attacker computer connected over USB not another target computer).

I always use the driver that is auto-installed on windows with the most recent dll so no worries about that.

NickYang713 commented 3 years ago

I tried to run the program on two different PCs, and different USB port , but the results were the same (19 timeout at Readpipe). Since the FTDI driver can be identified correctly in the device manager, the possibility of USB cable problems is relatively small , I think. Next, I plan to solve this problem from FPGA debugging. Anyway, thanks for your answer and patience.

ufrisk commented 3 years ago

Best wishes with this. My best guess it's either something with your drivers or a hardware issue. Please let me know how it goes.

peko19 commented 2 years ago

I have quite the same problem to connect to Device: Screamer PCIe USB-C (R04). checked cables, reflashed with pcileech_screamer_m2_4_9, reinstalled drivers, checked attacking from Windows and Linux still "Failed to connect to the device"

@NickYang713 did you solved it?

ufrisk commented 1 year ago

I'm closing this issue due to old age. Since I haven't heard back in quite a while I trust that the issue was resolved.