mirror of
https://github.com/wavestone-cdt/EDRSandblast.git
synced 2026-06-08 16:37:12 +00:00
Added some safety check in hook resolving code
This commit is contained in:
@@ -432,6 +432,11 @@ PVOID hookResolver(PBYTE hookAddr) {
|
||||
PBYTE destination = hookAddr;
|
||||
BOOL hasFollowedJmp = FALSE;
|
||||
while (TRUE) {
|
||||
MEMORY_BASIC_INFORMATION mbi;
|
||||
VirtualQuery(destination, &mbi, sizeof(mbi));
|
||||
if (mbi.State != MEM_COMMIT) {
|
||||
return NULL;
|
||||
}
|
||||
switch (destination[0]) {
|
||||
case 0xE9:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user