Chào mừng đến với Diễn đàn lập trình - Cộng đồng lập trình.
Kết quả 1 đến 7 của 7
  1. #1
    Ngày tham gia
    Sep 2015
    Bài viết
    0

    Sự khác nhau giữa System Service Dispatch Table và System Service Descriptor Table ?

    Hi all,

    Theo mình biết trong kernel Windows thì có 1 Table là SSDT, trong SSDT có cấu trúc KeServiceDescriptorTable, chứa real address của tất cả Native API trong Windows. Tuy nhiên khi search và đọc tài liệu thì có 2 khái niệm SSDT.

    1 cái là : System Service Descriptor Table
    còn 1 cái là : System Service Dispatch Table

    Vậy cái nào là cái theo mình diễn giải ở trên ? Còn cái còn lại có ý nghĩa như thế nào ?

    Nhờ các bạn giải thích giúp mình

    Thanx

  2. #2
    Ngày tham gia
    Sep 2015
    Bài viết
    0
    cái bạn đang nói là System Service Descriptor Table
    Mã:
    typedef struct ServiceDescriptorEntry
    {
     unsigned int *ServiceTableBase;
     unsigned int *ServiceCounterTableBase;
     unsigned int NumberOfServices;
      unsigned char *ParamTableBase;
    } ServiceDescriptorTableEntry_t, *PServiceDescriptorTableEntry_t;
    Struct của nó đây





    còn đây là định nghĩa của nó,đơn giản được hiểu thế này: System Service Descriptor Table là tập hợp bảng các địa chỉ của các hàm trong kernel nằm dưới kernel của hệ thống,được Export từ File Ntoskrnl.exe

    The KeServiceDescriptorTable is a table exported by the kernel. The table contains a pointer to the portion of the SSDT that contains the core system services implemented in Ntoskrnl.exe, which is a major piece of the kernel. The KeServiceDescriptorTable also contains a pointer to the SSPT.
    con đây là cái còn lại,được định nghĩa là các chỉ mục định vị cho các địa chỉ trong bộ nhớ

    The Windows executive runs in kernel mode and provides native support to all of the operating system's subsystems: Win32, POSIX, and OS/2. These native system services' addresses are listed in a kernel structure called the System Service Dispatch Table (SSDT).[5] This table can be indexed by system call number to locate the address of the function in memory. Another table, called the System Service Parameter Table (SSPT),[6] specifies the number of bytes for the function parameters for each system service.
    2 bảng này liên kết với nhau 1 cách trực tiếp,chúng hoàn toàn khác nhau,khi 1 chương trình muốn gọi 1 kernel Funcition thì nó sẽ thông qua chỉ mục của System Service Dispatch Table để gọi đến bảng địa chỉ System Service Descriptor Table nơi chứa địa chỉ của các hàm được Export trong Ntoskrnl.exe

    đây là hình ảnh minh họa em nó ...

  3. #3
    Ngày tham gia
    Sep 2015
    Bài viết
    0
    Sau một hồi đọc nhiều tại liệu tổng hợp lại thì mình đã hiểu

    Thanx các bạn [IMG]images/smilies/biggrin.png[/IMG]

  4. #4
    Ngày tham gia
    Sep 2015
    Bài viết
    0
    Hiểu thì cậu hãy chia sẻ cho mọi người đi,tại sao lại có 4 SystemServiceDescriptors trong 1 SystemServiceDescriptorTable
    mỗi cái đó có nhiệm vụ gì

  5. #5
    Ngày tham gia
    Sep 2015
    Bài viết
    0
    Hix, mình còn hơi confuse về mối quan hệ của KeServiceDescriptorTable và SSDT, cụ thể KeServiceDescriptorTable là 1 structure nằm trong SSDT hay là sao nhỉ ? Bạn có thể nói rõ hơn 1 tý về cái này ko ?

    Thanx

  6. #6
    Ngày tham gia
    Sep 2015
    Bài viết
    0
    Mã:
    KeServiceDescriptorTable
    là 1 truct chứa địa chỉ các hàm,nếu cậu muốn biết rõ từng địa chỉ thì tra trong Undocument windows secrest


    mình còn hơi confuse về mối quan hệ của KeServiceDescriptorTable và SSDT
    còn mối quan hệ thì KeServiceDescriptorTable chính là struct đại diện cho SSDT
    chính nó đây
    Mã:
    typedef struct ServiceDescriptorEntry
    {
     unsigned int *ServiceTableBase;
     unsigned int *ServiceCounterTableBase;
     unsigned int NumberOfServices;
      unsigned char *ParamTableBase;
    } ServiceDescriptorTableEntry_t, *PServiceDescriptorTableEntry_t;

  7. #7
    Ngày tham gia
    Sep 2015
    Bài viết
    0
    Hi bạn,

    Theo bạn nói thì struct của SSDT / KeServiceDescriptorTable là :

    Mã:
    typedef struct ServiceDescriptorEntry
    {
     unsigned int *ServiceTableBase;
     unsigned int *ServiceCounterTableBase;
     unsigned int NumberOfServices;
      unsigned char *ParamTableBase;
    } ServiceDescriptorTableEntry_t, *PServiceDescriptorTableEntry_t;
    Tuy nhiên theo tài liệu tớ đọc trong http://www.ussrback.com/docs/papers/NT/adding.doc thì nó nói là SSDT gồm 4 SSD

    Struct của SSDT là :

    Mã:
    typedef struct 	SystemServiceDescriptorTable
    {
    	SSD		SystemServiceDescriptors[4];			// The array of 4 SSDs.
    }	SSDT, *LPSSDT;
    Còn struct của SSD là (cái này mới giống như struct SSDT của bạn nói ở trên) :

    Mã:
    typedef struct	SystemServiceDescriptor
    {
    	LPSSTAT	lpSystemServiceTableAddressTable;		// Pointer to the Address Table
    										// ( SSTAT ) structure of the SST.
    	BOOL 		bUnknown;                   			// ( ? ) Always set to FALSE.
    	DWORD 	dwSystemServiceTableNumEntries;		// Number of entries in the SST.
    	LPSSTPT	lpSystemServiceTableParameterTable; 	// Pointer to the Parameter Table
    										// ( SSTPT ) structure of the SST.
    } 	SSD, *LPSSD;
    Vậy là sao nhỉ ?

    Thanx bạn nhìu

 

 

Quyền viết bài

  • Bạn Không thể gửi Chủ đề mới
  • Bạn Không thể Gửi trả lời
  • Bạn Không thể Gửi file đính kèm
  • Bạn Không thể Sửa bài viết của mình
  •