能力值:
( LV2,RANK:10 )
|
-
-
2 楼
Breakpoint 2 hit
win32k!ClientLoadLibrary+0xd2:
83815bec ff1578049783 call dword ptr [win32k!_imp__KeUserModeCallback (83970478)]
0: kd> dd 8b61b53c
8b61b53c 00000041(0x41) 8b61b5a4(BaseAddress) 00000098(size) 8b61b594(Return)
8b61b54c(RetLen) 8b61b598 08f9c2e1 83c48ed8 00000000
8b61b55c fe66bb78 00000000 00000000 00026161
8b61b56c 83d3bd20 00010001 8b61b5bc 00010001
8b61b57c 00010001 00000002 00010001 00000001
8b61b58c 00000000 855cbbb0 00000000 005cbbb0
8b61b59c 00000003 8b61b5a4 00000098 00000068
8b61b5ac 00000002 8b61b638 00000028 00000000
0: kd> db 8b61b5a4
8b61b5a4 98 00 00 00 68 00 00 00-02 00 00 00 38 b6 61 8b ....h.......8.a.
8b61b5b4 28 00 00 00 00 00 00 00-3e 00 40 00 30 00 00 00 (.......>.@.0...
8b61b5c4 20 00 22 00 70 00 00 00-1c 00 00 00 24 00 00 00 .".p.......$...
8b61b5d4 43 00 3a 00 5c 00 57 00-69 00 6e 00 64 00 6f 00 C.:.\.W.i.n.d.o.
8b61b5e4 77 00 73 00 5c 00 73 00-79 00 73 00 74 00 65 00 w.s.\.s.y.s.t.e.
8b61b5f4 6d 00 33 00 32 00 5c 00-75 00 78 00 74 00 68 00 m.3.2.\.u.x.t.h.
8b61b604 65 00 6d 00 65 00 2e 00-64 00 6c 00 6c 00 00 00 e.m.e...d.l.l...
8b61b614 54 00 68 00 65 00 6d 00-65 00 49 00 6e 00 69 00 T.h.e.m.e.I.n.i.
|
能力值:
( LV12,RANK:760 )
|
-
-
3 楼
我想你能看懂吧~
这代码就是这个意思:
if(CurrentThread->Tcb.ApcStateIndex != 0 ||
CurrentThread->Tcb.KernelApcDisable!=0)
KeBugCheck2(.....)
|
能力值:
( LV2,RANK:10 )
|
-
-
4 楼
好的 我试试去
|
能力值:
( LV2,RANK:10 )
|
-
-
5 楼
int __stdcall __ClientLoadLibrary(int a1)
{
HMODULE v1; // edi@4
const WCHAR *v2; // eax@5
HMODULE v3; // esi@6
int v4; // edi@6
FARPROC v5; // eax@7
CHAR ProcName; // [sp+18h] [bp-108h]@1
char Dst; // [sp+19h] [bp-107h]@1
unsigned int v9; // [sp+11Ch] [bp-4h]@1
int v10; // [sp+120h] [bp+0h]@1
v9 = (unsigned int)&v10 ^ __security_cookie;
ProcName = 0;
memset(&Dst, 0, 0x103u);
if ( *(_DWORD *)(a1 + 8) && !*(_DWORD *)(a1 + 0x14) )
FixupCallbackPointers(a1);
v1 = LoadLibraryExW(*(LPCWSTR *)(a1 + 0x1C), 0, 8u);
if ( v1 )
{
v2 = *(const WCHAR **)(a1 + 0x24);
if ( v2 )
{
v3 = v1;
v4 = WideCharToMultiByte(0, 0x400u, v2, -1, &ProcName, 260, 0, 0);
if ( !v4 )
goto LABEL_16;
v5 = GetProcAddress(v3, &ProcName);
if ( !v5 || !InitUserApiHook(v3, v5) ) // InitUserApiHook条件不成立 导致Dll被马上卸载了
v4 = 0;
if ( !v4 )
LABEL_16:
FreeLibrary(v3);
}
}
return XyCallbackReturn(0); // 参数1:DLL模块句柄 参数2:DLL导出函数的地址
signed int __stdcall InitUserApiHook(int a1, int a2)
{
signed int v2; // edi@1
_UNKNOWN *v3; // esi@1
unsigned int v5; // [sp+8h] [bp-68h]@1
int v6; // [sp+14h] [bp-5Ch]@7
int v7; // [sp+38h] [bp-38h]@7
int v8; // [sp+48h] [bp-28h]@7
int (__stdcall *v9)(int); // [sp+5Ch] [bp-14h]@5
v2 = 0;
ResetUserApiHook(&v5);
v3 = &gcsUserApiHook;
RtlEnterCriticalSection(&gcsUserApiHook);
if ( !((int (__stdcall *)(_DWORD, unsigned int *))a2)(0, &v5) || v5 <= 0 || v9 != ForceResetUserApiHook )
{
RtlLeaveCriticalSection(&gcsUserApiHook);
return 0;
}
if ( ghmodUserApiHook )
{
if ( ghmodUserApiHook != a1 ) // 这里条件成立了 函数就跳出了 导致DLL被卸载 这里是什么东西不明白?
goto LABEL_9;
++gcLoadUserApiHook;
}
else
{
ghmodUserApiHook = a1;
memcpy(&guah, &v5, 0x64u);
gpfnInitUserApi = a2;
gcLoadUserApiHook = 1;
gfUserApiHook = 1;
CopyMsgMask((int)&unk_77D7978C, (int)&v6, &grgbDwpLiteHookMsg, 128);
CopyMsgMask((int)&unk_77D797B0, (int)&v7, &grgbWndLiteHookMsg, 128);
CopyMsgMask((int)&unk_77D797C0, (int)&v8, &grgbDlgLiteHookMsg, 128);
v3 = &gcsUserApiHook;
}
v2 = 1; // 表示函数成功
LABEL_9:
RtlLeaveCriticalSection(v3);
if ( !v2 )
((void (__stdcall *)(signed int, _DWORD))a2)(1, 0);
return v2;
}
|
能力值:
( LV12,RANK:760 )
|
-
-
6 楼
这个问题DLL里做点处理就好了~
比如DLL里再加载一个DLL~
|
能力值:
( LV2,RANK:10 )
|
-
-
7 楼
搭车同问,我也遇到了这个问题,XP成功WIN7蓝屏。
蓝屏码也是APC_INDEX_MISMATCH,在DLL导出了函数(2个参数,跟你的帖子一样),在DLLMAIN和导出函数里也加载了一个微软的DLL,但还是蓝,求解答。
|
能力值:
( LV2,RANK:10 )
|
-
-
8 楼
pKthread = KeGetCurrentThread();
PSHORT KernelApcDisable = (PSHORT)((ULONG)pKthread + 0x84);
PUCHAR ApcStateIndex = (PUCHAR)((ULONG)pKthread + 0x134);
Original1 = *KernelApcDisable;
Original2 = *ApcStateIndex;
KeUserModeCallback。。。。。。。。。。。。。。。
//恢复APC
*KernelApcDisable = Original1;
*ApcStateIndex = Original2;
|
能力值:
( LV2,RANK:10 )
|
-
-
9 楼
谢谢了。此外,_CLientLoadLibraryParam这个结构体的详细成员,是用WINDBG看的吗?还是用IDA看的?或者是其它神奇的工具?
|
能力值:
( LV2,RANK:10 )
|
-
-
10 楼
IDA+WINDBG
|
|
|