Linux中国 Linux中国门户站!
设为主页 设为主页
收藏本站 收藏本站
 
当前位置 :首页 ->操作系统 ->注册表 ->正文

修改注册表权限加强对木马、病毒的防范

来源:Linuxdby.com 作者:Webmaster 时间:2007-05-28 点击: [收藏] [投稿]

@echo #     
@echo #注意事项: 
@echo #    某些安装程序也会用到以上注册表键,请在安装前运行本程序,
@echo #    然后选择2,恢复默认设置。安装完成后,重新运行本程序,
@echo #    然后选择1,实施反特洛伊木马保护
@echo ==============================================================
@echo.
@echo 按任意键,返回选择
@pause>nul 2>nul
@cls
@goto Selection
:install
@set OP=/grant everyone /read  /p:no_dont_copy
@goto Doit
:uninstall
@set OP=/revoke everyone /read  /p:yes
@goto Doit

:Doit
@echo.
@echo 正在执行操作...
@rem HKLM
@setacl machine\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /registry %OP%>nul 2>nul
@setacl machine\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /registry %OP%>nul 2>nul
@setacl machine\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices /registry %OP%>nul 2>nul
@setacl machine\SOFTWARE\Microsoft\Windows\CurrentVersion\RunEX /registry %OP%>nul 2>nul
@setacl machine\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEX /registry %OP%>nul 2>nul
@setacl machine\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServicesEx /registry %OP%>nul 2>nul

@rem HKCU
@setacl CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /registry %OP%>nul 2>nul
@setacl CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /registry %OP%>nul 2>nul
@setacl CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices /registry %OP%>nul 2>nul
@setacl CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunEX /registry %OP%>nul 2>nul
@setacl CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEX /registry %OP%>nul 2>nul
@setacl CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServicesEx /registry %OP%>nul 2>nul
@setacl CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServicesOnce /registry %OP%>nul 2>nul

@rem USERS
@setacl USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /registry %OP%>nul 2>nul
@setacl USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /registry %OP%>nul 2>nul
@setacl USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices /registry %OP%>nul 2>nul
@setacl USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunEX /registry %OP%>nul 2>nul
@setacl USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEX /registry %OP%>nul 2>nul
@setacl USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServicesEx /registry %OP%>nul 2>nul
@setacl USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServicesOnce /registry %OP%>nul 2>nul

@rem Services
@setacl MACHINE\SYSTEM\CurrentControlSet\Services /registry %OP%>nul 2>nul

@rem CLASSES_ROOT
@setacl CLASSES_ROOT\exefile\shell\open\command /registry %OP%>nul 2>nul
@setacl CLASSES_ROOT\inifile\shell\open\command /registry %OP%>nul 2>nul
@setacl CLASSES_ROOT\txtfile\shell\open\command /registry %OP%>nul 2>nul
@setacl CLASSES_ROOT\comfile\shell\open\command /registry %OP%>nul 2>nul
@setacl CLASSES_ROOT\batfile\shell\open\command /registry %OP%>nul 2>nul
@setacl CLASSES_ROOT\inffile\shell\open\command /registry %OP%>nul 2>nul

@echo 正在更新帐户策略、审核策略......
@REM [刷新本地安全策略]
@%UpdatePolicy%>nul 2>nul
@echo 帐户策略、审核策略更新完成

:complete
@echo 操作完成
@echo.
@echo.
@echo 请按任意键退出。
@pause>nul 2>nul

:quit
@rem Clear
@del %systemroot%\system32\setacl.exe>nul 2>nul
@del %systemroot%\system32\AntiTrojanhorse.bat>nul 2>nul

@ENDLOCAL

 



 如果您对本文有任何疑问或者建议,请到讨论区发表您的意见: >> 论坛入口 <<



上一篇:走出注册表修改的三大误区   下一篇:对注册表进行编辑的三种途径

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章
Power by linux-cn.com 粤ICP备05006655号