7. 【題組 1】情境如附圖所示。醫院若想針對內網環境進行上述Struts 2 漏洞的快速偵測並驗證,使用下列何種工具或指令最為適切?
(A) nmap -sV --script=http-shellshock
(B) sqlmap -u "https://struts2.com"
(C) nikto -host struts2.com -C all
(D) msf > use exploit/multi/http/struts2_content_type_ognl
統計: A(17), B(5), C(6), D(29), E(0) #3536953
詳解 (共 2 筆)
這題要點出「針對 Struts2 Content-Type OGNL 漏洞 (CVE-2017-5638, S2-045) 的快速驗證工具」✅
逐一分析選項:
(A) nmap -sV --script=http-shellshock
-
這是用來檢測 Bash Shellshock 漏洞 (CVE-2014-6271) 的 NSE script。
-
跟 Struts2 完全不同 → ❌ 不適用。
(B) sqlmap -u "https://struts2.com"
-
sqlmap 是自動化偵測 SQL Injection 的工具。
-
本題是 Struts2 (OGNL RCE),不是 SQLi → ❌ 不適用。
(C) nikto -host struts2.com -C all
-
nikto 是一個 Web 弱點掃描器,可以檢測一些常見漏洞與配置問題。
-
但它比較偏「被動檢測」,對 Struts2 S2-045 不一定準確驗證。
-
雖然能粗略找出「有 Struts2 存在」,但不是專門工具。 → ⚠️ 不是最適切。
(D) msf > use exploit/multi/http/struts2_content_type_ognl
-
這是 Metasploit 框架裡 專門針對 S2-045 的模組。
-
可以直接驗證與利用 Struts2 Content-Type RCE 漏洞。
-
題目問「快速偵測並驗證」 → ✅ 這個最適切。
✅ 答案:
(D) msf > use exploit/multi/http/struts2_content_type_ognl