PEB Stealing
Here is the source to an Aneurysm function I made just a bit ago for debugging foreign processes.
Basically this is used for inserting
into memory, which when executed will move the pointer to the PEB to our variable.
Saltine did me the favor of watching, thanks for that.
Code:
void* AneurysmForeignPEBPointer(char* pAddress)
{
void* pPEB;
*pAddress = 0x64;
*(char*)(pAddress+1) = 0xA1;
*(DWORD*)(pAddress+2) = 0x00000030;
*(char*)(pAddress+6) = 0x64;
*(char*)(pAddress+7) = 0x00;
*(DWORD*)(pAddress+8) = &pPEB;
while(!pPEB)Sleep(100);
return pPEB;
}
Code:
mov eax, fs:[0x30] mov pPEB, eax
Saltine did me the favor of watching, thanks for that.

