Monday, 24 October 2016

Insyde BIOS Modding Manually Changing Settings

Insyde BIOS Modding Manually Changing Settings


Even though you dont have access to all the hidden settings in your BIOS, you can still manually adjust them by changing the EFI global variable package that contains the values for each setting. By doing this, you can easily change the settings you want without having access to them in the setup utility.

The flash chip on your computer that contains your BIOS also has several other regions. Usually a computer has at least these follow regions: Intel ME, BIOS, and Descriptor. However they can also have additional ones line GBE and OEM. Depending on how you update your computers firmware, only parts of these regions are actually changed. So when you update your BIOS through an update released by your OEM, your actually only overwriting part of the whole BIOS region. So whats stored in the remaining part? Well in the BIOS region, one of these things are the EFI global variables.

So how do we gain access to a complete dump of out BIOS so that we can modify these values? Ive only seen one program that can accomplish this task and thats Intels Flash Programming Tool. There are different version of it for each of the Intel chipsets, so get the one that corresponds to your mobos chipset. You can find the different versions in this discussion.

To create a complete dump of your bios, youll need to run the following command through an admin cmd after youve already navigated to the programming tools directory. So heres what I did:
 cd C:UsersDominoDesktopME 6.0.0.1184ME 6.0.0.1184ToolsSystem ToolsFlash Programming ToolWindows 

fptw.exe -d output.bin -BIOS
If everything worked, then the output on the command prompt should say something similar to this:


So this will create a file called output.bin that contains the complete dump of your bios. As a side note, this complete dump will include things like your computers tattoo information, variable packages, etc. Since some of this stuff is unique to the computer it came from, like serial numbers, I dont recommend you attempt to flash someone elses complete BIOS dump on your own computer. Now lets use my EFI Variable Dumper to extract the important information about the variable packages from it. Just drag and drop the output.bin file onto the EFI Variable Dumper.exe executable.


This creates a file called output Variables Dump.txt that contains all the EFI global variable packages. Most of these packages arent of much interest to us, however the one that relates to the values of certain settings in the setup utility is the Setup package. This package contains the values currently being used by the settings. So all you need to know is the variable ID of the setting you want to change, the size of its storage in the package, and all its possible values. Luckily my EFI IFR Dumper can give us all that information. So before we continue, we first need to be get the IFR dump from our setup utility module. The first part of my hidden settings tutorial goes over how to get this, so come back here after you successfully dumped the internal forms representation from that module. Now lets continue, so heres what EFI IFR Dumper tells me about my Virtualization Technology settings:

 
 
The storage width is the size in bytes that the setting takes up, so in this case the location containing the setting were looking for is only one byte in length. So lets go into the file produced by EFI Variable Dumper, mines called output Variable Dump.txt, and see the setting with the variable ID 0x1A1 under the Setup variable package.
 
 
Now all we have to do is change the one byte at offset 0x122CCD from 0x0 to 0x1 which will enable this setting. We know that 0x0 is disabled and 0x1 is enabled because of what EFI IFR Dumper told us. So lets open the complete bios dump with a hex editor and change the value at that offset from 0x0 to 0x1.
 

Now save the file and all thats left to do is flash the changes. Intels FPT is capable of doing this with the following command:
 fptw.exe -f output.bin -BIOS 
 This flashes the file named output.bin to the BIOS region of the flash chip. If everything went right, then the output on the command prompt should look similar to this:
 
 
So restart your computer to see the changes. I shouldnt have to say this, but do not restart your computer is the flashing process did not preform correctly as this will most likely brick your computer. Heres my Virtualization Technology settings after we altered the Setup global variable package:
 
 
No way! It worked. Now we can change every setting even though we dont have direct access to all of them.
?

Available link for download