top of page
作家相片Samuel

Nmap NSE Category vulns Script:http-method-tamper HTTP動詞竄改攻擊

已更新:8月26日


Nmap Script指令摘要


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


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


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


參考資料:


Nmap Script指令參數

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.host, http.max-body-size, http.max-cache-size, http.max-pipeline, http.pipeline, http.truncated-ok, http.useragent

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


Nmap Script指令範例

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>

Nmap Script指令輸出

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:

Nmap Script作者:

Paulino Calderon

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



Nmap
Nmap

 

延伸閱讀

4 次查看

Comments


bottom of page