1. 禁止explorer.exe读取autorun.inf (HIPS之FD)
2. 禁止explorer.exe写入MountPoints2的shell下面的open、explorer、autorun、command等项
,即:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\*\shell\autorun
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\*\shell\explorer
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\*\shell\*\Command
4. 用沙盘限制 (DW的非信任、SBie的强制运行等等)
5. 自定义有害文件:autorun.inf (一些杀软可以做到,例如咖啡8.5i)
[autorun]
OPEN=NOTEPAD.exe
shell\open=打开(&O)
shell\open\Command=NOTEPAD.exe
shell\open\Default=1
shell\explore=资源管理器(&X)
shell\explore\Command=NOTEPAD.exe
icon=game.ico
[2 8 19]
rem setacl:设置 -----------------------------
rem CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run: 当前用户注册表分支启动RUN键值
rem registry:类型为注册表
rem deny:项目为拒绝访问
rem administrator:访问对象为administrator
rem full:权限是:完全访问
rem 简单的讲这句话的意思就是:
rem 将注册表HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run键值设置为administrator用户无法访问
rem 项目有四种 deny(拒绝) grant(允许) set(设置) revoke(撤消)
rem 权限有两种 FULL 完全访问 READ 只读访问
rem 所以我们要恢复上面被拒绝的项只需要用一下下面的命令:
rem setacl CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run /registry /grant administrator /full
rem 下面是各个主分支开头部分的对照:
rem setacl machine\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /registry /deny administrator /full
rem setacl USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
rem setacl MACHINE\SYSTEM\CurrentControlSet\Services /registry
rem setacl CLASSES_ROOT\exefile\shell\open\command
rem setacl CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2 /registry /deny everyone /full
rem 解释:
rem setacl:程序
rem CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run: 当前用户注册表分支启动RUN键值
rem registry:类型为注册表
rem deny:项目为拒绝访问
rem administrator:访问对象为administrator
rem full:权限是:完全访问
rem 简单的讲这句话的意思就是:
rem 将注册表HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run键值设置为administrator用户无法访问
rem 项目有四种 deny(拒绝) grant(允许) set(设置) revoke(撤消)
rem 权限有两种 FULL 完全访问 READ 只读访问
rem 所以我们要恢复上面被拒绝的项只需要用一下下面的命令:
rem setacl CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run /registry /grant administrator /full
rem 下面是各个主分支开头部分的对照:
rem setacl machine\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /registry /deny administrator /full
rem setacl USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
rem setacl MACHINE\SYSTEM\CurrentControlSet\Services /registry
rem setacl CLASSES_ROOT\exefile\shell\open\command
所以,要禁止autorun.inf文件自动播放只需要运行下面的命令即可
setacl CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2 /registry /deny everyone /full
注意这里的对象是everyone,也就是说拒绝任何人完全控制此键,也就禁止了administrators之类的
setacl.exe "machine\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options" /registry /deny system /full