欢迎来到 嗅灵易学

零基础也能上手的脚本技术课,一对一答疑带你入门

[原创]DisablePatchGuard.sys

[原创]DisablePatchGuard.sys

人家早(2006年)都解决了,咱才开始。
windows 8 和windows server 2012没有测试,可能不支持。
测试条件:
1.需要数字签名。
2.自己搞个64位的ssdt hook或者别的。
3.正常启动,不要调试等模式启动。
4.超过30分钟不蓝屏,就成功了。
网上也有些资料,但是大多不能直接编译通过,即使编译通过起效果的也没几个,收集的有:
1.改变或者添加启动模式,如安全,调试,签名等。
2.替换内核文件,那就是吧加载PatchGuard的机制给去掉。
3.从定时器队列中摘除。
4.KeBugCheckEx Hook(有汇编文件的那个),编译成功,但依旧在自己的hook函数中蓝屏,代号:0x109。
5.异常处理。
6.一些hook库,依旧蓝屏,代号:0x109。
7.其他,等你告诉我。
注释:隐藏进程的摘链,inline hook都会被PatchGuard发现,难道是我的问题,测试环境是windows server 2008 r2。
本文件:
第一次:运行10分钟蓝屏,蓝屏代号:0x109.估计是我的问题。
第二次:运行一个小时左右没有蓝屏。
第三次:运行半小时没有蓝屏。
第四次:运行6个多小时了没有蓝屏。
我已经蓝屏几百次了,总结在20-30分钟必定蓝屏。
这也不能双机调试,只能分析dump,偶尔看看Dbgview.exe.还好有源码。
网上很少见bin,特发一个(checked版本),对于有的人 bin约等于80%的code.
附:
0: kd> !analyze -v
*******************************************************************************
*                                                                             *
*                        Bugcheck Analysis                                    *
*                                                                             *
*******************************************************************************
CRITICAL_STRUCTURE_CORRUPTION (109)
This bugcheck is generated when the kernel detects that critical kernel code or
data have been corrupted. There are generally three causes for a corruption:
1) A driver has inadvertently or deliberately modified critical kernel code
or data. See http://www.microsoft.com/whdc/driver/kernel/64bitPatching.mspx
2) A developer attempted to set a normal kernel breakpoint using a kernel
debugger that was not attached when the system was booted. Normal breakpoints,
"bp", can only be set if the debugger is attached at boot time. Hardware
breakpoints, "ba", can be set at any time.
3) A hardware corruption occurred, e.g. failing RAM holding kernel code or data.
Arguments:
Arg1: a3a039d895981598, Reserved
Arg2: b3b7465ee814e7d6, Reserved
Arg3: fffff800016bd450, Failure type dependent information
Arg4: 0000000000000001, Type of corrupted region, can be
        0 : A generic data region
        1 : Modification of a function or .pdata
        2 : A processor IDT
        3 : A processor GDT
        4 : Type 1 process list corruption
        5 : Type 2 process list corruption
        6 : Debug routine modification
        7 : Critical MSR modification
Debugging Details:
------------------
BUGCHECK_STR:  0x109
DEFAULT_BUCKET_ID:  CODE_CORRUPTION
PROCESS_NAME:  System
CURRENT_IRQL:  0
LAST_CONTROL_TRANSFER:  from 0000000000000000 to fffff8000168ef00
STACK_TEXT:  
fffff880`01f0f598 00000000`00000000 : 00000000`00000109 a3a039d8`95981598 b3b7465e`e814e7d6 fffff800`016bd450 : nt!KeBugCheckEx
STACK_COMMAND:  kb
CHKIMG_EXTENSION: !chkimg -lo 50 -d !nt
    fffff80001695105 - nt!SwapContext_PatchXSave+2
        [ 01:21 ]
    fffff800016951e8 - nt!SwapContext_PatchXRstor+2 (+0xe3)
        [ 09:29 ]
    fffff800016953a5 - nt!EnlightenedSwapContext_PatchXSave+2 (+0x1bd)
        [ 01:21 ]
    fffff8000169548a - nt!EnlightenedSwapContext_PatchXRstor+2 (+0xe5)
        [ 09:29 ]
    fffff800016bd450-fffff800016bd45e  15 bytes - nt!_C_specific_handler (+0x27fc6)
        [ 4c 8b dc 49 89 5b 08 49:48 b8 b0 13 fc 04 80 f8 ]
    fffff80001747480 - nt!DbgPrint (+0x8a030)
        [ 4c:c3 ]
20 errors : !nt (fffff80001695105-fffff80001747480)
MODULE_NAME: memory_corruption
IMAGE_NAME:  memory_corruption
FOLLOWUP_NAME:  memory_corruption
DEBUG_FLR_IMAGE_TIMESTAMP:  0
MEMORY_CORRUPTOR:  LARGE
FAILURE_BUCKET_ID:  X64_MEMORY_CORRUPTION_LARGE
BUCKET_ID:  X64_MEMORY_CORRUPTION_LARGE
Followup: memory_corruption
---------
本人算是经验分享吧!代码就不发了。
不足与错误,请指正。
made by correy

Website:http://correy.webs.com

上传的附件 DisablePatchGuard.rar

注意:上传附件及图片大小不得大于30M。

⚠️ 版权声明:
本博客所有内容(含教程、源码、工具)仅供个人技术学习与研究交流使用,严禁商用、倒卖、二次分发及非法用途。
未经作者书面授权,任何组织或个人不得转载、复制或用于其他平台,违者将追究相关责任。

0 0 0 举报
复制成功