Write MBR Code

前端 未结 11 2017
攒了一身酷
攒了一身酷 2021-02-01 08:20

I am an electrical engineer who has recently discovered the need to modify the code in the MBR. Basically I need the ability to execute code on the HDD before, the OS starts up

11条回答
  •  抹茶落季
    2021-02-01 08:58

    Why does it go without saying that Windows doesn't allow direct access to the disk? The MSDN page for CreateFile() says this:

    Direct access to the disk or to a volume is restricted. For more information, see "Changes to the file system and to the storage stack to restrict direct disk access and direct volume access in Windows Vista and in Windows Server 2008" in the Help and Support Knowledge Base at http://support.microsoft.com/kb/942448.

    Windows Server 2003 and Windows XP/2000: Direct access to the disk or to a volume is not restricted in this manner.

    KB942448 explains the restrictions, and they seem to allow a process with sufficient privileges to write to the MBR or to a partition boot sector.

提交回复
热议问题