2025-06-16 12:36:41 -05:00
2025-06-11 15:30:43 -05:00
2025-06-11 15:30:43 -05:00
2025-06-11 15:30:43 -05:00
2025-06-16 12:36:41 -05:00

AutoPatch

A few BOF files to help facilitate reading and writing bytes to DLL function calls.

Using these BOFs, you should be able to implement your own patches, or a few automatically calculated JMP to C3 patches.

This is useful for your own AMSI / ETW byte patches, or any other DLL you might want to patch functionality out of.

These are based off of my blog post -> https://globetech.biz/index.php/2025/06/16/the-return-of-amsi-easy-dll-patching-without-c3/

read-memory

Usage:

read-memory dllName functionName startIndex numOfBytesToRead

For example, to read the first 8 bytes from the AmsiScanBuffer function call:

read-memory amsi AmsiScanBuffer 0 8

write-memory

Usage:

write-memory dllName functionName startIndex bytesToWrite

For example, to write \0x90,\0x90,\0x90 to the AmsiScanBuffer function call:

write-memory amsi AmsiScanBuffer 0 909090

Example of write-memory

autopatch

Usage:

autopatch dllName functionName numOfBytesToSearch

For example, to search through 300 bytes from the AmsiScanBuffer function call, looking for a C3 operation to JMP to:

autopatch amsi AmsiScanBuffer 300

Example of Autopatch forward and backwards, near and short JMPs

S
Description
Automated archival mirror of github.com/galoryber/AutoPatch
Readme 41 KiB
Languages
C 100%