


How to deal with external DDoS attacks on ECS instances causing them to be locked out
本文在介绍如何处理 ECS 实例对外 DDoS 攻击导致被锁定的基础上,重点探讨了其具体步骤,本文内容紧凑,希望大家可以有所收获。
如何处理 ECS 实例对外 DDoS 攻击导致被锁定
当您的 ECS 实例在 ECS 控制台的状态为锁定,同时收到阿里云实例关停的官方短信或邮件通知时,代表您的 ECS 实例已被安全锁定。这是因为阿里云检测到您的 ECS 实例有对外 DDoS 攻击行为,影响云平台网络稳定,所以被安全系统锁定。
安全锁定后,表示病毒已经入侵,建议您及时 创建快照 备份磁盘数据。
排查 ECS 实例病毒
查看 ECS 实例网络连接状态,分析是否有可疑发送行为,如有则停止。
Linux 实例:执行命令 netstat -a 查看网络连接。
Windows 实例:在 PowerShell 环境下执行命令 netstat -a -n -o查看网络连接。
使用杀毒软件查杀病毒。推荐使用 安骑士 全盘杀毒。
Linux 常见木马清理命令:
chattr -i /usr/bin/.sshd rm -f /usr/bin/.sshd rm -f -r /usr/bin/bsd-port rm -r -f /root/.ssh rm -r -f /usr/bin/bsd-port cp /usr/bin/dpkgd/ps /bin/ps cp /usr/bin/dpkgd/netstat /bin/netstat cp /usr/bin/dpkgd/lsof /usr/sbin/lsof cp /usr/bin/dpkgd/ss /usr/sbin/ss find /proc/ -name exe | xargs ls -l | grep -v task |grep deleted| awk '{print $11}' | awk -F/ '{print $NF}' | xargs killall -9
排查 ECS 实例漏洞
查看 ECS 实例账号是否异常。
Windows 实例
删除账户名末尾有美元字符($)的账号,一般情况下,黑客创建的账户名末尾有字符 $。
黑客可能在您的 ECS 实例内创建隐藏用户,本地用户无法查看隐藏账户,您可以通过修改注册表修改 administrator 权限,建议您在修改注册表前先备份数据,避免操作出错:
远程连接 并登录到实例。
点击开始 > 运行,输入 regedt32.exe。
选择 HKEY_LOCAL_MACHINE/SAM/SAM,默认情况下您看不到里面的内容。
单击 SAM,右击选择权限,选择 administrator,勾选权限为完全控制,单击确定。
选择开始 > 运行,输入 regedit。
选择 HKEY_LOCAL_MACHINE/SAM/SAM/Domains/Account,显示当前 ECS 实例的所有用户名,删除本地账户中没有的账户即可删除隐藏用户。
Linux 实例
执行命令 last 或者 /var/log/secure 查看 ECS 实例近期登录记录。
执行命令 vi /etc/passwd 查看是否有异常账户,有的话执行命令 usermod -L 用户名 禁用用户或者执行命令 userdel -r 用户名 删除用户。
查看 ECS 实例是否有异地登录情况,如有则修改密码为强密码,以 10 位及其以上的大小写字母、数字以及特殊符号组成。
查看 Web 服务是否有漏洞,如 struts, ElasticSearch 等,如有则请升级。您也可以登录 云盾安全防护功能 检测 Web 服务是否有漏洞。
检查 ECS 实例内部账户密码是否过于简单,例如,MySQL 账户,SQL Server 账户,FTP 账户,Web 管理后台帐号,或者其他密码,并将简单密码重置为复杂密码,以 10 位及其以上的大小写字母、数字以及特殊符号组成。
按照对应第三方软件官网指示修复。
开启云盾服务
开启所有 云盾安全防护功能,避免您的 ECS 实例再次遭到恶意攻击。
初始化 ECS 实例
经过以上处理还不能解决问题,建议您初始化 ECS 实例。
登录 ECS 管理控制台。
为故障 ECS 实例 创建快照,包括系统盘和数据盘。
停止故障 ECS 实例后,在操作栏单击 更多 > 重新初始化磁盘,选择重新初始化系统盘和数据盘。
重新部署程序应用并上传杀毒后的数据,重新运行 ECS 实例。
开启所有 云盾安全防护功能。
The above is the detailed content of How to deal with external DDoS attacks on ECS instances causing them to be locked out. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The steps to start Apache are as follows: Install Apache (command: sudo apt-get install apache2 or download it from the official website) Start Apache (Linux: sudo systemctl start apache2; Windows: Right-click the "Apache2.4" service and select "Start") Check whether it has been started (Linux: sudo systemctl status apache2; Windows: Check the status of the "Apache2.4" service in the service manager) Enable boot automatically (optional, Linux: sudo systemctl

When the Apache 80 port is occupied, the solution is as follows: find out the process that occupies the port and close it. Check the firewall settings to make sure Apache is not blocked. If the above method does not work, please reconfigure Apache to use a different port. Restart the Apache service.

This article describes how to effectively monitor the SSL performance of Nginx servers on Debian systems. We will use NginxExporter to export Nginx status data to Prometheus and then visually display it through Grafana. Step 1: Configuring Nginx First, we need to enable the stub_status module in the Nginx configuration file to obtain the status information of Nginx. Add the following snippet in your Nginx configuration file (usually located in /etc/nginx/nginx.conf or its include file): location/nginx_status{stub_status

This article introduces two methods of configuring a recycling bin in a Debian system: a graphical interface and a command line. Method 1: Use the Nautilus graphical interface to open the file manager: Find and start the Nautilus file manager (usually called "File") in the desktop or application menu. Find the Recycle Bin: Look for the Recycle Bin folder in the left navigation bar. If it is not found, try clicking "Other Location" or "Computer" to search. Configure Recycle Bin properties: Right-click "Recycle Bin" and select "Properties". In the Properties window, you can adjust the following settings: Maximum Size: Limit the disk space available in the Recycle Bin. Retention time: Set the preservation before the file is automatically deleted in the recycling bin

To restart the Apache server, follow these steps: Linux/macOS: Run sudo systemctl restart apache2. Windows: Run net stop Apache2.4 and then net start Apache2.4. Run netstat -a | findstr 80 to check the server status.

Although the search results do not directly mention "DebianSniffer" and its specific application in network monitoring, we can infer that "Sniffer" refers to a network packet capture analysis tool, and its application in the Debian system is not essentially different from other Linux distributions. Network monitoring is crucial to maintaining network stability and optimizing performance, and packet capture analysis tools play a key role. The following explains the important role of network monitoring tools (such as Sniffer running in Debian systems): The value of network monitoring tools: Fast fault location: Real-time monitoring of network metrics, such as bandwidth usage, latency, packet loss rate, etc., which can quickly identify the root cause of network failures and shorten the troubleshooting time.

In Debian systems, readdir system calls are used to read directory contents. If its performance is not good, try the following optimization strategy: Simplify the number of directory files: Split large directories into multiple small directories as much as possible, reducing the number of items processed per readdir call. Enable directory content caching: build a cache mechanism, update the cache regularly or when directory content changes, and reduce frequent calls to readdir. Memory caches (such as Memcached or Redis) or local caches (such as files or databases) can be considered. Adopt efficient data structure: If you implement directory traversal by yourself, select more efficient data structures (such as hash tables instead of linear search) to store and access directory information

Apache cannot start because the following reasons may be: Configuration file syntax error. Conflict with other application ports. Permissions issue. Out of memory. Process deadlock. Daemon failure. SELinux permissions issues. Firewall problem. Software conflict.
