21cn企业邮箱
咨询热线:0755-83416263转8156  客服直线:17665485825
  搜索:
企业邮箱首页 21CN企业邮箱 体验中心 服务与支持 新闻资讯 渠道代理 人才战略 购买与支付 联系我们
21CN企业邮箱最新动态
剖析企业号第三方应用...
邮件审核 企业不可忽...
21cn企业邮箱为用...
21cn企业邮箱荣获...
邮箱审核 为企业邮箱...
手机企业邮箱 移动办...
汇鑫科技十周年庆典暨...
21cn企业邮箱-2...
企业邮箱未来发展空间...
关于2013年清明节...
您当前的位置:首页> 新闻资讯> 防病毒
打造自己病毒免疫补丁
出处:  发布日期:2007/12/18 8:01:43  点击:3186
 
看到网盟的IGM、IGW发表的病毒免疫补丁,没下下来看,要威望啊!我是穷人,所以打算自己作一个
基本思想是禁止病毒文件创建、禁止病毒文件运行。
禁止病毒文件创建,无非就是在同一目录下创建一个和病毒文件同名的文件夹,再把属性设置为隐藏和只读,如威金,
mkdir %systemroot%\system32\logo1_.exe
attrib +s +h +r %systemroot%\system32\logo1_.exe
就在system32目录下创建一个名为logo1_.exe只读隐藏的文件夹。

第二步就是防止病毒运行,第一种方法是通过组策略,第二种方法就是通过IFEO hijack(映象劫持).
第一种:组策略,我们都知道运行gpedit.msc里修改,但其实这个也可以修改注册表达到一样的效果
reg add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\ /v DisallowRun /t REG_DWORD /d 1 /f
reg add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\DisallowRun\ /v 1 /t REG_SZ /d logo1_.exe 中国.网管联盟
如多个程序,可修改/v后面的1和/d后面的值
secedit /refreshpolicy user_policy /enforce '刷新一下策略
第二种方法:IFEO hijack(映象劫持),简单点说,你要运行这个程序,但却被转到运行另一个程序,这是很多病毒经常使用不让杀毒软件运行的鬼把戏,我们这里用了做免疫补丁了. :)
reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\currentversion\image file execution options\logo1_.exe" /v Debugger /t REG_SZ /d cmd.exe /f '让病毒运行都打开cmd吧,呵呵~

下面是一段测试程序(2000pro下通过):
@Echo Off
title  流行病毒免疫补丁-By n3tl04d

:hitauto
cls
Echo.
Echo                    流行病毒免疫补丁
Echo.
Echo.   
Echo.
Echo                          制作:n3tl04d 中国.网管联盟
Echo                   n3tl04d[at]gmail.com 10492315
Echo.
Echo              本程序运行后给某些流行病毒打上免设补丁
Echo              本程序只是测试使用,功能需自己完善
Echo.
Echo  [1] 打上补丁
Echo  [0] 退出
Echo.
Set /p hitslt= 请输入您的选择(1/0):
If "%hitslt%"=="" Goto hitauto
If "%hitslt%"=="1" Goto hitauto
If "%hitslt%"=="0" Exit

:hitauto
mkdir %systemroot%\system32\logo1_.exe
attrib +s +h +r %systemroot%\system32\logo1_.exe
mkdir %systemroot%\system32\rundl132.exe
attrib +s +h +r %systemroot%\system32\rundl132.exe
reg add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\ /v DisallowRun /t REG_DWORD /d 1 /f
reg add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\DisallowRun\ /v 1 /t REG_SZ /d logo1_.exe /f
reg add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\DisallowRun\ /v 2 /t REG_SZ /d rundl132.exe /f
bitscn.com

reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\currentversion\image file execution options\logo1_.exe" /v Debugger /t REG_SZ /d cmd.exe /f
reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\currentversion\image file execution options\rundl132.exe" /v Debugger /t REG_SZ /d cmd.exe /f
secedit /refreshpolicy user_policy /enforce
echo 免疫完成 &&pause



以前写的东东

IFEO hijack(映象劫持)相关技术背景
Image File Execution Options (IFEO in short)

You can set up your application to start Visual Studio when you launch the application from Windows. Visual Studio will load your application, ready for debugging, but will not commence debugging until you issue an execution command. Having Visual Studio launch the debugger in this way is useful for debugging services and COM out-of-proc servers.

To setup an application to launch the debugger automatically 中国网管联盟

Start the Registry Editor (regedit).
In the Registry Editor, open the HKEY_LOCAL_MACHINE folder.
Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\currentversion\image file execution options.
Under the Image File Execution Options folder, locate the name of the application you want to debug (myapp.exe, for example). If you cannot find the application you want to debug:
Right-click the Image File Execution Options folder and choose New Key from the shortcut menu.
Right-click the new key and choose Rename from the shortcut menu.
Edit the key name to the name of your application, for example, myapp.exe.
Right-click the myapp.exe folder and choose New String Value from the shortcut menu.
Right-click the new string value and choose Rename from the shortcut menu.
Change the name to debugger.
Right-click the new string value and choose Modify from the shortcut menu.
The Edit String dialog box appears.

In the Value data box, type devenv /debugexe. DL.bitsCN.com网管软件下载
Click OK.
From the Registry menu, choose Exit.
The directory containing devenv.exe must be in your system path.

Now, use any method to start your application. Visual Studio .NET will start and load the application.

Note     If the application is managed, Visual Studio launches with the Debugger Type set to Auto. Before you debug, change the Debugger Type from Auto to Mixed in the Property Pages dialog box. For more information, see Specifying Debugger Settings.
See Also
[返回]
 
让我们的客服来与您联系
联系21CN企业邮箱
客服:0755-83416263转8156
邮箱:6036@160it.com
MICROSOFT ...
21cn企业邮箱Fo...
域名是由其他服务商提...
OUTLOOK EX...
mx记录指向\pop...
21CN企业邮箱成功案例
网站建设|电子商务|...
广州证券有限责任公司
中国大酒店
工商银行广东省分行
中国包装进出口广东公...
雅芳(中国)有限公司
广东电网
壳牌石油
版权所有@2006-2024 21CN企业邮箱服务中心-华腾云计算 粤ICP备08006777号 | 支付方式 | 在线查询 | 使用帮助 | 使用条款 | 友情链接