首页 > 编程 > BAT > 正文

服务器 安全设置 批处理

2020-06-09 14:16:54
字体:
来源:转载
供稿:网友
第一个比较全,推荐使用第一个
复制代码 代码如下:

@ECHO OFF
CLS
TITLE SERVER SAFE SETUP PRO
COLOR 0A
echo y|cacls.exe C:/ /p Administrators:f system:f "network service":r
echo y|cacls.exe D:/ /p Administrators:f system:f servU:f "network service":r
echo y|cacls.exe E:/ /p Administrators:f system:f servU:f "network service":r
echo y|cacls.exe "C:/Program Files" /t /p Administrators:f system:f everyone:r
echo y|cacls.exe "C:/Program Files/Common Files" /t /g Administrators:f system:f everyone:r
echo y|cacls.exe c:/windows /p Administrators:f system:f
echo y|cacls.exe c:/windows/system32 /p Administrators:f system:f
echo y|cacls.exe C:/WINDOWS/system32/inetsrv /p Administrators:f system:f everyone:r
echo y|cacls.exe "C:/Documents and Settings" /p Administrators:f system:f
echo y|cacls.exe "C:/Documents and Settings/All Users" /t /p Administrator:f system:f everyone:r
echo y|cacls.exe c:/windows/temp /p everyone:f
echo y|cacls.exe %systemroot%/system32/shell32.dll /p Administrators:f
echo y|cacls.exe %systemroot%/system32/wshom.ocx /p Administrators:f
echo y|cacls.exe c:/windows/system32/*.exe /p Administrators:f system:f
echo y|cacls.exe "c:/Documents and Settings/All Users" /e /g everyone:r
echo y|cacls.exe %systemroot%/system32/svchost.exe /e /g "network service":r
echo y|cacls.exe %systemroot%/system32/msdtc.exe /e /g "network service":r
echo y|cacls.exe %windir%/system32/mtxex.dll /e /g everyone:r
echo y|cacls.exe c:/windows/system32/cmd.exe /p Administrator:f
echo y|cacls.exe c:/windows/system32/net.exe /p Administrator:f
echo y|cacls.exe c:/windows/system32/net1.exe /p Administrator:f
echo y|cacls.exe c:/windows/system32/sc.exe /p Administrator:f
echo y|cacls.exe c:/windows/system32/at.exe /p Administrator:f
echo y|cacls.exe %windir%/system32/dllhost.exe /e /g everyone:r
echo y|cacls.exe c:/windows/system32/netsh.exe /p Administrator:f
echo y|cacls.exe c:/windows/system32/net.exe /p Administrator:f
echo y|cacls.exe c:/windows/system32/cacls.exe /p Administrator:f
echo y|cacls.exe c:/windows/system32/cmdkey.exe /p Administrator:f
echo y|cacls.exe c:/windows/system32/ftp.exe /p Administrator:f
echo y|cacls.exe c:/windows/system32/tftp.exe /p Administrator:f
echo y|cacls.exe c:/windows/system32/reg.exe /p Administrator:f
echo y|cacls.exe c:/windows/system32/regedt32.exe /p Administrator:f
echo y|cacls.exe c:/windows/system32/regini.exe /p Administrator:f
echo y|cacls.exe %windir%/assembly /e /t /g "network service":r
echo y|cacls.exe %windir%/Microsoft.NET /e /t /g everyone:r
echo y|cacls.exe "%windir%/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files" /e /t /g everyone:f
echo y|cacls.exe %windir%/system32/mscoree.dll /e /g everyone:r
echo y|cacls.exe %windir%/system32/ws03res.dll /e /g everyone:r
echo y|cacls.exe %windir%/system32/msxml*.dll /e /g everyone:r
echo y|cacls.exe C:/WINDOWS/system32/urlmon.dll /e /g everyone:r
echo y|cacls.exe C:/WINDOWS/system32/mlang.dll /e /g everyone:r
echo y|cacls.exe C:/WINDOWS/system32/TAPI32.dll /e /g everyone:r
echo y|cacls.exe C:/WINDOWS/system32/WININET.dll /e /g everyone:r
cacls c:/windows/assembly /e /t /p "network service":r
cacls c:/windows/Microsoft.NET /e /t /p "network service":r
cacls "C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files" /e /t /p "network service":f
cacls C:/WINDOWS/system32/mscoree.dll /e /g everyone:r
cacls C:/WINDOWS/system32/ws03res.dll /e /g everyone:r
cacls c:/WINDOWS /e /g "network service":r
if exist c:/windows cacls c:/windows /e /g "network service":r
cacls c:/windows/Microsoft.NET /e /t /p "network service":r
cacls "C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files" /e /t /p "network service":f
cacls "C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files" /e /t /p "network service":f
cacls c:/windows/system32 /e /g "network service":r
cacls c:/windows/system32/rasapi32.dll /e /g "network service":r
echo y|cacls.exe C:/WINDOWS/system32/inetsrv/adsiis.dll /p Administrators:f autosystem:f
echo y|cacls.exe C:/WINDOWS/system32/inetsrv/iisadmpwd /p Administrators:f autosystem:f
echo y|cacls.exe C:/WINDOWS/system32/inetsrv/MetaBack /p Administrators:f autosystem:f
cacls C":/Program Files/Serv-U" /e /g "servu":f
cacls d:/wwwroot /e /g servU:f
echo 以上设置服务器目录权限
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表