also comments with "fcuk", "shit" from developers includedOh yeah! :mrgreen:
A forum for reverse engineering, OS internals and malware analysis
also comments with "fcuk", "shit" from developers includedOh yeah! :mrgreen:
Tigzy wrote:@Alex: In the Hook code, I got something misunderstood:1. To get Csrss PID
What is that ? GetCsrPid()
This is the PID of which process?
Why do we need to attach this?
DbgPrint("comint32: Running on Windows 2003");
NtUserFindWindowEx_callnumber = 0x179;
NtUserGetForegroundWindow_callnumber = 0x193;
NtUserBuildHwndList_callnumber = 0x137;
NtUserQueryWindow_callnumber = 0x1E1;
NtUserWindowFromPoint_callnumber = 0x24C;
unsigned int getAddressOfShadowTable()
{
unsigned int i;
unsigned char *p;
unsigned int dwordatbyte;
p = (unsigned char*) KeAddSystemServiceTable;
for(i = 0; i < 4096; i++, p++)
{
__try
{
dwordatbyte = *(unsigned int*)p;
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
return 0;
}
if(MmIsAddressValid((PVOID)dwordatbyte))
{
if(memcmp((PVOID)dwordatbyte, &KeServiceDescriptorTable, 16) == 0)
{
if((PVOID)dwordatbyte == &KeServiceDescriptorTable)
{
continue;
}
return dwordatbyte;
}
}
}
return 0;
}
Tigzy wrote:GetProcAdress on a dll get an index from IAT, right?no, actually from export table of the given module.