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 中的一个错误。

系统可能已经受到威胁;如果有疑问,请从备份中恢复。然后,将此系统升级到受支持的当前操作系统版本,这也会更新您的应用程序包。看看您是否仍然遇到问题,如果是,请通过彻底验证客户端输入数据来抵消缓冲区溢出。

相关内容