I am getting BSOD when trying to get to the ProtectedProcess bit in the EPROCESS.
Here is my function:
I know the problem lies where i deference the Flags2ptr, but why?
Thanks.
Here is my function:
Code: Select all
What am i doing wrong?BOOLEAN IsProtected( BYTE* EPROCESS )
{
DWORD *Flags2ptr;
DWORD Flags2;
BOOLEAN protect;
DWORD masker;
// Offsets.Flags2 = 0x26C (win7)
Flags2ptr = (DWORD*) (EPROCESS + Offsets.Flags2);
Flags2 = (DWORD)*Flags2ptr; // <-- BSOD
masker = 0;
masker = 1 << 11;
protect = (Flags2 & masker) ? TRUE : FALSE;
if (protect)
{
return (TRUE);
}
return (FALSE);
}
I know the problem lies where i deference the Flags2ptr, but why?
Thanks.