[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[系统相关] 批处理版杀毒软件

本帖最后由 xinglifan 于 2015-2-9 12:35 编辑

二楼开始发帖,现在我们来分析X星批处理版的代码!
  1. @echo off
  2. color 2a
  3. :start
  4. md 模块
  5. if not exist "模块\Ringxing.dll" fsutil file Createnew "模块\Ringxing.dll" 8513142 >nul
  6. if not exist "模块\Shadu.dll" fsutil file Createnew "模块\Shadu.dll" 13854000 >nul
  7. if not exist "模块\update.dll" fsutil file Createnew "模块\update.dll" 357000 >nul
  8. del /s /f /q "卸载.bat"
  9. echo @echo off  >>卸载.bat
  10. echo del /f /s /q "模块\Ringxing.dll" >>卸载.bat
  11. echo del /f /s /q "模块\Shadu.dll"  >>卸载.bat
  12. echo del /f /s /q "模块\update.dll"  >>卸载.bat
  13. echo echo 卸载成功 >>卸载.bat
  14. echo pause >>卸载.bat
  15. echo del /f /s /q  "卸载.bat"  >>卸载.bat
  16. goto a
  17. :快速杀毒
  18. cls
  19. title 正在杀毒中!!!!!
  20. echo 准备调用模块!!!!
  21. echo 请您稍等,根据硬盘的大小决定时间的长短!!
  22. set c=C:\windows
  23. for /F "tokens=*" %%i in ('dir %c% /A- /B /S') do @(cls && echo %%i && for /L %%k in (1,1,100) do @ver>nul)
  24. :全盘杀毒
  25. cls
  26. echo 准备调用模块!!!!
  27. echo 请您稍等,根据硬盘的大小决定时间的长短!!
  28. set c=C:\
  29. for /F "tokens=*" %%i in ('dir %c% /A- /B /S') do @(cls && echo %%i && for /L %%k in (1,1,100) do @ver>nul)
  30. title 正在杀毒中!!!!!
  31. set c=D:\
  32. for /F "tokens=*" %%i in ('dir %c% /A- /B /S') do @(cls && echo %%i && for /L %%k in (1,1,100) do @ver>nul)
  33. set c=E:\
  34. for /F "tokens=*" %%i in ('dir %c% /A- /B /S') do @(cls && echo %%i && for /L %%k in (1,1,100) do @ver>nul)
  35. set c=F:\
  36. for /F "tokens=*" %%i in ('dir %c% /A- /B /S') do @(cls && echo %%i && for /L %%k in (1,1,100) do @ver>nul)
  37. cls
  38. echo =============================================================
  39. echo 杀毒完成!!!!
  40. echo 发现病毒%random%个!
  41. echo 已经正确清除了!!
  42. echo =============================================================
  43. pause
  44. goto a
  45. :升级程序
  46. cls
  47. echo 检查是否连接互联网……
  48. ping -n 2 [url=http://www.baidu.com/][color=#003366]www.baidu.com[/color][/url]>nul
  49. if errorlevel 1 msg * 互联网连接不通!!!! &goto a
  50. if errorlevel 0 echo 已连接互联网&ping -n 1 127.1>nul
  51. echo 调用升级程序!
  52. ping -n 2 127.0.0.1>nul
  53. ping -n 2 127.0.0.1>nul
  54. ping -n 2 127.0.0.1>nul
  55. ping -n 2 127.0.0.1>nul
  56. echo 网络繁忙,请稍后再试。
  57. pause
  58. goto a
  59. :自定义杀毒
  60. cls
  61. set /p b=请输入您要杀毒的文件(可以把文件拖到窗口中):
  62. title 正在杀毒中!!!!!
  63. for /F "tokens=*" %%i in ('dir %b% /A- /B /S') do @(cls && echo %%i && for /L %%k in (1,1,100) do @ver>nul)
  64. echo =============================================================
  65. echo 恭喜您,没有病毒!!!!
  66. echo =============================================================
  67. pause
  68. goto a
  69. :查看系统信息
  70. echo 您的系统信息 >>系统信息.txt
  71. echo                                            %date%%time% >>系统信息.txt
  72. echo.
  73. for /f "tokens=2 delims=:" %%a in ('ipconfig ^| find /i "IP Address"') do set ip=%%a
  74. set ip=%ip:~1%
  75. echo 当前计算机的IP是: %ip%  >>系统信息.txt
  76. net share | find /i "admin$">nul & if errorlevel 1  (goto 1) else echo 你电脑开启了admin$共享 >>系统信息.txt
  77. :1
  78. net share | find /i "ipc$">nul & if errorlevel 1 (goto 2) else echo 你电脑开启了ipc$共享 >>系统信息.txt
  79. :2
  80. net share | find /i "c:\">nul & if errorlevel 1 (goto 3) else echo 你电脑开启了c$共享 >>系统信息.txt
  81. :3
  82. net share | find /i "d$">nul & if errorlevel 1 (goto 4) else echo 你电脑开启了d$共享 >>系统信息.txt
  83. :4
  84. net share | find /i "e$">nul & if errorlevel 1 (goto 5) else echo 你电脑开启了e$共享 >>系统信息.txt
  85. :5
  86. net share | find /i "f$">nul & if errorlevel 1 (goto 6) else echo 你电脑开启了f$共享 >>系统信息.txt
  87. :6
  88. tasklist | find /i "Vstskmgr.exe">nul
  89. if errorlevel 1 goto 7
  90. echo 你电脑安装的是MCAFee杀毒软件 >>系统信息.txt
  91. :7
  92. tasklist | find /i "nod32kui.exe">nul
  93. if errorlevel 1 goto 8
  94. echo 你电脑安装的是NOD 32杀毒软件 >>系统信息.txt
  95. :8
  96. tasklist | find /i "KAV32.exe">nul
  97. if errorlevel 1 goto 9
  98. echo 你电脑安装的是金山毒霸杀毒软件 >>系统信息.txt
  99. :9
  100. tasklist | find /i "avp.exe">nul
  101. if errorlevel 1 goto 10
  102. echo 你电脑安装的是卡巴斯基杀素软件 >>系统信息.txt
  103. :10
  104. tasklist | find /i "RavTask.exe">nul
  105. if errorlevel 1 goto 11
  106. echo 你电脑安装的是瑞星杀毒软件 >>系统信息.txt
  107. :11
  108. tasklist | find /i "KvXP.kxp">nul
  109. if errorlevel 1 goto 12
  110. echo 你电脑安装的是江民杀毒软件  >>系统信息.txt
  111. :12
  112. tasklist | find /i "TTPlayer.exe">nul
  113. if errorlevel 1 goto 13
  114. echo 你在播放千千静听 >>系统信息.txt
  115. :13
  116. tasklist | find /i "QQ.exe">nul
  117. if errorlevel 1 goto 14
  118. echo 你在上QQ >>系统信息.txt &goto 15
  119. :14
  120. echo 你现在没有上QQ >>系统信息.txt
  121. :15
  122. tasklist | find /i "iexplore.exe">nul
  123. if errorlevel 1 goto 16
  124. echo 你正在浏览网页 >>系统信息.txt
  125. :16
  126. net start | find /i "telnet">nul
  127. if errorlevel 1 goto 17
  128. echo 你开启了telnet服务(危险) >>系统信息.txt
  129. :17
  130. net start | find /i "Terminal Services">nul
  131. if errorlevel 1 goto w
  132. echo 你开启了远程控制服务Terminal Services(高危险) >>系统信息.txt
  133. :w
  134. systeminfo >>系统信息.txt
  135. for %%i in (c:,d:,e:,f:,g:,h:,i:,j:,k:) do dir /as /ah %%i >>系统信息.txt
  136. start 系统信息.txt
  137. goto a
  138. :退出
  139. exit
  140. :a
  141. cls
  142. set c=
  143. set s=
  144. title 瑞星杀毒软件2008批处理版 专利号为0189-21A1D6E112Q
  145. echo =============================================================
  146. echo                  瑞星杀毒软件2008批处理版
  147. echo                  版本号:20.52.40
  148. echo 请放心使用,本程序已申请国家专利!专利号为0189-21A1D6E112Q
  149. echo 1.全盘杀毒
  150. echo 2.升级程序
  151. echo 3.自定义杀毒
  152. echo 4.快速杀毒
  153. echo 5.查看系统信息
  154. echo 6.退出
  155. echo==============================================================
  156. if not exist "模块\Ringxing.dll" goto start
  157. if not exist "模块\Shadu.dll" goto start
  158. if not exist "模块\update.dll" goto start
  159. set /p s=请选择:
  160. if "%s%"=="1" goto 全盘杀毒
  161. if "%s%"=="2" goto 升级程序
  162. if "%s%"=="3" goto 自定义杀毒
  163. if "%s%"=="5" goto 查看系统信息
  164. if "%s%"=="6" goto 退出
  165. if "%s%" equ "4" goto 快速杀毒
  166. goto a
复制代码
“里面没有检测病毒的代码!”
是用来欺骗新手的,大家注意

现在我来发杀毒代码,仅公布核心代码
del c:\winnt\logo1_.exe
del c:\windows\logo1_.exe
del c:\winnt\0sy.exe
del c:\windows\0sy.exe
del c:\winnt\1sy.exe
del c:\windows\1sy.exe
del c:\winnt\2sy.exe
del c:\windows\2sy.exe
del c:\winnt\3sy.exe
del c:\windows\3sy.exe
del c:\winnt\4sy.exe
del c:\windows\4sy.exe
del c:\winnt\5sy.exe
del c:\windows\5sy.exe
del c:\winnt\6sy.exe
del c:\windows\6sy.exe
del c:\winnt\7sy.exe
del c:\windows\7sy.exe
del c:\winnt\8sy.exe
del c:\windows\8sy.exe
del c:\winnt\9sy.exe
del c:\windows\9sy.exe
del c:\winnt\rundl132.exe
del c:\windows\rundl132.exe
del c:\winnt\logo1_.exe
del c:\windows\logo1_.exe
del c:\windows\vdll.dll
del c:\winnt\vdll.dll
del c:\windows\tdll.dll
del c:\winnt\tdll.dll
del c:\windows\dll.dll
del c:\winnt\dll.dll
del c:\winnt\kill.exe
del c:\windows\kill.exe
del c:\winnt\sws32.dll
del c:\windows\sws32.dll
del c:\winnt\rundl132.exe
del c:\windows\rundl132.exe
del c:\winnt\logo1_.exe
del c:\windows\logo1_.exe
del C:\winnt\system32\Logo1_.exe
del C:\winnt\system32\rundl132.exe
del C:\winnt\system32\bootconf.exe
del C:\winnt\system32\kill.exe
del C:\winnt\system32\sws32.dll
del C:\windows\Logo1_.exe
del C:\windows\rundl132.exe
del C:\windows\bootconf.exe
del C:\windows\kill.exe
del C:\windows\sws32.dll
del C:\windows\dll.dll
del C:\windows\vdll.dll
del c:\windows\tdll.dll
del C:\windows\system32\ShellExt\svchs0t.exe
del C:\windows\system32\Logo1_.exe
del C:\windows\system32\rundl132.exe
del C:\windows\system32\bootconf.exe
del C:\windows\system32\kill.exe
del C:\windows\system32\sws32.dll
del %windir%\system32\drivers\msosmsfpfis64.sys
del %windir%\system32\AUTORUN.INF   
del %windir%\system32\netshare.cmd  
del %windir%\system32\Avpser.cmd   
del %windir%\system32\Taskeep.vbs  
del %windir%\system32\SDGames.exe  
del %Windir%\System32\winfuckjp.exe  
del C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\dden.exe
del %local settings%\temporary Internet Files\Content.IE5\EC5UKR17\tj[1].htm
del %local settings%\temporary Internet Files\Content.IE5\GR8I0NOH\down[1].txt
del %local settings%\temporary Internet Files\Content.IE5\YF9D3U1Z\tempA[1].exe
del %systemroot%\system32\ShuiNiu.exe
del %windir%\System32\uwdx.exe
del %windir%\SYSTEM32\sysrest32.exe
del %windir%\SYSTEM32\sysrest.sys  
del %windir%\TEMP\hya0999.tmp d
del %windir%\Alles-ist-vorbei.exe   
del %windir%\Desktop-shooting.exe   
del %windir%\Hello-Kitty.exe  
del %windir%\BigMac.exe   
del %windir%\Cheese-Burger.exe   
del %windir%\Blaargh.exe  
del %system%\rpc32.exe  
del %system%\run32.exe  
del %system%\sysboot.doc  
del %SystemDir%\Rundll.exe
del %windir%\usp10.dll
del %ProgramFilesDir%\InternetExplorer\Usp10.dll
del %windir%\svchost.exe
del %windir%\system32\drivers\pop.sys
del %windir%\system32\drivers\MVS.exe
del %windir%\system32\drivers\LaunchCd.exe
del %windir%\system32\drivers\Tel.xls.exe
del %windir%\system32\drivers\conime.exe
del %windir%\system32\drivers\toy.exe
del %windir%\system32\drivers\printer.exe
del %windir%\system32\drivers\BootIO.exe e
del %windir%\system32\drivers\WG103.rar
del %windir%\system32\drivers\LP103.RAR
del %windir%\system32\dll.dll
del %windir%\system32\drivers\sys.tmp.exe
del %windir%\system32\drivers\taskkill.bat
del %windir%\system32\shualai.exe  
del %windir%\shualai.exe   
del %windir%\win32.exe   
del %windir%\system32\mppds.exe  
del %windir%\system32\mppds.dll  
del %windir%\system32\winform.exe
del %windir%\system32\winform.dll   
del %windir%\system32\cmddbcs.exe   
del %windir%\system32\cmddbxs.dll   
del %windir%\system32\runouce.exe  
del D:\myplay.pif
del %windir%\system32\AlxRes061124.exe   
del %windir%\system32\scrsys061124.scr  
del %windir%\system\winsys32_061124.dll   
del %windir%\system\scrsys16_061124.scr   
del %windir%\system\winsys16_061124   
del "%ProgramFiles%\DuDu\Speed\dddiemon.dll"
del "%ProgramFiles%\HBClient\hbast.dll"  
del "%ProgramFiles%\HBClient\hbast.exe"  
del "%ProgramFiles%\HBClient\hapast.dll"
del "%ProgramFiles%\Baidu\Toolbar\BaiduBarX.dll"
del "%ProgramFiles%\Yahoo!\Assistant\yNotifier.dll"
del "%ProgramFiles%\Google\Google Toolbar\Component\GoogleToolbarDynamic_mui_zh-CN_EB542374334E1006.dll"
del c:\autorun.inf
del c:\autorun.bat
del %windir%\system32\skvp.sys
del %windir%\system32\原病毒文件名.exe
del %windir%\system\msblast.exe  
del %systemroot%\mstray.exe
del %windir%\temp\muur.exe
del d:\autorun.Vinf
del %System32%\0004f972.sys
del %System32%\tusbkl.fs
del %System32%\tusbkl.k
del d:\setup_16703.exe
del e:\setup_16703.exe
del f:\setup_16703.exe

杀毒只是次要的,主要是来学习的!各位大大教我更高的技术!
X星,走着瞧!

TOP

现在病毒好多都是随机名称,直接del+病毒名字是否太过于简单了?1楼的那个%random%个病毒是在有点那啥....

TOP

原帖由 TX_kakashi 于 2010-7-13 14:49 发表
现在病毒好多都是随机名称,直接del+病毒名字是否太过于简单了?1楼的那个%random%个病毒是在有点那啥....


bat的确太过鸡肋,不够灵活,我会第三方其他杀毒软件的!

TOP

╮(╯▽╰)╭,不知道楼主的意思咯~

TOP

明显不太现实,靠文件名来杀毒

TOP

感觉、、那个、批处理自己干不了多少事情、还是编写啥autorun的把、、

TOP

这个帖子被挖坟了?

7# canyuexiaolang


表示批处理能做的还是比较多的(如果配合PE的话就不用说了),我写的那个小工具起码从现在的反馈看还是可以的……坛子里一直对批处理在win下的系统应用比较少,特别是安全方面。当我们用雪兔,powertools很happy时,不知道有没想过批处理也可以呢?注册表?我们有reg;文件删除?我们有del >;进程结束?我们有taskkill ntsd wmic;权限控制?我们有cacls icacls;中断向量?我们有debug的int调用;权限不够?我们还有PE…………病毒扫尾处理就更不用说了。基本上,利用系统自带的命令行可以搞定大部分病毒。

TOP

谁那么大言不惭,敢说是批处理杀毒鼻祖啊?没人敢这么说打!~
论坛安全方面的作品确实少点,但也是有的:
http://www.bathome.net/search.ph ... bmit=yes&page=1
http://www.bathome.net/search.ph ... bmit=yes&page=1
寂寞是黑白的,但黑白不是寂寞,是永恒。BAT 需要的不是可能,而是智慧。

TOP

9# else


我的最初版本就是利用md5对此的,和现在某卫士判定方法一样,但是效率不能比,所以放弃了。

TOP

一年前的帖子呀……

TOP

谁挖的帖子....这个批处理我制作出来就是玩玩的...现在都没备份了..........

TOP

如果用楼主这个,还不如用360杀毒,哈哈

TOP

返回列表