能力值:
( LV9,RANK:280 )
|
-
-
2 楼
会蓝屏。critical_structure_corruption 就是PATCHGUARD
|
能力值:
( LV4,RANK:50 )
|
-
-
3 楼
hzqst
会蓝屏。critical_structure_corruption 就是PATCHGUARD
这个怎么搞....
|
能力值:
( LV4,RANK:50 )
|
-
-
4 楼
hzqst
会蓝屏。critical_structure_corruption 就是PATCHGUARD
HyperBone?
|
能力值:
( LV2,RANK:10 )
|
-
-
5 楼
绝对对
|
能力值:
( LV10,RANK:163 )
|
-
-
6 楼
x64没过PG,搞进程隐藏断链一类的事,蓝到你怀疑人生...
|
能力值:
( LV4,RANK:50 )
|
-
-
7 楼
yimingqpa
x64没过PG,搞进程隐藏断链一类的事,蓝到你怀疑人生...
WIN7没事呀
|
能力值:
( LV4,RANK:50 )
|
-
-
8 楼
lononan
WIN7没事呀[em_32]
是驱动断链,不是进程断链
|
能力值:
( LV3,RANK:20 )
|
-
-
9 楼
http://blog.csdn.net/zhuhuibeishadiao/article/details/75658816 移步这里看看。最近在学习,恰好类似,回复下。如果有做成代码,互相交流哈!
|
能力值:
( LV5,RANK:60 )
|
-
-
10 楼
特征码自己找 忘了这个哪个系统的了 #include "HideDiver.h"
#pragma warning(disable : 4047)
typedef NTSTATUS(__fastcall *MiProcessLoaderEntry)(PVOID pDriverSection, int bLoad);
MiProcessLoaderEntry g_pfnMiProcessLoaderEntry = NULL;
PVOID GetCallPoint(PVOID pCallPoint) { ULONG dwOffset = 0; ULONG_PTR returnAddress = 0; LARGE_INTEGER returnAddressTemp = { 0 }; PUCHAR pFunAddress = NULL;
if (pCallPoint == NULL || !MmIsAddressValid(pCallPoint)) return NULL;
pFunAddress = pCallPoint; // 函数偏移 RtlCopyMemory(&dwOffset, (PVOID)(pFunAddress + 1), sizeof(ULONG));
// JMP向上跳转 if ((dwOffset & 0x10000000) == 0x10000000) { dwOffset = dwOffset + 5 + pFunAddress; returnAddressTemp.QuadPart = (ULONG_PTR)pFunAddress & 0xFFFFFFFF00000000; returnAddressTemp.LowPart = dwOffset; returnAddress = returnAddressTemp.QuadPart; return (PVOID)returnAddress; }
returnAddress = (ULONG_PTR)dwOffset + 5 + pFunAddress; return (PVOID)returnAddress;
}
PVOID GetUndocumentFunctionAddress(IN PUNICODE_STRING pFunName, IN PUCHAR pStartAddress, IN UCHAR* pFeatureCode, IN ULONG FeatureCodeNum, ULONG SerSize, UCHAR SegCode, ULONG AddNum, BOOLEAN ByName) { ULONG dwIndex = 0; PUCHAR pFunAddress = NULL; ULONG dwCodeNum = 0;
if (pFeatureCode == NULL) return NULL;
if (FeatureCodeNum >= 15) return NULL;
if (SerSize > 0x1024) return NULL;
if (ByName) { if (pFunName == NULL || !MmIsAddressValid(pFunName->Buffer)) return NULL;
pFunAddress = (PUCHAR)MmGetSystemRoutineAddress(pFunName); if (pFunAddress == NULL) return NULL; } else { if (pStartAddress == NULL || !MmIsAddressValid(pStartAddress)) return NULL;
pFunAddress = pStartAddress; }
for (dwIndex = 0; dwIndex < SerSize; dwIndex++) { __try { if (pFunAddress[dwIndex] == pFeatureCode[dwCodeNum] || pFeatureCode[dwCodeNum] == SegCode) { dwCodeNum++;
if (dwCodeNum == FeatureCodeNum) return pFunAddress + dwIndex - dwCodeNum + 1 + AddNum;
continue; }
dwCodeNum = 0; } __except (EXCEPTION_EXECUTE_HANDLER) { return 0; } }
return 0; }
NTSTATUS HideDriver(PDRIVER_OBJECT pTargetDriverObject) { UNICODE_STRING usRoutie = { 0 }; PUCHAR pAddress = NULL;
UCHAR code[3] = "\xD8\xE8";
UCHAR code2[10] = "\x48\x8B\xCB\xE8\x60\x60\x60\x60\x8B";
/* PAGE:000000014052ABE4 48 8B D8 mov rbx, rax PAGE:000000014052ABE7 E8 48 17 F7 FF call MiUnloadSystemImage */
if (pTargetDriverObject == NULL) return STATUS_INVALID_PARAMETER;
RtlInitUnicodeString(&usRoutie, L"MmUnloadSystemImage");
pAddress = GetUndocumentFunctionAddress(&usRoutie, NULL, code, 2, 0x30, 0x90, 1, TRUE);
if (pAddress == NULL) { DbgPrint("MiUnloadSystemImage 1 faild!\n"); return STATUS_UNSUCCESSFUL; }
pAddress = GetCallPoint(pAddress);
if (pAddress == NULL) { DbgPrint("MiUnloadSystemImage 2 faild!\n"); return STATUS_UNSUCCESSFUL; }
/* PAGE:000000014049C5CF 48 8B CB mov rcx, rbx PAGE:000000014049C5D2 E8 31 29 C2 FF call MiProcessLoaderEntry PAGE:000000014049C5D7 8B 05 A3 BC F0 FF mov eax, cs:PerfGlobalGroupMask PAGE:000000014049C5DD A8 04 test al, 4 */
pAddress = GetUndocumentFunctionAddress(NULL, pAddress, code2, 9, 0x300, 0x60, 3, FALSE);
if (pAddress == NULL) { DbgPrint("MiProcessLoaderEntry 1 faild!\n"); return STATUS_UNSUCCESSFUL; }
g_pfnMiProcessLoaderEntry = (MiProcessLoaderEntry)GetCallPoint(pAddress);
if (g_pfnMiProcessLoaderEntry == NULL) { DbgPrint("MiProcessLoaderEntry 2 faild!\n"); return STATUS_UNSUCCESSFUL; }
//DbgBreakPoint();
DbgPrint("0x%p\n", g_pfnMiProcessLoaderEntry);
/*////////////////////////////////隐藏驱动/////////////////////////////////*/ g_pfnMiProcessLoaderEntry(pTargetDriverObject->DriverSection, 0);
pTargetDriverObject->DriverSection = NULL; /*/////////////////////////////////////////////////////////////////////////*/
// 破坏驱动对象特征 pTargetDriverObject->DriverStart = NULL; pTargetDriverObject->DriverSize = NULL; pTargetDriverObject->DriverUnload = NULL; pTargetDriverObject->DriverInit = NULL; pTargetDriverObject->DeviceObject = NULL;
return STATUS_SUCCESS; }
|
能力值:
( LV4,RANK:50 )
|
-
-
11 楼
如果从invertedfunctiontable 里去掉自身,可对某些使用了SAFESEH的驱动触发异常的时候会有影响。
|
能力值:
( LV12,RANK:760 )
|
-
-
12 楼
wowocock
如果从invertedfunctiontable 里去掉自身,可对某些使用了SAFESEH的驱动触发异常的时候会有影响。
IFT不能去掉,X64没纯粹SEH了。内存访问蓝屏怀疑人生
|
能力值:
( LV5,RANK:60 )
|
-
-
13 楼
cvcvxk
IFT不能去掉,X64没纯粹SEH了。内存访问蓝屏怀疑人生
no no no if usermode memory you maybe 被打脸了 haha
|
能力值:
( LV12,RANK:760 )
|
-
-
14 楼
放学打我不
no no no if usermode memory you maybe 被打脸了 haha
usermode一样炸裂全身,try没了,该炸一样炸
|
能力值:
( LV5,RANK:60 )
|
-
-
15 楼
cvcvxk
usermode一样炸裂全身,try没了,该炸一样炸
老v多想想法子啊,肯定有方法的 no try no seh 稳定读写~
|
能力值:
( LV4,RANK:50 )
|
-
-
16 楼
不光SEH,这种方式下驱动不能被卸载。虽然在代码里写了 pTargetDriverObject->DriverUnload = NULL;,但在WIN10下如果调用NtUnloadDriver 的时候,和WRK里不同的是,WIN10下系统会先读取 DriverObject->DriverStart的PE头里相关信息,由于DriverStart被抹掉导致 RtlImageNtHeader返回EAX为NULL,后面就直接使用该内存导致蓝屏。 AGE:00000001405C0199 48 8B 4B 18 mov rcx, [rbx+18h] ; DriverStart null will cause bsod when unload PAGE:00000001405C019D E8 7E C2 A5 FF call RtlImageNtHeader PAGE:00000001405C01A2 44 0F B7 70 44 movzx r14d, word ptr [rax+44h] 当然这里也看到了微软的坑代码,从WRK开始就有问题。RtlImageNtHeaderEx返回结果NTSTATUS强制变为VOID,到处是不检查返回结果就直接开干。 PIMAGE_NT_HEADERS NTAPI RtlImageNtHeader( PVOID Base ) { PIMAGE_NT_HEADERS NtHeaders = NULL; (VOID)RtlImageNtHeaderEx(RTL_IMAGE_NT_HEADER_EX_FLAG_NO_RANGE_CHECK, Base, 0, &NtHeaders); return NtHeaders; } NTSTATUS NTAPI RtlImageNtHeaderEx( ULONG Flags, PVOID Base, ULONG64 Size, OUT PIMAGE_NT_HEADERS * OutHeaders ) { PIMAGE_NT_HEADERS NtHeaders = 0; ULONG e_lfanew = 0; BOOLEAN RangeCheck = 0; NTSTATUS Status = 0; const ULONG ValidFlags = RTL_IMAGE_NT_HEADER_EX_FLAG_NO_RANGE_CHECK;
if (OutHeaders != NULL) { *OutHeaders = NULL; } if (OutHeaders == NULL) { Status = STATUS_INVALID_PARAMETER; goto Exit; } if ((Flags & ~ValidFlags) != 0) { Status = STATUS_INVALID_PARAMETER; goto Exit; } if (Base == NULL || Base == (PVOID)(LONG_PTR)-1) { Status = STATUS_INVALID_PARAMETER; goto Exit; } 。。。 Exit: if (NT_SUCCESS(Status)) { *OutHeaders = NtHeaders; } return Status; }
|
能力值:
( LV5,RANK:60 )
|
-
-
17 楼
wowocock
不光SEH,这种方式下驱动不能被卸载。虽然在代码里写了 pTargetDriverObject->DriverUnload = NULL;,但在WIN10下如果调用NtUnloadD ...
佩服wk老师。~
|
能力值:
( LV2,RANK:10 )
|
-
-
18 楼
pTargetDriverObject->DriverSection = NULL;这个一样蓝到怀疑人生。如果只想让pch扫不到的话: //摘除驱动目录链表 //摘除设备目录链表 //摘除TypeList链表 //摘除模块链表 就可以了。
|
能力值:
( LV2,RANK:10 )
|
-
-
19 楼
Mark
|
能力值:
( LV2,RANK:10 )
|
-
-
20 楼
mark
|
能力值:
( LV2,RANK:10 )
|
-
-
21 楼
放学打我不
特征码自己找 忘了这个哪个系统的了
#include "HideDiver.h"
#pragma warning(disable : 4047)
typedef ...
值得深究
最后于 2018-8-28 18:07
被老坛酸菜TM编辑
,原因:
|
能力值:
( LV2,RANK:10 )
|
-
-
22 楼
PatchGuard不止保护代码,还保护数据,驱动断链就不会触发PatchGuard吗? 如果说Win7驱动断链不会蓝屏,试问微软的Win10会不会加强PatchGuard?
|