Apache / Ubuntu 9.04:如何應對威脅並提高伺服器環境的安全性?

Apache / Ubuntu 9.04:如何應對威脅並提高伺服器環境的安全性?

我們的伺服器託管著一千多個站點,其中一些站點似乎已被惡意腳本劫持。這些腳本運行通常由合法用戶集體執行的操作,對我們的伺服器造成嚴重的壓力,並且通常需要我們重新啟動以清除負載。我們沒有辦法找出它們是什麼。最近這些攻擊已經開始影響我們的日常運作。我們的錯誤日誌檔案大小為 70mb,其中包含類似於以下內容的訊息:

[timstamp] [error] [client xx.xxx.xx.xxx] File does not exist: /path/favicon.ico (File exists. This is the majority of all log entries)
[timstamp] [error] [client xxx.xxx.xx.xxx] client denied by server configuration: /path/to/cron.php (This is my TOP concern)
[timstamp] [error] [client xxx.xx.xx.xx] Directory index forbidden by Options directive: /another/path
[timstamp] [error] [client xx.xx.xxx.xxx]  ALERT - canary mismatch on efree() - heap overflow detected (attacker 'xxx.xx.xxx.xxx', file '/path/to/index.php')
[timstamp] [error] [client xx.xx.xxx.xx]  Directory index forbidden by Options directive: /path/to/another/file_or_folder/
[timstamp] [error] [client xxx.xx.x.xx] Invalid URI in request GET /../../ HTTP/1.1
[timstamp] [error] [client xx.xxx.xx.xx] client denied by server configuration: /path/to/another/web/file/
Invalid URI in request GET mydomain.com HTTP/1.0

我們的資料庫日誌檔案大小超過 5GB。

我的問題是,我們可以採取什麼措施來應對這些威脅?有沒有辦法根據某些行為禁止 IP?我們仍在篩選日誌並嘗試確定行動方案。任何可以提供的指南、參考資料或教學將不勝感激。

答案1

  1. 升級您的系統。 Ubuntu 9.04 已經兩年沒有獲得安全更新了。
  2. client denied by server configuration: /path/to/cron.php- 別擔心這個。該請求被 Apache 的配置阻止,攻擊者得到了回應403 Forbidden
  3. ALERT - canary mismatch on efree() - heap overflow detected (attacker 'xxx.xx.xxx.xxx', file '/path/to/index.php')- 這可能是一個潛在的主要問題 - 緩衝區溢位漏洞可能允許攻擊者完全控制您的系統。另一方面,攻擊者嘗試接管您的系統可能只是觸發了 PHP 中的錯誤。

系統可能已經受到損害;如有疑問,請從備份還原。然後,將此系統升級到受支援的當前作業系統版本,這也將更新您的應用程式套件。查看是否仍然遇到問題,如果是,請透過徹底驗證用戶端輸入資料來消除緩衝區溢位。

相關內容