阻止或阻止黑客淹没Web服务器

时间:2018-04-08 11:32:53

标签: symfony security

我在php Symfony2上运行了一个电子商务网站。有人用随机路由发送随机GET和POST请求。这会崩溃我的服务器。

如何阻止或阻止这种情况?是否有这种黑客的名字?

这是我的生产日志。

[2018-04-07 18:18:28] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "HEAD /phpmyadmin/"" at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 176 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"HEAD /phpmyadmin/\" at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:176, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): No routes found for \"/phpmyadmin/\". at /var/www/app/cache/prod/classes.php:2427)"} [] [2018-04-07 18:18:30] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "HEAD /dbadmin/"" at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 176 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"HEAD /dbadmin/\" at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:176, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): No routes found for \"/dbadmin/\". at /var/www/app/cache/prod/classes.php:2427)"} [] [2018-04-07 18:18:31] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "HEAD /db/"" at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 176 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"HEAD /db/\" at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:176, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): No routes found for \"/db/\". at /var/www/app/cache/prod/classes.php:2427)"} [] [2018-04-07 21:53:39] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "POST /wls-wsat/CoordinatorPortType"" at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 176 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"POST /wls-wsat/CoordinatorPortType\" at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:176, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): No routes found for \"/wls-wsat/CoordinatorPortType\". at /var/www/app/cache/prod/classes.php:2427)"} [] [2018-04-08 03:04:11] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /'http://ewhale.co/"" at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 176 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET /'http://ewhale.co/\" at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:176, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): No routes found for \"/'http://ewhale.co/\". at /var/www/app/cache/prod/classes.php:2427)"} [] [2018-04-08 06:17:36] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /index.action"" at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 176 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET /index.action\" at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:176, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): No routes found for \"/index.action\". at /var/www/app/cache/prod/classes.php:2427)"} [] [2018-04-08 06:20:02] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /_asterisk/"" at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 176 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET /_asterisk/\" at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:176, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): No routes found for \"/_asterisk/\". at /var/www/app/cache/prod/classes.php:2427)"} [] [2018-04-08 08:35:49] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "POST /autodiscover/autodiscover.xml"" at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 176 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"POST /autodiscover/autodiscover.xml\" at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:176, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): No routes found for \"/autodiscover/autodiscover.xml\". at /var/www/app/cache/prod/classes.php:2427)"} [] [2018-04-08 08:35:49] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "POST /autodiscover/autodiscover.xml"" at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 176 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"POST /autodiscover/autodiscover.xml\" at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:176, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): No routes found for \"/autodiscover/autodiscover.xml\". at /var/www/app/cache/prod/classes.php:2427)"} [] [2018-04-08 08:35:49] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /.well-known/autoconfig/mail/config-v1.1.xml" (from "http://ewhale.co/.well-known/autoconfig/mail/config-v1.1.xml")" at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 176 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET /.well-known/autoconfig/mail/config-v1.1.xml\" (from \"http://ewhale.co/.well-known/autoconfig/mail/config-v1.1.xml\") at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:176, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): No routes found for \"/.well-known/autoconfig/mail/config-v1.1.xml\". at /var/www/app/cache/prod/classes.php:2427)"} [] [2018-04-08 08:35:59] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "POST /autodiscover/autodiscover.xml"" at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 176 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"POST /autodiscover/autodiscover.xml\" at /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:176, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): No routes found for \"/autodiscover/autodiscover.xml\". at /var/www/app/cache/prod/classes.php:2427)"} []

1 个答案:

答案 0 :(得分:0)

据我所知,从您提供的日志中,我可以告诉您:

  • 除非你公开像这样的工具,否则没有什么可担心的 常见端点上的phpmyadmin,例如abc.com/phpmyadmin

  • 你无法阻止这些。

只是你不能。因为它们是随机的。在这些日子里,甚至可以使用cloudflare等云解决方案来识别和删除大量的DoS请求。 (因为DoS请求有一些共同的模式)

但是对于这种类型的随机攻击,你别无选择。这些请求来自机器人。他们随机尝试网站,找到过时的常用软件(例如:wordpress,drupal),并在可能的情况下注入恶意代码。