虚拟主机C盘权限设置 for IIS 安全维护 bat批处理脚本
@ECHO OFF
setlocal
REM =======================================
REM VH_Gh0st For IIS V1.4
REM 虚拟主机C盘权限设置 [IIS] V1.4
REM C.Rufus Security Team
REM www.wolfexp.net
REM www.sebug.net
REM =======================================
REM
REM CHANGELOG --
REM by amxku&自在轮回, C.Rufus S.T
REM 2006-12-10
REM add some tips
REM by amxku, C.Rufus S.T
REM 2007-07-10
REM VH_Gh0st For IIS V1.4
REM 鬼仔说被权限弄挂过一次,所以加个还原的
REM by amxku, C.Rufus S.T
REM 2008-06-23
title VH_Gh0st For IIS V1.4 - 红狼安全小组
echo.
echo "+++++++++++++++++++++++++++++++++++++"
echo "+ VH_Gh0st For IIS V1.4 +"
echo "+ 虚拟主机C盘权限设置[IIS] V1.4 +"
echo "+ www.zzzyk.com +"
echo "+ www.wolfexp.net +"
echo "+ 红狼安全小组 +"
echo "+ +"
echo "+ amxku 自在轮回 +"
echo "+++++++++++++++++++++++++++++++++++++"
:menu
echo.
echo [1] 删除C盘的everyone的权限
echo [2] 删除C盘的所有的users的访问权限
echo [3] 添加iis_wpg的访问权限
echo [4] 添加iis_wpg的访问权限[.net专用]
echo [5] 添加iis_wpg的访问权限[装了MACFEE的软件专用]
echo [6] 添加users的访问权限
echo [7] 删除C盘Windows下的所有的危险文件夹
echo [8] 删除系统危险文件的访问权限,只留管理组成员
echo [9] 注册表相关设定
echo [10] 将C盘权限还原为默认[需重启]
echo [0] 退出
echo.
@echo 请选择?
@echo 输入上面的选项回车
@echo off
set /p menu=
if %menu% == 0 goto exit
if %menu% == 1 goto 1
if %menu% == 2 goto 2
if %menu% == 3 goto 3
if %menu% == 4 goto 4
if %menu% == 5 goto 5
if %menu% == 6 goto 6
if %menu% == 7 goto 7
if %menu% == 8 goto 8
if %menu% == 9 goto 9
if %menu% == 10 goto 10
:1
echo 删除C盘的everyone的权限
cacls "%SystemDrive%" /r "CREATOR OWNER" /e
cacls "%SystemDrive%" /r "everyone" /e
cacls "%SystemRoot%" /r "everyone" /e
cacls "%SystemDrive%/Documents and Settings" /r "everyone" /e
cacls "%SystemDrive%/Documents and Settings/All Users" /r "everyone" /e
cacls "%SystemDrive%/Documents and Settings/All Users/Documents" /r "everyone" /e
echo.
echo 删除C盘的everyone的权限 ………………ok!
echo.
goto menu
:2
echo 删除C盘的所有的users的访问权限
cacls "%SystemDrive%" /r "users" /e
cacls "%SystemDrive%/Program Files" /r "users" /e
cacls "%SystemDrive%/Documents and Settings" /r "users" /e
cacls "%SystemRoot%" /r "users" /e
cacls "%SystemRoot%/addins" /r "users" /e
cacls "%SystemRoot%/AppPatch" /r "users" /e
cacls "%SystemRoot%/Connection Wizard" /r "users" /e
cacls "%SystemRoot%/Debug" /r "users" /e
cacls "%SystemRoot%/Driver Cache" /r "users" /e
cacls "%SystemRoot%/Help" /r "users" /e
cacls "%SystemRoot%/IIS Temporary Compressed Files" /r "users" /e
cacls "%SystemRoot%/java" /r "users" /e
cacls "%SystemRoot%/msagent" /r "users" /e
cacls "%SystemRoot%/mui" /r "users" /e
cacls "%SystemRoot%/repair" /r "users" /e
cacls "%SystemRoot%/Resources" /r "users" /e
cacls "%SystemRoot%/security" /r "users" /e
cacls "%SystemRoot%/system" /r "users" /e
cacls "%SystemRoot%/TAPI" /r "users" /e
cacls "%SystemRoot%/Temp" /r "users" /e
cacls "%SystemRoot%/twain_32" /r "users" /e
cacls "%SystemRoot%/Web" /r "users" /e
cacls "%SystemRoot%/WinSxS" /r "users" /e
cacls "%SystemRoot%/system32/3com_dmi" /r "users" /e
cacls "%SystemRoot%/system32/administration" /r "users" /e
cacls "%SystemRoot%/system32/Cache" /r "users" /e
cacls "%SystemRoot%/system32/CatRoot2" /r "users" /e
cacls "%SystemRoot%/system32/Com" /r "users" /e
cacls "%SystemRoot%/system32/config" /r "users" /e
cacls "%SystemRoot%/system32/dhcp" /r "users" /e
cacls "%SystemRoot%/system32/drivers" /r "users" /e
cacls "%SystemRoot%/system32/export" /r "users" /e
cacls "%SystemRoot%/system32/icsxml" /r "users" /e
cacls "%SystemRoot%/system32/lls" /r "users" /e
cacls "%SystemRoot%/system32/LogFiles" /r "users" /e
cacls "%SystemRoot%/system32/MicrosoftPassport" /r "users" /e
cacls "%SystemRoot%/system32/mui" /r "users" /e
cacls "%SystemRoot%/system32/oobe" /r "users" /e
cacls "%SystemRoot%/system32/ShellExt" /r "users" /e
cacls "%SystemRoot%/system32/wbem" /r "users" /e
echo.
echo 删除C盘的所有的users的访问权限 ………………ok!
echo.
goto menu
:7
echo 删除C盘Windows下的所有的危险文件夹
attrib %SystemRoot%/Web/printers -s -r -h
del %SystemRoot%\Web\printers\*.* /s /q /f
rd %SystemRoot%\Web\printers /s /q
attrib %SystemRoot%\Help\iisHelp -s -r -h
del %SystemRoot%\Help\iisHelp\*.* /s /q /f
rd %SystemRoot%\Help\iisHelp /s /q
attrib %SystemRoot%\system32\inetsrv\iisadmpwd -s -r -h
del %SystemRoot%\system32\inetsrv\iisadmpwd\*.* /s /q /f
rd %SystemRoot%\system32\inetsrv\iisadmpwd /s /q
echo.
echo 删除C盘Windows下的所有的危险文件夹 ………………ok!
echo.
goto menu
:8
echo 给系统危险文件设置权限设定
cacls "C:\boot.ini" /T /C /E /G Administrators:F
cacls "C:\boot.ini" /D Guests:F /E
cacls "C:\AUTOEXEC.BAT" /T /C /E /G Administrators:F
cacls "C:\AUTOEXEC.BAT" /D Guests:F /E
cacls "%SystemRoot%/system32/net.exe" /T /C /E /G Administrators:F
补充:综合编程 , 安全编程 ,