نمایش نتایج 1 تا 3 از 3

نام تاپیک: NtQueryInformationProcess ,NtQuerySystemInformation

  1. #1

    NtQueryInformationProcess ,NtQuerySystemInformation

    سلام

    اینا تابع های سطح 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;
    }
    Kernel Mode Developer
    RootKitSMM@Yahoo.com

  2. #2

    نقل قول: NtQueryInformationProcess ,NtQuerySystemInformation

    جدی باش!
    dumpbin /EXPORTS ntoskrnl.exe | find "ZwQuerySystemInformation"
    We work in the dark, we do what we can, we give what we have.
    Our doubt is our passion and our passion is our task.
    The rest is the madness of art

  3. #3

    نقل قول: NtQueryInformationProcess ,NtQuerySystemInformation

    این تابع در NTDLL.DLL هم موجود هستش
    من فکر کردم نویسنده کد منظورش انه از وجود سطح کرنلش مطلع نبودم (شک کردم یه تابع با یه اسم هم سطح کرنل داشته باشه هم سطح کاربر)


    The ZwQuerySystemInformation function and the structures that it returns are internal to the operating system and subject to change from one release of Windows to another. To maintain the compatibility of your application, it is better to use the alternate functions previously mentioned instead.
    If you do use ZwQuerySystemInformation, access the function through run-time dynamic linking. This gives your code an opportunity to respond gracefully if the function has been changed or removed from the operating system. Signature changes, however, may not be detectable.
    This function has no associated import library. You must use the LoadLibrary and GetProcAddress functions to dynamically link to Ntdll.dll.
    Requirements

    DLL
    Requires Ntdll.dll.

    لینک زیر توضیح جالبی در مورد 4 حالت برای توابع ZW, NT در یوزر مود و کرنل مود رو بیان می کنه و فرق 4 حالت رو بررسی می کنه


    • User Mode application calls NtQuerySystemInformation
    • User Mode application calls ZwQuerySystemInformation
    • Kernel Mode driver calls NtQuerySystemInformation
    • Kernel Mode driver calls ZwQuerySystemInformation



    http://www.osronline.com/custom.cfm?...int.cfm&id=257
    آخرین ویرایش به وسیله r00tkit : چهارشنبه 26 آبان 1389 در 17:23 عصر
    Kernel Mode Developer
    RootKitSMM@Yahoo.com

قوانین ایجاد تاپیک در تالار

  • شما نمی توانید تاپیک جدید ایجاد کنید
  • شما نمی توانید به تاپیک ها پاسخ دهید
  • شما نمی توانید ضمیمه ارسال کنید
  • شما نمی توانید پاسخ هایتان را ویرایش کنید
  •