动网论坛,站长建站首选,国内使用量最多的论坛软件 动网论坛官方技术讨论区 站长工具 申请属于您自己的免费论坛
首页 | 新闻资讯 | 网站运营 | 网络编程 | 数据库 | 服务器 | 网页设计 | 图像媒体 | 网络应用 | 搜索优化 | 资源下载 | 动网主机 | DVBOX
    本站内  互联网 ASP论坛  ASP.Net论坛  PHP论坛
   服务器 → 阅读文章
  

 Win2k下进程不死术

作者来源:ChinaITLab  
阅读 数 598 人次 , 2006-3-18 13:39:00 

此段程序采用公开的 Win2k注射远程线程,来保护指定进程始终处于运行状态。 生成wap32.exe拷贝到c:\下运行,则Wap32进程不死。

include Win32.inc

.386

.model flat,stdcall

.data

Protect2kProc proc ProcID: dword

call GetKnlOpenProcess

KnlOpenProcess dd ?

GetKnlOpenProcess:

pop eax

call [eax],PROCESS_ALL_ACCESS,FALSE,ProcID

or eax,eax

jz short ExitProtectProc

mov ebx,eax

call GetKnlWaitForSingleObject

KnlWaitForSingleObject dd ?

GetKnlWaitForSingleObject:

pop eax

call [eax],ebx,-1h

call GetFileNameAddress

GetFileNameAddress:

pop ecx

add ecx,offset FileName-offset GetFileNameAddress

call GetKnlWinExec

KnlWinExec dd ?

GetKnlWinExec:

pop eax

call [eax],ecx,01

ExitProtectProc:

ret

Protect2kProc endp

FileName db 'c:\wap32.exe',0

KnlOpenProcessStr db 'OpenProcess',0

KnlWaitForObjectStr db 'WaitForSingleObject',0

KnlWinExecStr db 'WinExec',0

.code

extrn GetProcAddress: proc

extrn OpenProcess: proc

extrn FindWindowA: proc

extrn GetWindowThreadProcessId: proc

extrn VirtualAllocEx: proc

extrn VirtualFreeEx: proc

extrn WriteProcessMemory: proc

extrn GetCurrentProcessId: proc

extrn CreateRemoteThread: proc

extrn GetExitCodeThread: proc

extrn CloseHandle: proc

extrn WinExec: proc

extrn MessageBoxA: proc

extrn Sleep: proc

Start:

call GetProcAddress,077e60000h,offset KnlOpenProcessStr

mov KnlOpenProcess,eax

call GetProcAddress,077e60000h,offset KnlWaitForObjectStr

mov KnlWaitForSingleObject,eax

call GetProcAddress,077e60000h,offset KnlWinExecStr

mov KnlWinExec,eax

call FindWindowA,0,0

push eax

call GetWindowThreadProcessId,eax,esp

call OpenProcess,PROCESS_ALL_ACCESS,FALSE

or eax,eax

jz short OpenProcessError

mov ebx,eax

call VirtualAllocEx,ebx,NULL,1000h,MEM_COMMIT,L 40h

or eax,eax

jz short OpenProcessError

mov edi,eax

push eax

call WriteProcessMemory,ebx,edi,OFF Protect2kProc,1000h,esp

call GetCurrentProcessId

call CreateRemoteThread,ebx,NULL,NULL,edi,eax,NULL,esp

call GetExitCodeThread,eax,esp

pop eax

;call VirtualFreeEx,ebx,edi,1000h,MEM_DECOMMIT

call CloseHandle,ebx

call Sleep,100h

call MessageBoxA,0,offset FileName,offset FileName,0

OpenProcessError:

ret

end Start

 本文TagsWindows  
 收藏本文  打印本文  论坛讨论  关闭窗口
· 上一篇:Windows进程SID详解
· 下一篇:WIN 9X下查找隐藏进程实现方法
· 用密码重设盘找回丢失的XP密码(1)
· Windows 2003企业版安装篇
· WindowsIIS6安全保护贴—URL授权全攻略(3)
· Windows 2000/XP蓝屏解决实用技巧(下)
· 解析Web接口描述语言WSDL(4)


关于本站 | 联系我们 | 业务合作 | 客户案例 | 诚聘英才 | 广告合作 | 收藏本站
海口动网先锋网络科技有限公司版权所有
Copyright © 2000 - 2006 Cndw.Com
中华人民共和国电信与信息服务业务经营许可证编号 琼 ICP 020077