kmd wrote:so how does windows itself then loads boot drivers?This does ntldr/winload using the BIOS disk I/O driver.
Boot Sequence:
BIOS->MBR->VBR->BootLoader (ntldr->ntdetect/bootmgr->winload)->ntoskrnl->wininit(System process)->others drivers etc->winlogon->all other windows crap start here.
BootLoader contain code to be able to read (only) the Windows-supported file systems (FAT16, FAT32, NTFS). It also parses BCD since Vista (instead of boot.ini parsed by ntldr in earlier versions).
You can find BkLoader source code (inside carberp pack) for investigating how it compromises windows boot process and inserts its malicious driver code to the boot sequence by hijacking KeLoaderBlock->BootDriverListHead.
Ring0 - the source of inspiration