博客
关于我
SSDT——框架编写与hook实例
阅读量:205 次
发布时间:2019-02-28

本文共 1424 字,大约阅读时间需要 4 分钟。

SSDT Hook??????????? .Net ??? MVC ?????????????? .cpp ? .h ???????????? API ?????????

SSDT ??????? Service Descriptor Table?SSDT????????????????????????????????????Hook?????????????? ServiceTableBase??????????????????????????

SSDT ??????????????

  • ServiceTableBase?SSDT ??????
  • ServiceCounterTableBase?????????????
  • NumberOfServices?SSDT ???????
  • ParamTableBase????????

??????????????????????????????cli????????? sti???????????????????Cr0 ?????????????????????????????????

???????????????

void PageProtectOff() {    __asm {        cli        mov eax, cr0        and eax, not 10000h        mov cr0, eax    }}

????????????????

void PageProtectOn() {    __asm {        mov eax, cr0        or eax, 10000h        mov cr0, eax        sti    }}

???Hook?????????????? SSDT ?????????????????????????????????

? OpenProcess ??????????????????????????? Hook ??????????????????????????????????????? OpenProcess ???

??? OpenProcess Hook ????????

NTSTATUS ssdt_hook() {    O_NtOpenProcess = KeServiceDescriptorTable.ServiceTableBase[122];    PageProtectOff();    KeServiceDescriptorTable.ServiceTableBase[122] = (unsigned int)MyNtOpenProcess;    PageProtectOn();    return STATUS_SUCCESS;}

MyNtOpenProcess ?????????????????????????? OpenProcess ????????????? ClientId ?????????????

CLIENT_ID ???????

typedef struct _CLIENT_ID {    HANDLE UniqueProcess;    HANDLE UniqueThread;} CLIENT_ID;

??????????????????? Hook ??????????????????????????????

转载地址:http://rzri.baihongyu.com/

你可能感兴趣的文章
OAuth2.0_授权服务配置_密码模式及其他模式_Spring Security OAuth2.0认证授权---springcloud工作笔记145
查看>>
OAuth2.0_授权服务配置_资源服务测试_Spring Security OAuth2.0认证授权---springcloud工作笔记146
查看>>
OAuth2.0_环境搭建_Spring Security OAuth2.0认证授权---springcloud工作笔记139
查看>>
OA系统多少钱?OA办公系统中的价格选型
查看>>
object detection错误之Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
查看>>
Objective-C之成魔之路【7-类、对象和方法】
查看>>
Objective-C享元模式(Flyweight)
查看>>
Objective-C以递归的方式实现二叉搜索树算法(附完整源码)
查看>>
Objective-C实现1000 位斐波那契数算法(附完整源码)
查看>>
Objective-C实现2 个数字之间的算术几何平均值算法(附完整源码)
查看>>
Objective-C实现2D变换算法(附完整源码)
查看>>
Objective-C实现3n+1猜想(附完整源码)
查看>>
Objective-C实现9x9乘法表算法(附完整源码)
查看>>
Objective-C实现9×9二维数组数独算法(附完整源码)
查看>>
Objective-C实现A-Star算法(附完整源码)
查看>>
Objective-C实现abbreviation缩写算法(附完整源码)
查看>>
Objective-C实现ABC人工蜂群算法(附完整源码)
查看>>
Objective-C实现activity selection活动选择问题算法(附完整源码)
查看>>
Objective-C实现adaboost算法(附完整源码)
查看>>
Objective-C实现Adler32算法(附完整源码)
查看>>