r00tkit
چهارشنبه 26 آبان 1389, 14:14 عصر
سلام
اینا تابع های سطح user هستن
چی جوری اینا تو سطح کرنل استفاده می شن /شدن
PVOID AllocateInfoBuffer(
IN SYSTEM_INFORMATION_CLASS ATableType
)
{
ULONG mSize = 0x8000;
PVOID mPtr;
NTSTATUS status;
do
{
mPtr = ExAllocatePool(PagedPool, mSize);
if (!mPtr) return NULL;
memset(mPtr, 0, mSize);
status = ZwQuerySystemInformation(ATableType, mPtr, mSize, NULL);
if (status == STATUS_INFO_LENGTH_MISMATCH)
{
ExFreePool(mPtr);
mSize = mSize * 2;
}
} while (status == STATUS_INFO_LENGTH_MISMATCH);
if (NT_SUCCESS(status)) return mPtr;
ExFreePool(mPtr);
return NULL;
}
اینا تابع های سطح user هستن
چی جوری اینا تو سطح کرنل استفاده می شن /شدن
PVOID AllocateInfoBuffer(
IN SYSTEM_INFORMATION_CLASS ATableType
)
{
ULONG mSize = 0x8000;
PVOID mPtr;
NTSTATUS status;
do
{
mPtr = ExAllocatePool(PagedPool, mSize);
if (!mPtr) return NULL;
memset(mPtr, 0, mSize);
status = ZwQuerySystemInformation(ATableType, mPtr, mSize, NULL);
if (status == STATUS_INFO_LENGTH_MISMATCH)
{
ExFreePool(mPtr);
mSize = mSize * 2;
}
} while (status == STATUS_INFO_LENGTH_MISMATCH);
if (NT_SUCCESS(status)) return mPtr;
ExFreePool(mPtr);
return NULL;
}