阅读:2855回复:19
不过把杀软隐藏起来让那些Ring3的傻木马找不到也好
.386
.model flat, stdcall option casemap:none ;---------------------------------------------------------------------------------------------------- ; I N C L U D E F I L E S ;---------------------------------------------------------------------------------------------------- include d:\masm32\include\w2k\ntstatus.inc include d:\masm32\include\w2k\ntddk.inc include d:\masm32\include\w2k\native.inc include d:\masm32\include\w2k\ntoskrnl.inc includelib d:\masm32\lib\w2k\ntoskrnl.lib include d:\masm32\Macros\Strings.mac m2m MACRO M1, M2 push M2 pop M1 ENDM ;---------------------------------------------------------------------------------------------------- ; D A T A ;---------------------------------------------------------------------------------------------------- .data ;保存地址 dwOldNtQuerySystemInformation dd ? dwAddr dd ? ;---------------------------------------------------------------------------------------------------- ; C O N S T A N T S ;---------------------------------------------------------------------------------------------------- .const CCOUNTED_UNICODE_STRING "\\Device\\devHideprocess", g_usDeviceName, 4 CCOUNTED_UNICODE_STRING "\\??\\slHideprocess", g_usSymbolicLinkName, 4 CCOUNTED_UNICODE_STRING "Ravmon.exe", processname1, 4 CCOUNTED_UNICODE_STRING "RfwMain.exe", processname2, 4 CCOUNTED_UNICODE_STRING "CCenter.exe", processname3, 4 CCOUNTED_UNICODE_STRING "Ravmond.exe", processname4, 4 ;---------------------------------------------------------------------------------------------------- ; C O D E ;---------------------------------------------------------------------------------------------------- .code NewNtQuerySystemInformation proc SysInfoClass,lpSysInfo,SysInfoL,Return local flag invoke NtQuerySystemInformation,SysInfoClass,lpSysInfo,SysInfoL,Return pushad test eax,eax jnz exit .if SysInfoClass == SystemProcessesAndThreadsInformation mov esi,lpSysInfo mov ebx,esi add esi,[esi] @@: add esi,38h ;在38h偏移处取得进程名字。 m2m flag,0 invoke RtlCompareUnicodeString,addr processname1, esi, 1 .if eax == 0 m2m flag,1 .endif invoke RtlCompareUnicodeString,addr processname2, esi, 1 .if eax == 0 m2m flag,1 .endif invoke RtlCompareUnicodeString,addr processname3, esi, 1 .if eax == 0 m2m flag,1 .endif invoke RtlCompareUnicodeString,addr processname4, esi, 1 .if eax == 0 m2m flag,1 .endif .if flag== 1 invoke DbgPrint, $CTA0("\nsuccessful \n") .if dword ptr[esi-38h] == 0 mov dword ptr[ebx],0 jmp exit .else sub esi,38h mov edx,[esi] add [ebx],edx add esi,[esi] jmp @B .endif .else sub esi,38h cmp dword ptr[esi],0 jz exit mov ebx,esi add esi,[esi] jmp @B .endif .endif exit: popad ret NewNtQuerySystemInformation endp ;---------------------------------------------------------------------------------------------------- ; H O O K F U N C ;---------------------------------------------------------------------------------------------------- HookFunction proc pushad ; int 3 ; invoke DbgPrint, $CTA0("\nEntry into hoookfunction\n") ;下面是用KeServiceDescriptorTabled导出符号获得数组的基地址,这个数组中包含有NtXXXX函数的入口地址。 mov eax, [KeServiceDescriptorTable] mov esi, [eax] mov esi, [esi] ;下面五句为获取ZwQuerySystemInformation的地址 mov eax,ZwQuerySystemInformation inc eax inc eax mov eax,[eax] mov eax,[eax] inc eax movzx ecx,byte ptr[eax] sal ecx,2 add esi,ecx mov dwAddr,esi mov edi,dword ptr[esi] ;保存旧的函数地址。 mov dwOldNtQuerySystemInformation,edi mov edi,offset NewNtQuerySystemInformation ;修改入口地址 cli mov dword ptr[esi],edi sti popad mov eax, STATUS_SUCCESS ret HookFunction endp ;---------------------------------------------------------------------------------------------------- ; DriverUnload ;---------------------------------------------------------------------------------------------------- DriverUnload proc pDriverObject:PDRIVER_OBJECT ;必须保存环境,否则后果很严重。在这个函数中恢复被修改的地址。 pushad ; int 3 ; invoke DbgPrint, $CTA0("\nEntry into DriverUnload \n") mov esi,dwAddr mov eax,dwOldNtQuerySystemInformation cli mov dword ptr[esi],eax sti invoke IoDeleteSymbolicLink, addr g_usSymbolicLinkName mov eax,pDriverObject invoke IoDeleteDevice, (DRIVER_OBJECT PTR [eax]).DeviceObject popad ret DriverUnload endp ;---------------------------------------------------------------------------------------------------- ; D R I V E R E N T R Y ;---------------------------------------------------------------------------------------------------- DriverEntry proc pDriverObject:PDRIVER_OBJECT, pusRegistryPath:PUNICODE_STRING local status:NTSTATUS local pDeviceObject:PDEVICE_OBJECT ; int 3 ; invoke DbgPrint, $CTA0("\nEntry into DriverEntry\n") mov status, STATUS_DEVICE_CONFIGURATION_ERROR invoke IoCreateDevice, pDriverObject, 0, addr g_usDeviceName, FILE_DEVICE_UNKNOWN, 0, FALSE, addr pDeviceObject .if eax == STATUS_SUCCESS mov eax, pDriverObject assume eax:ptr DRIVER_OBJECT mov [eax].DriverUnload, offset DriverUnload assume eax:nothing invoke HookFunction mov status, STATUS_SUCCESS .endif mov eax, status ret DriverEntry endp end DriverEntry |
|
|
沙发#
发布于:2007-04-05 21:23
为啥要隐藏瑞星这个更傻的软件呢
|
|
|
板凳#
发布于:2007-04-06 09:17
想法有创意,以彼之道还施彼身。。。。。。
|
|
|
地板#
发布于:2007-04-06 09:40
引用第1楼WQXNETQIQI于2007-04-05 21:23发表的“”: 因为好从坏软盯着它呢 |
|
|
地下室#
发布于:2007-04-06 09:41
精神可嘉,不过用汇编好象不太可取...
基本上没移植性... |
|
|
5楼#
发布于:2007-04-06 10:43
去跟Dge说吧,代码是他的,俺是修改了一下而已!
移植?楼上用的是康柏Alpha? |
|
6楼#
发布于:2007-04-06 10:50
不要说康柏了.现在主流的你也得重写一次..
|
|
|
7楼#
发布于:2007-04-06 12:41
用小白级ssdt hook,恐怕会被不少傻木马的作者嘲笑呢
|
|
|
8楼#
发布于:2007-04-06 15:02
最烦这种自以为很牛的人了,实则肚中空空!
|
|
9楼#
发布于:2007-04-06 15:39
最烦这种觉得别人都是肚中空空,而自己则是博学多才,实则是一堆大便!
|
|
|
10楼#
发布于:2007-04-06 16:08
支持zjjmj2002 兄弟
有大便也是好事,拉出去会饿,总比没有强 |
|
|
11楼#
发布于:2007-04-06 16:38
是Dge的源代码,不是俺的,不然俺怎么会生气,呵呵!
|
|
12楼#
发布于:2007-04-08 15:08
引用第7楼WQXNETQIQI于2007-04-06 12:41发表的“”: 一个小白问题: WQXNETQIQI 是 麻将 么? |
|
|
13楼#
发布于:2007-04-08 15:54
不是麻将,是桥牌
|
|
|
14楼#
发布于:2007-04-08 16:54
晕死
|
|
|
15楼#
发布于:2007-04-08 16:56
据传说ring3木马已经开始用ZwOpenProcess枚举进程了,还有带驱动用pscid枚举的~
这年头隐藏进程,嘿嘿太难了~ |
|
|
16楼#
发布于:2007-04-08 20:27
把杀软的进程结束了,不就是自我暴露么,真不知道那些编程的是怎么想的?
比女人的心思都难猜的说? |
|
17楼#
发布于:2007-04-14 23:50
呵呵,支持zjjmj2002
WQXNETQIQI也放点东西出来看看啊 |
|
18楼#
发布于:2007-04-19 23:48
把杀软的进程结束了,不就是自我暴露么,真不知道那些编程的是怎么想的?
比女人的心思都难猜的说? ———————————————————————— 熊猫都能写出来,还有什么是不可以做的~ |
|
19楼#
发布于:2007-04-24 10:53
晕,开茶馆啊?
|
|