top of page

Nmap vulns 指令與參數:http-method-tamper HTTP動詞竄改攻擊


指令摘要


這個指令試圖繞過受密碼保護的資源(HTTP 401狀態),透過執行HTTP動詞竄改攻擊;如果未設定要檢查的路徑組數,它將爬行網頁伺服器並對找到的任何受密碼保護的資源執行檢查。


該指令透過執行HTTP動詞竄改攻擊並監控狀態碼來確定受保護的URI是否存在漏洞;首先,它使用HEAD請求,然後是POST請求,最後是一個隨機生成的字串(當Web伺服器將未知的請求方法視為GET請求時,這是相當有幫助的,這種情況適用於PHP伺服器)。


如果設定了路徑表,它將嘗試存取已經給定的URI;否則,將啟動Web爬蟲,以嘗試尋找受保護的資源;請注意,在具有.htaccess文件的PHP環境中,您需要指定文件的路徑,而不是目錄,以查找設定錯誤的.htaccess檔案。


參考資料:


指令參數

http-method-tamper.timeout

Web爬蟲的超時時間,預設為10秒。

http-method-tamper.uri

要爬行的基本URI,如果設定了http-method-tamper.paths,則不適用。

http-method-tamper.paths

要檢查的路徑組數,如果未設定,則指令將爬行Web伺服器。

httpspider.doscraping, httpspider.maxdepth, httpspider.maxpagecount, httpspider.noblacklist, httpspider.url, httpspider.useheadfornonwebfiles, httpspider.withindomain, httpspider.withinhost

這些參數與httpspider函式庫相關,用於Web爬蟲的設定,查閱httpspider函式庫瞭解詳細資訊。

vulns.short, vulns.showall

這些參數與vulns函式庫相關,用於設定漏洞掃描的選項,查閱vulns函式庫瞭解詳細資訊。

slaxml.debug

這是關於slaxml函式庫的除錯選項,查閱slaxml函式庫瞭解詳細資訊。

smbdomain, smbhash, smbnoguest, smbpassword, smbtype, smbusername

這些參數與smbauth函式庫相關,用於設定SMB認證,查閱smbauth函式庫瞭解詳細資訊。

http.hosthttp.max-body-size, http.max-cache-size, http.max-pipeline, http.pipeline, http.truncated-ok, http.useragent

這些參數與http函式庫相關,用於設定HTTP請求的相關選項,查閱http函式庫瞭解詳細資訊。


指令範例

nmap -sV --script http-method-tamper <target>
nmap -p80 --script http-method-tamper --script-args 'http-method-tamper.paths={/protected/db.php,/protected/index.php}' <target>

指令輸出

PORT   STATE SERVICE REASON
80/tcp open  http    syn-ack
| http-method-tamper:
|   VULNERABLE:
|   Authentication bypass by HTTP verb tampering
|     State: VULNERABLE (Exploitable)
|     Description:
|       This web server contains password protected resources vulnerable to authentication bypass
|       vulnerabilities via HTTP verb tampering. This is often found in web servers that only limit access to the
|        common HTTP methods and in misconfigured .htaccess files.
|
|     Extra information:
|
|   URIs suspected to be vulnerable to HTTP verb tampering:
|     /method-tamper/protected/pass.txt [POST]
|
|     References:

作者:

Paulino Calderon

License: Same as Nmap--See https://nmap.org/book/man-legal.html


隨選即看研討會


延伸閱讀

NetAlly 滲透測試及網路測試總覽 > CyberScope Nmap 滲透測試手持式網路分析儀,整合了 Nmap 功能,為站點存取層提供全面的網路安全風險評估、分析、和報告——包括所有的端點和網路探索、有線與無線網路安全、漏洞評估 (Nmap) 以及網段和設定驗證;IT 人員透過單一工具以及單一介面,即可快速且即時的掌握企業或組織的各種混合式網路環境 (有線、無線、PoE)、各種連網終端裝置的拓樸、架構、設定、網段、效能、直到網路安全評估。

歡迎 訂閱翔宇科技主題式電子報 >,您將可同步掌握最新的產業新訊以及技術文章。
bottom of page