特邀体验者
- 帖子:4192
- 注册:
2007-11-06
- 来自:
|
发表于:
2014-10-18 20:42
|
显示全部
短消息
资料
参考一下啊
任何主动防御产品是少不了各种hook的最近听说xxx比较不错了偶也来看看把分析版本为mp.090212.1.2.10580.0171.r1.zip mp.090212.1.2.10580.0171.r1.zip mp.090212.1.2.10580.0171.r1.exe
| 3b8b0b715a69dec10798e70c00d79d91 ea1c667ec4ca4d1480959971a895cf27
|
| 并且升级到今天的最新版本1.xxx没有使用SSDT table的hookshadow ssdt的table也一样没有hook,使用的是inline hook,这样增加了绕过难度,当然不是不可以绕过以下只是部分hook,这是最容易被发现的ntfs.sys-->ntoskrnl.exe-->MmFlushImageSection, Type: IAT modification 0xF98B6CD0 [mp110003.sys]ntfs.sys-->ntoskrnl.exe-->IoCheckShareAccess, Type: IAT modification 0xF98B6D10 [mp110003.sys]ntoskrnl.exe-->IoRegisterDriverReinitialization, Type: EAT modification 0x80684964 [mp110003.sys]ntoskrnl.exe-->IofCallDriver, Type: EAT modification 0x8068434C [mp110003.sys]ntoskrnl.exe-->KeInsertQueueApc, Type: EAT modification 0x80684B78 [mp110003.sys]ntoskrnl.exe-->MmGetSystemRoutineAddress, Type: EAT modification 0x80684D48 [mp110003.sys]ntoskrnl.exe-->MmUnmapViewOfSection, Type: EAT modification 0x80684E0C [mp110003.sys]ntoskrnl.exe-->ObReferenceObjectByName, Type: EAT modification 0x80684F68 [mp110003.sys]ntoskrnl.exe-->PsCreateSystemThread, Type: EAT modification 0x80684FEC [mp110003.sys]ntoskrnl.exe-->PsSetCreateProcessNotifyRoutine, Type: EAT modification 0x806850EC [mp110003.sys]ntoskrnl.exe-->PsSetCreateThreadNotifyRoutine, Type: EAT modification 0x806850F0 [mp110003.sys]ntoskrnl.exe-->PsSetLoadImageNotifyRoutine, Type: EAT modification 0x806850FC [mp110003.sys]2.xxx增加了object hook部分Key object-->CloseProcedure, Type: Kernel Object [mp110009.sys]3.用户模式下hook了[728]lsass.exe-->kernel32.dll-->CreateProcessA, Type: Inline - RelativeJump 0x7C802378 [kernel32.dll][728]lsass.exe-->advapi32.dll-->OpenServiceW, Type: Inline - DirectCall 0x77DB6FDD [unknown_code_page][728]lsass.exe-->advapi32.dll-->OpenServiceA, Type: Inline - DirectCall 0x77DC4C36 [unknown_code_page]下面就是xxx的hook比较有意思的部分了,对于函数使用深处inline hook替换其call的地址这里只能使用yas的antirootkit才能识别出被hook的原始函数虽然icesword可以显示出hook,但是对应函数无法取得随便取一个ntsuspendthread来查看 805e145e 6a20 push 20h805e1460 6850925180 push offsexxx!ObWatchHandles+0x79c (80519250)805e1465 e8d11ff0ff call nt!_SEH_prolog (804e343b)805e146a 33db xor ebx,ebx805e146c 895dfc mov dword ptr [ebp-4],ebx805e146f 64a124010000 mov eax,dword ptr fs:[00000124h]805e1475 8945d0 mov dword ptr [ebp-30h],eax805e1478 8a8040010000 mov al,byte ptr [eax+140h]805e147e 8845e0 mov byte ptr [ebp-20h],al805e1481 8b750c mov esi,dword ptr [ebp+0Ch]805e1484 3ac3 cmp al,bl805e1486 7415 je nt!NtSuspendThread+0x3d (805e149d)805e1488 3bf3 cmp esi,ebx805e148a 7411 je nt!NtSuspendThread+0x3d (805e149d)805e148c a1d40b5680 mov eax,dword ptr [nt!MmUserProbeAddress (80560bd4)]805e1491 3bf0 cmp esi,eax805e1493 0f83e7ad0100 jae nt!NtSuspendThread+0x37 (805fc280)805e1499 8b06 mov eax,dword ptr [esi]805e149b 8906 mov dword ptr [esi],eax805e149d 834dfcff or dword ptr [ebp-4],0FFFFFFFFh805e14a1 53 push ebx805e14a2 8d45e4 lea eax,[ebp-1Ch]805e14a5 50 push eax805e14a6 ff75e0 push dword ptr [ebp-20h]805e14a9 ff355c245680 push dword ptr [nt!PsThreadType (8056245c)]805e14af 6a02 push 2805e14b1 ff7508 push dword ptr [ebp+8]805e14b4 e8933d0501 call 8163524c805e14b9 3bc3 cmp eax,ebx805e14bb 7c2c jl nt!NtSuspendThread+0xb9 (805e14e9)805e14bd 8d45dc lea eax,[ebp-24h]805e14c0 50 push eax805e14c1 ff75e4 push dword ptr [ebp-1Ch]805e14c4 e82d000000 call nt!PsSuspendThread (805e14f6)805e14c9 8bf8 mov edi,eax805e14cb 8b4de4 mov ecx,dword ptr [ebp-1Ch]805e14ce e87d8befff call nt!ObfDereferenceObject (804da050)805e14d3 c745fc01000000 mov dword ptr [ebp-4],1805e14da 3bf3 cmp esi,ebx805e14dc 7405 je nt!NtSuspendThread+0x99 (805e14e3)805e14de 8b45dc mov eax,dword ptr [ebp-24h]805e14e1 8906 mov dword ptr [esi],eax805e14e3 834dfcff or dword ptr [ebp-4],0FFFFFFFFh805e14e7 8bc7 mov eax,edi805e14e9 e8881ff0ff call nt!_SEH_epilog (804e3476)805e14ee c20800 ret 8805e14f1 90 nop805e14f2 90 nop805e14b4 e8933d0501 call 8163524c这儿就是hook部分查看8163524c 55 push ebp8163524d 8bec mov ebp,esp8163524f 83ec10 sub esp,10h81635252 bdc4c496f9 mov ebp,0F996C4C4h81635257 892c24 mov dword ptr [esp],ebp8163525a 8b6c2410 mov ebp,dword ptr [esp+10h]8163525e c21000 ret 10h81635261 55 push ebp81635262 8bec mov ebp,esp81635264 83ec10 sub esp,10h81635267 bd24c496f9 mov ebp,0F996C424h8163526c 892c24 mov dword ptr [esp],ebp8163526f 8b6c2410 mov ebp,dword ptr [esp+10h]81635273 c21000 ret 10h81635276 55 push ebp81635277 8bec mov ebp,esp81635279 83ec10 sub esp,10h8163527c bdc4c496f9 mov ebp,0F996C4C4h81635281 892c24 mov dword ptr [esp],ebp81635284 8b6c2410 mov ebp,dword ptr [esp+10h]81635288 c21000 ret 10h8163528b 55 push ebp8163528c 8bec mov ebp,esp8163528e 83ec10 sub esp,10h81635291 bd10c596f9 mov ebp,0F996C510h81635296 892c24 mov dword ptr [esp],ebp81635299 8b6c2410 mov ebp,dword ptr [esp+10h]8163529d c21000 ret 10h816352a0 55 push ebp816352a1 8bec mov ebp,esp816352a3 83ec10 sub esp,10h816352a6 bd80c596f9 mov ebp,0F996C580h816352ab 892c24 mov dword ptr [esp],ebp816352ae 8b6c2410 mov ebp,dword ptr [esp+10h]816352b2 c21000 ret 10h816352b5 55 push ebp816352b6 8bec mov ebp,esp816352b8 83ec10 sub esp,10h816352bb bd80c596f9 mov ebp,0F996C580h816352c0 892c24 mov dword ptr [esp],ebp816352c3 8b6c2410 mov ebp,dword ptr [esp+10h]816352c7 c21000 ret 10h816352ca 55 push ebp816352cb 8bec mov ebp,esp816352cd 83ec10 sub esp,10h816352d0 bd80c596f9 mov ebp,0F996C580h816352d5 892c24 mov dword ptr [esp],ebp816352d8 8b6c2410 mov ebp,dword ptr [esp+10h]816352dc c21000 ret 10h816352df 55 push ebp816352e0 8bec mov ebp,esp816352e2 83ec10 sub esp,10h816352e5 bd80c596f9 mov ebp,0F996C580h816352ea 892c24 mov dword ptr [esp],ebp816352ed 8b6c2410 mov ebp,dword ptr [esp+10h]816352f1 c21000 ret 10h816352f4 55 push ebp816352f5 8bec mov ebp,esp816352f7 83ec10 sub esp,10h816352fa bda2c696f9 mov ebp,0F996C6A2h816352ff 892c24 mov dword ptr [esp],ebp81635302 8b6c2410 mov ebp,dword ptr [esp+10h]81635306 c21000 ret 10h81635309 55 push ebp8163530a 8bec mov ebp,esp8163530c 83ec10 sub esp,10h8163530f bd788e96f9 mov ebp,0F9968E78h81635314 892c24 mov dword ptr [esp],ebp81635317 8b6c2410 mov ebp,dword ptr [esp+10h]8163531b c21000 ret 10h可以看见是整齐的hook转发表另外 xxx有一个有意思的功能,如果你的驱动中包含以下函数,他会把你驱动的IAT指向xxx的hookIoRegisterDriverReinitialization, IofCallDriver, KeInsertQueueApc, MmGetSystemRoutineAddress, MmUnmapViewOfSection,ObReferenceObjectByName,PsCreateSystemThread, PsSetCreateProcessNotifyRoutine, PsSetCreateThreadNotifyRoutine,总体上 xxx的hook做到还是不错了,虽然不能说完美无缺开始做到object hook部分了,貌似是比较领先的?不过偶不能绝对的说inline hook比table方式好当然这是需要大大增加编程功力的说。。差点忘记了。有一个奇怪的问题,xxx会挂接icesword的设备?挂接disk的设备不奇怪。。挂接isdrv122干嘛? 可见IRP的各种dispatch只要原始驱动中没有填充成NULL的全部进入了xxx。无语,监控irp偶不知道有啥作用。文件系统和网络,还有键盘AttachedDevice \FileSystem\Ntfs \Ntfs mp110010.sys (mp110010/Micropoint Corporation)AttachedDevice \Driver\Tcpip \Device\Ip mp110006.sys (mp110006/Micropoint Corporation)AttachedDevice \Driver\Tcpip \Device\Tcp mp110006.sys (mp110006/Micropoint Corporation)AttachedDevice \Driver\Tcpip \Device\Udp mp110006.sys (mp110006/Micropoint Corporation)AttachedDevice \Driver\Tcpip \Device\RawIp mp110006.sys (mp110006/Micropoint Corporation)AttachedDevice \Driver\Kbdclass \Device\KeyboardClass0 mp110003.sys (mp110003/Micropoint Corporation)AttachedDevice \Driver\Kbdclass \Device\KeyboardClass1 mp110003.sys (mp110003/Micropoint Corporation)用户系统信息:Mozilla/5.0 (Windows NT 6.3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36 LBBROWSER
君素雅达,必不致令我徒劳往返也
|