8000 GitHub - gavz/winzentool_microcode: Port of zentool to Windows
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

gavz/winzentool_microcode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

winzentool

A quick and dirty port of zentool to Microsoft Windows.

screenshot

Changes made

  • Used getopt-for-windows to keep command-line parsing as-is.
  • Implemented non-standard functions such as errx() and strlcat().
  • Rewrote the majority of structures in ucode.h so that they correctly map to the data when compiling with MSVC.
  • Hardcoded offsets and sizes because the bitoffsetof() and bitsizeof() macros do not work under MSVC.
  • Rewrote the microcode loader (loader.c) to use a kernel-mode driver instead of Linux's /dev/cpu/ and its mmap() functionality.
  • Added test command to print current microcode revision and fpatan return value of each CPU.

Compiling

  1. Install Visual Studio 2022 and vcpkg:
    Download and install Visual Studio 2022 with the Desktop development with C++ workload. Also, set up vcpkg for dependency management.

  2. Install Dependencies:
    Open your terminal and run the following commands:

    vcpkg install json-c
    vcpkg install openssl
    vcpkg install gmp
    
  3. Compile the Solution:
    Open and compile the solution file (zentool.sln).

  4. Locate the Binaries:
    After compilation, you'll find zentool.exe, mcop.exe, mcas.exe, and the required dependencies in the \zentool\x64\Release folder.

Microcode loading

You can use the tool to load the modified firmware just as you would on Linux, but you need to load a kernel-mode driver.

I have decided to "borrow" a driver from ASRock because it is code-signed (meaning you don't need to enable test signing mode) and is not blocked (at least for now) by the vulnerable driver blocklist.

You can download the driver from here.

Once downloaded, load it as follows:

sc create AsrOmgDrv binPath="C:\path\to\AsrOmgDrv.sys" type=kernel
sc start AsrOmgDrv

Then, you can use the load command:

zentool.exe --debug load --cpu 2 update.bin

License

Most of the files originate from zentool and retain their original Apache License, Version 2.0. Some files may have different licenses; for example, win_getopt.c and win_getopt.h are released under the LGPL. Please check each file header for more details.

About

Port of zentool to Windows

Resources

Stars

Watchers

Forks

Releases

No releases published
3349

Packages

No packages published

Languages

  • C 93.1%
  • Assembly 6.9%
0