views:

506

answers:

3

I am working on hard drive analysis, and wanted to know if there is a way to directly control an ATA hard drive under windows. In short I want to do something like a packet sniffer, but for the ATA commands sent to/from the hard drive.

After that, I'd like to be able to write ATA commands directly the drive. If this is not possible under Windows then Linux is second choice.

Third choice is to make an FPGA that does all this under PC control.

Any ideas on if this is possible from standard APIs?

A: 

On windows you could use IOCTL_ATA_PASS_THROUGH_DIRECT ioctl to pass arbitrary ATA commands to the drive.

wazoox
And the ATA interface is well documented on the internet.
Lazarus
+1  A: 

If you're not set on writing this yourself, Bustrace (http://www.bustrace.com) is considered the best-in-class tool for doing this, it's very powerful.

Paul Betts
A: 

Regarding your third choice (make an FPGA that does all this under PC control), there are external tools like InFusion or Trainer. They're not cheap, though.

OutputLogic