160.30.157.214 - - [06/Aug/2026:22:08:00 +0800] "POST /cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh HTTP/1.1" 400 157 "-" "-" "-"160.30.157.214 - - [06/Aug/2026:22:08:02 +0800] "POST /cgi-bin/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/bin/sh HTTP/1.1" 400 157 "-" "-" "-"160.30.157.214 - - [06/Aug/2026:22:08:04 +0800] "POST /hello.world?%ADd+allow_url_include%3d1+%ADd+auto_prepend_file%3dphp://input HTTP/1.1" 404 42733 "-" "libredtail-http" "-"160.30.157.214 - - [06/Aug/2026:22:08:05 +0800] "POST /?%ADd+allow_url_include%3d1+%ADd+auto_prepend_file%3dphp://input HTTP/1.1" 200 51353 "-" "libredtail-http" "-"160.30.157.214 - - [06/Aug/2026:22:08:06 +0800] "POST /index.php?%25ADd+allow_url_include%3D1+%25ADd+auto_prepend_file%3Dphp://input HTTP/1.1" 200 51353 "-" "libredtail-http" "-"160.30.157.214 - - [06/Aug/2026:22:08:06 +0800] "POST /test.hello?%25ADd+allow_url_include%3D1+%25ADd+auto_prepend_file%3Dphp://input HTTP/1.1" 404 42741 "-" "libredtail-http" "-"160.30.157.214 - - [06/Aug/2026:22:08:07 +0800] "POST /index.php?-d+allow_url_include%3don+-d+auto_prepend_file%3dphp%3a//input HTTP/1.1" 200 51353 "-" "libredtail-http" "-"160.30.157.214 - - [06/Aug/2026:22:08:08 +0800] "GET /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1" 404 153 "-" "libredtail-http" "-"

請解釋

這段日誌記錄了網際網路上極度危險且目標精準的**「自動化漏洞利用與後門植入掃描」(Vulnerability Exploitation & RCE Scan)**。

攻擊者(IP:160.30.157.214,使用工具 libredtail-http)在短短 8 秒鐘內 連續發射了多種不同類型的著名遠端代碼執行(RCE)武器。他試圖直接綁架您的伺服器作業系統,或是利用 PHP 漏洞在您的 WordPress 中塞入惡意木馬。

以下為您詳細拆解駭客這 8 秒鐘內每一步的致命命令與您的 Nginx 回應:


1. 每一條日誌命令的用意深層拆解

【第一步:嘗試路徑穿越漏洞(Apache 歷史漏洞 CVE-2021-41773)】

【第二步:猛烈轟炸 PHP-CGI 遠端代碼執行漏洞 (CVE-2024-4577) ⚠️ 極危險】

【第三步:探測常見的開發工具漏洞 (PhpUnit RCE)】


🛡️ 資安應對與 Fail2ban 防線補強

這隻機器人的行為極度惡劣,它在 8 秒內狂轟濫炸了各種類型的底層漏洞。

雖然您的 Nginx 用 400 和 404 擋掉了大部分,且 index.php 也只是正常吐出首頁(200),但我們現有的 Fail2ban 機制需要更靈敏地把這種人瞬間封死:

  1. 您的 nginx-4xx 已經立大功:

  2. 關於狀態碼 400 的優化建議:修好後記得執行 sudo fail2ban-client reload。

    failregex = ^<HOST> - - \[.*\] ".*" (400|403|404|444) .*
    

既然您已經成功用 nftables 建立了防禦網,這類漏洞掃描器在觸發幾次 404 之後,就會全部在您的 Banned IP list 裡乖乖排隊了!