当前位置:编程学习 > VC++ >>

VC++实现恢复SSDT

SSDT(System Services Descriptor Table),系统服务描述符表。这个表就是一个把ring3的Win32 API和ring0的内核API联系起来。SSDT并不仅仅只包含一个庞大的地址索引表,它还包含着一些其它有用的信息,诸如地址索引的基地址、服务函数个数等。
  通过修改此表的函数地址可以对常用windows函数及API进行hook,从而实现对一些关心的系统动作进行过滤、监控的目的。一些HIPS、防毒软件、系统监控、注册表监控软件往往会采用此接口来实现自己的监控模块,
  目前极个别病毒确实会采用这种方法来保护自己或者破坏防毒软件,但在这种病毒进入系统前如果防毒软件能够识别并清除它将没有机会发作.
  SSDT到底是什么呢?打一个比方,SSDT相当于系统内部API的指向标,作用就是告诉系统,需要调用的API在什么地方。
请看源码解析
[cpp]
/*************************************************************************
*
*ZwQuerySystemInformation函数常用结构
*
**************************************************************************/ 
#ifndef _SPS_H_ 
#define _SPS_H_ 1 
 
#include <ntddk.h> 
#include "table.h" 
#include "pe.h" 
 
#endif 
 
 
typedef enum _SYSTEM_INFORMATION_CLASS 

        SystemBasicInformation,                 // 0  
        SystemProcessorInformation,             // 1  
        SystemPerformanceInformation,           // 2 
        SystemTimeOfDayInformation,             // 3 
        SystemNotImplemented1,                  // 4 
        SystemProcessesAndThreadsInformation,   // 5 
        SystemCallCounts,                       // 6 
        SystemConfigurationInformation,         // 7 
        SystemProcessorTimes,                   // 8 
        SystemGlobalFlag,                       // 9 
        SystemNotImplemented2,                  // 10 
        SystemModuleInformation,                // 11            系统模块 
        SystemLockInformation,                  // 12 
        SystemNotImplemented3,                  // 13 
        SystemNotImplemented4,                  // 14 
        SystemNotImplemented5,                  // 15 
        SystemHandleInformation,                // 16 
        SystemObjectInformation,                // 17 
        SystemPagefileInformation,              // 18 
        SystemInstructionEmulationCounts,       // 19 
        SystemInvalidInfoClass1,                // 20 
        SystemCacheInformation,                 // 21 
        SystemPoolTagInformation,               // 22 
        SystemProcessorStatistics,              // 23 
        SystemDpcInformation,                   // 24 
        SystemNotImplemented6,                  // 25 
        SystemLoadImage,                        // 26 
        SystemUnloadImage,                      // 27 
        SystemTimeAdjustment,                   // 28 
        SystemNotImplemented7,                  // 29 
        SystemNotImplemented8,                  // 30 
        SystemNotImplemented9,                  // 31 
        SystemCrashDumpInformation,             // 32 
        SystemExceptionInformation,             // 33 
        SystemCrashDumpStateInformation,        // 34 
        SystemKernelDebuggerInformation,        // 35 
        SystemContextSwitchInformation,         // 36 
        SystemRegistryQuotaInformation,         // 37 
        SystemLoadAndCallImage,   &nb
补充:软件开发 , Vc ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,