


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!

The reason for mastering Linux operations is its wide range of application scenarios and powerful functions. 1) Linux is suitable for developers, system administrators and technology enthusiasts, and is used in server management, embedded systems and containerization technologies. 2) Learning Linux can start with file system structure, shell usage, user permission management and process management. 3) The Linux command line is its core tool, which executes commands through the shell, such as ls, mkdir, cd, etc., and supports redirection and pipeline operations. 4) Advanced usage includes writing automated scripts, such as backup scripts, using tar commands and conditional judgments. 5) Common errors include permissions, paths and syntax issues, which can be debugged through echo, set-x and $?. 6) Performance optimization suggestions

The five pillars of the Linux system are: 1. Kernel, 2. System library, 3. Shell, 4. File system, 5. System tools. The kernel manages hardware resources and provides basic services; the system library provides precompiled functions for applications; the shell is the interface for users to interact with the system; the file system organizes and stores data; and system tools are used for system management and maintenance.

In Linux systems, maintenance mode can be entered by pressing a specific key at startup or using a command such as "sudosystemctlrescue". Maintenance mode allows administrators to perform system maintenance and troubleshooting without interference, such as repairing file systems, resetting passwords, patching security vulnerabilities, etc.

Linux beginners should master basic operations such as file management, user management and network configuration. 1) File management: Use mkdir, touch, ls, rm, mv, and CP commands. 2) User management: Use useradd, passwd, userdel, and usermod commands. 3) Network configuration: Use ifconfig, echo, and ufw commands. These operations are the basis of Linux system management, and mastering them can effectively manage the system.

The article explains how to manage sudo privileges in Linux, including granting, revoking, and best practices for security. Key focus is on editing /etc/sudoers safely and limiting access.Character count: 159

The article provides a guide on setting up two-factor authentication (2FA) for SSH on Linux using Google Authenticator, detailing installation, configuration, and troubleshooting steps. It highlights the security benefits of 2FA, such as enhanced sec

The article discusses using top, htop, and vmstat for monitoring Linux system performance, detailing their unique features and customization options for effective system management.

Article discusses managing software packages in Linux using apt, yum, and dnf, covering installation, updates, and removals. It compares their functionalities and suitability for different distributions.


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

Atom editor mac version download
The most popular open source editor

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

WebStorm Mac version
Useful JavaScript development tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.