AWS 弹性 beantalk 100.0% 的请求出现 HTTP 4xx 错误

gil*_*501 2 apache amazon-web-services amazon-elastic-beanstalk server

我的 AWS Elastic Beanstalk 帐户每天都收到错误消息:“环境健康状况已从正常过渡到严重。100.0% 的请求出现 HTTP 4xx 错误”。

在查看服务器日志时,它在访问几个奇怪的网页(不存在)后不断下降。部分日志:

/var/log/httpd/error_log-XXX
[XXX] [:error] [pid XXX] [client XXXX] script '/var/www/html/w.php' not found or unable to stat
[XXX] [:error] [pid XXX] [client XXX] script '/var/www/html/sheep.php' not found or unable to stat
[XXX] [:error] [pid XXX] [client XXX] script '/var/www/html/qaq.php' not found or unable to stat
[XXX] [:error] [pid XXX] [client XXX] script '/var/www/html/db.init.php' not found or unable to stat
[XXX] [:error] [pid XXX] [client XXX] script '/var/www/html/db_session.init.php' not found or unable to stat
[XXX] [:error] [pid XXX] [client XXX] script '/var/www/html/db__.init.php' not found or unable to stat
[XXX] [:error] [pid XXX] [client XXX] script '/var/www/html/wp-admins.php' not found or unable to stat
[XXX] [:error] [pid XXX] [client XXX] script '/var/www/html/m.php' not found or unable to stat
[XXX] [:error] [pid XXX] [XXX] script '/var/www/html/db_dataml.php' not found or unable to stat
...
[XXX] [XXX] [pid XXX] XXX: Graceful restart requested, doing restart
Run Code Online (Sandbox Code Playgroud)

有谁知道这是怎么回事?谢谢!

小智 9

更改目标组 -> 运行状况检查设置 -> 服务的有效 api 端点的路径

在此输入图像描述


小智 6

同样的事情发生在我身上。AWS Elastic Beanstalk 正在检查根查询是否有效。这意味着根“/”处的请求必须以 HTTP 代码 200 响应。

你可能只需要解决这个问题。


小智 5

我怀疑这是某种攻击 (DDoS)。

也许有人正在不同的端口上扫描您的网站并寻找特定的文件(w.php),该文件可能是后门或类似的东西。由于该文件不存在,因此会引发错误。

我建议采取以下步骤:

  1. 确保您的所有数据都备份在服务器上。
  2. 从头开始重新安装实例。
  3. 确保实例根据任何 CIS 基准受到保护。
  4. 确保 Apache 根据任何 Apache CIS 基准受到保护。
  5. 确保 VPS 提供商正在使用 IPS/IDS 来监控您的实例,如果没有找到其他提供商。
  6. 确保所有相关日志都发送到与 Web 服务器实例不同的中央系统日志服务器。这将提高日志的完整性。
  7. 您可能想要安装 Snort IPS/IDS 解决方案只是为了查看是否发起了另一次攻击。
  8. 安装文件完整性监控解决方案(例如 AIDE)并监控配置文件的更改。

https://benchmarks.cisecurity.org/downloads/multiform/