A universal binary patching dll. Meant to be used with DLL Proxy Generator.
DLL Universal Patcher is a flexible and convenient code patcher that doesn't touch the files on disk. It can be used for replacing any tasks that you'd otherwise achieve with on-disk patching, such as fixing old software on modern machines, or fixing bugs in others' software. In addition, due to more control over when the patching happens, it is possible to patch packed executables.
- Pick a suitable dll to proxy, like
version.dll
- Use
dll-proxy-generator.exe --import-dll "dll_universal_patcher.dll" --import "dummy" "C:\Windows\System32\version.dll"
to generate a suitable proxy dll - Write up your patches into
patches.json
(more on this later) - Place the generated dll,
dll_universal_patcher.dll
, andpatches.json
in target directory to perform dll hijacking
- Pick a suitable dll to proxy, like
version.dll
- Use
dll-proxy-generator.exe --import-dll "dll_universal_patcher.dll" --import "dummy" "C:\Windows\System32\version.dll"
to generate a suitable proxy dll - Write up your patches into
patches.json
(more on this later) - Use a tool like CFF Explorer to add the config as a
RCDATA
resource with ID1
and neutral language todll_universal_patcher.dll
- Place the generated dll and
dll_universal_patcher.dll
in target directory to perform dll hijacking
Example:
[
{
"modules": [ "winver.exe", "{exe}" ],
"pattern": "01 02 03 04 05 ? 06 ?? 07",
"replacement": "90 90 90 90 C3",
"min_matches": 1,
"max_matches": 3,
"on_initialize": false,
"on_process_initialized": true,
"on_before_dllmain": false,
"is_code": true,
"allowed_to_fail": false,
"multishot": false
}
]
For more info on the options, check out the schema