作者:adam < adam@nsfocus.com > 主頁:http://www.nsfocus.com 日期:2000-12-14
在安裝Windows2000的時候,如果你選擇了安裝IIS,那么在安裝的時候系統將會你的%SystemDrive%里創建一個InetPub目錄,而且還會在Inetpub目錄下創建一個Scripts目錄,IIS還會創建一個虛擬目錄SCIPTS指向該目錄,并且給這 個目錄執行權限。前段時間NSFocus安全小組研究發現的“Unicode解碼目錄遍歷漏洞”大部分問題就是針對Web站點的可執行目錄而言的,所以我們建議把該目錄移到非系統盤在一定程度上可以保證一定的安全。
然而在我們選擇安裝系統組件的時候,無法自己定義IIS的安裝盤符,所以才有了今天的這篇文章。:)
我們在安裝系統的時候不選擇安裝IIS,等系統安裝完成后手動來做,我們可以使用無人值守的方式自定義安裝IIS 5.0。首先確認你的 Windows 2000的安裝介質是可用的,本例中的安裝介質是光盤,因此只要將安裝光盤插入光驅即可,然后在你的硬盤或者軟盤上創建一個無人值守安裝文件,本例中我們將在D盤創建一個 IIS5install.txt 作為無人值守安裝文件,下面我們看看該文件的內容:
[Components] '所安裝的組件 iis_common = on '公用文件 iis_inetmgr = on 'IIS管理器 iis_www = on 'WWW服務 iis_ftp = on 'FTP服務 iis_htmla = on 'Web方式的IIS管理器
[InternetServer] Path="D:\inetsrv" 'Common文件放置位置(如果你是卸載了IIS再手動裝,公用文件還是會位置保持不變) PathFTPRoot="D:\inetPub\FTPRoot" 'FTP的根路徑 PathWWWRoot="D:\InetPub\wwwroot" 'WWW的根路徑
將該文件存盤后,運行“sysocmgr /i:%windir%\inf\sysoc.inf /u:d:\iis5install.txt”, 不會有提示框出現,系統將自動的為你安裝好IIS,而且Scripts目錄將會在D盤,使用“Unicode解碼目錄遍歷漏洞”也就 失效了。
如果你需要安裝更多的IIS組件,以下是一個比較詳細的無人值守安裝文件:
=========================================BEGIN============================
;This is an example Unattended installation file ;IIS, MTS, and Index Server are ON ;Target Path should be new directory ;Adminpassword is blank.
[Unattended] Unattendmode = FullUnattended OemPreinstall = NO TargetPath = * Filesystem = LeaveAlone
[UserData] FullName = "Your User Name" OrgName = "Your Organization Name" ComputerName = "ComputerName"
[GuiUnattended] TimeZone = "004" AdminPassword = * AutoLogon = Yes
[LicenseFilePrintData] AutoMode = "PerServer" AutoUsers = "0"
[Display] BitsPerPel = 4 XResolution = 800 YResolution = 600 VRefresh = 70
[Networking] InstallDefaultComponents = YES
[Identification] JoinWorkgroup = Workgroup
;Turns NT Components (and their respective sections) ON or OFF [Components] iis_common = on iis_inetmgr = on iis_www = on iis_ftp = on iis_htmla = on iis_doc = on iis_pwmgr = on iis_smtp = on iis_smtp_docs = on mts_core = on msmq = off terminalservices = off reminst = off certsrv = off rstorage = off indexsrv_system = on certsrv_client = off certsrv_server = off certsrv_doc = off
[InternetServer] ;Without these keys specified IIS will use the default settings ; Note that the Path is location for INETSRV, the core IIS programs and files. Path=D:\Securelocation PathFTPRoot=E:\Inetpub\Ftproot PathWWWRoot=E:\Inetpub\Wwwroot
|