问题原文
原帖链接 · WKFY · CC BY-SA 4.0
Our server has been attacked recently and looks something like the following in the logs:
[Mon Feb 18 09:18:43 2019] [IP_ADDRESS] script '/var/www/ynm.php' not found or unable to stat
[Mon Feb 18 09:18:43 2019] [IP_ADDRESS] script '/var/www/71.php' not found or unable to stat
[Mon Feb 18 09:18:44 2019] [IP_ADDRESS] script '/var/www/wadre.php' not found or unable to stat
[Mon Feb 18 09:18:44 2019] [IP_ADDRESS] script '/var/www/vm.php' not found or unable to stat
[Mon Feb 18 09:18:44 2019] [IP_ADDRESS] script '/var/www/test.php' not found or unable to stat
[Mon Feb 18 09:18:44 2019] [IP_ADDRESS] script '/var/www/1q.php' not found or unable to stat
[Mon Feb 18 09:18:45 2019] [IP_ADDRESS] script '/var/www/1111.php' not found or unable to stat
[Mon Feb 18 09:18:45 2019] [IP_ADDRESS] script '/var/www/errors.php' not found or unable to stat
[Mon Feb 18 09:18:46 2019] [IP_ADDRESS] script '/var/www/q.php' not found or unable to stat
These attacks go on for hours sometimes and freezes the server.
How to protect against this? fail2ban?
Have banned the IP's manually but they change every time.
Thanks!
社区高分解答
原帖链接 · MLu · CC BY-SA 4.0
These are common occurrences. Robots try to find insecure scripts and exploit them. You can't really avoid it, once you've got a web server on the Internet you'll see scans like this.
However since you're running on AWS EC2 you've got a number of options:
Use AWS WAF (Web Application Firewall) to protect your site against malicious attacks.
Use AWS Shield - managed DDoS protection. Free.
Etc...
In any case being scanned like this shouldn't freeze your server. That freezing is likely being caused by something else - maybe a DDoS (hint: use AWS Shield) or some successful exploit of one of your PHP scripts that consumes the instance memory.
Hope that helps :)
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
