百度空间 | 百度首页 
 
查看文章
 
一段获取ssdt表及其中函数的简单代码
2009-03-02 23:34
typedef struct _SYSTEM_SERVICE_TABLE
{
    PNTPROC    ServiceTable ;    // array of entry points
    PULONG    CounterTable ;    // array of usage counters . be NULL
    ULONG    ServiceLimit ;    // number of table entries
    UCHAR*    ArgumentTable ;    // array of bytes counts
} SYSTEM_SERVICE_TABLE , *PSYSTEM_SERVICE_TABLE , **PPSYSTEM_SERVICE_TABLE ;

ULONG GetSSDTFunction(ULONG nIndex, ULONG *pFunAddr )
{
      PETHREAD kthread;
      PSYSTEM_SERVICE_TABLE   pssdt;

      kthread = (ULONG)PsGetCurrentThread();
      pssdt = kthread ->ServiceTable;
    
       if( nIndex < pssdt->ServiceLimit )
       {
              *pFunAddr = pssdt->ServiceTable [nIndex];
              return   *pFunAddr;
       }

       return   0;

}

类别:windows内核探索 | 添加到搜藏 | 浏览() | 评论 (1)
 
最近读者:
 
网友评论:
2
2009-03-07 11:39 | 回复
具体偏移在各个版本操作系统上貌似不一样
 
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码: 请点击后输入四位验证码,字母不区分大小写
      

     

©2009 Baidu