This commit is contained in:
Mariusz B. / mgeeky
2021-09-29 12:31:43 +02:00
parent 8ee848edf7
commit 60c9c40a79
+4
View File
@@ -95,7 +95,9 @@ void initializeShellcodeFluctuation(const LPVOID caller)
if (reinterpret_cast<uintptr_t>(caller) > reinterpret_cast<uintptr_t>(mbi.BaseAddress)
&& reinterpret_cast<uintptr_t>(caller) < (reinterpret_cast<uintptr_t>(mbi.BaseAddress) + mbi.RegionSize))
{
//
// Store memory boundary of our shellcode somewhere globally.
//
g_fluctuationData.shellcodeAddr = mbi.BaseAddress;
g_fluctuationData.shellcodeSize = mbi.RegionSize;
g_fluctuationData.protect = mbi.Protect;
@@ -105,7 +107,9 @@ void initializeShellcodeFluctuation(const LPVOID caller)
std::mt19937 rng(dev());
std::uniform_int_distribution<std::mt19937::result_type> dist4GB(0, 0xffffffff);
//
// Use random 32bit key for XORing.
//
g_fluctuationData.encodeKey = dist4GB(rng);
log("[+] Fluctuation initialized.");