Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Windows Server 系統教學 >> Server 2008

Windows Server 2008 IIS 7.5 移除目錄執行權限防範惡意腳本上傳:處理常式對應編輯功能權限

編輯:Server 2008

網站上傳目錄若保有「腳本」執行權限,駭客上傳惡意 .asp/.aspx/.php 檔案即可執行植入後門。IIS 7.5 透過「處理常式對應」編輯功能權限,可精確移除特定目錄的「腳本」執行權限,僅保留「讀取」與「靜態內容」服務。

操作步驟

  1. IIS 管理員 → 連線窗格展開網站 → 選取目標上傳目錄 (如 /uploads)
  2. 中間窗格雙擊 「處理常式對應」
  3. 右側動作窗格 → 「編輯功能權限」
  4. 彈出視窗:取消勾選 「腳本」 → 保留「讀取」、「靜態內容」 → 確定

驗證方式

  • 瀏覽器嘗試存取該目錄下 .asp 檔案 → 應回傳 403.3 / 404.17 或 500.19 (處理常式未對應)
  • 靜態檔案 (.jpg, .css, .js) 正常下載/顯示
重要提醒:切勿移除「讀取」權限,否則整個目錄無法存取。僅針對需執行伺服器端程式碼的目錄 (如 /admin, /api) 保留腳本權限,並搭配 NTFS 權限限制寫入帳號。

IIS 選取上傳目錄

處理常式對應清單

編輯功能權限對話框

取消腳本勾選

Copyright © Windows教程網 All Rights Reserved