我正在做硬盘分析,想知道是否有办法在windows下直接控制ATA硬盘。 简而言之,我想做一些类似数据包嗅探器的事情,但是针对发送到硬盘驱动器或从硬盘驱动器发送的 ATA 命令。
之后,我希望能够直接向驱动器写入 ATA 命令。 如果这在 Windows 下不可能,那么 Linux 是第二选择。
第三种选择是制作一个在 PC 控制下完成所有这些工作的 FPGA。
关于标准 API 是否可以做到这一点,您有什么想法吗?
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?
发布评论
评论(3)
在 Windows 上,您可以使用
On windows you could use IOCTL_ATA_PASS_THROUGH_DIRECT ioctl to pass arbitrary ATA commands to the drive.
如果您不打算自己编写此内容,Bustrace (http://www.bustrace.com) 是被认为是执行此操作的最佳工具,它非常功能强大。
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.
关于您的第三个选择(制作一个在 PC 控制下完成所有这些操作的 FPGA),有一些外部工具,例如 InFusion 或 培训师。 不过,它们并不便宜。
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.