{"value":"借助 [Amazon GuardDuty](https://aws.amazon.com/guardduty/),您可以监控自己的 AWS 账户和工作负载以检测恶意活动。我们于近日在 GuardDuty 中增加了检测恶意软件的功能。恶意软件用于危害工作负载、重新调整资源用途或未经授权访问数据。启用 **GuardDuty 恶意软件保护**之后,当 [GuardDuty 检测到您在 EC2 上运行的 EC2 实例或容器工作负载之一正在执行可疑操作](https://docs.aws.amazon.com/guardduty/latest/ug/gd-findings-initiate-malware-protection-scan.html)时,就会启动恶意软件扫描。例如,当 EC2 实例与已知恶意的命令和控制服务器进行通信时,或者正在对其他 EC2 实例执行拒绝服务 (DoS) 或蛮力破解攻击时,就会触发恶意软件扫描。\n\nGuardDuty [支持许多文件系统类型](https://docs.aws.amazon.com/guardduty/latest/ug/malware-protection-supported-file-formats.html),该工具会扫描已知用于传播或包含恶意软件的文件格式,包括 Windows 和 Linux 可执行文件、PDF 文件、存档、二进制文件、脚本、安装程序、电子邮件数据库和普通电子邮件。\n\n识别出潜在的恶意软件后,将生成可操作的安全调查结果,其中包含威胁和文件名、文件路径、EC2 实例 ID、资源标签以及(如果是容器)容器 ID 和使用的容器映像等信息。GuardDuty 支持在 EC2 上运行的容器工作负载,包括客户管理的 [Kubernetes](https://kubernetes.io/) 集群或个别 [Docker 容器](https://www.docker.com/resources/what-container/)。如果容器由 [Amazon Elastic Kubernetes Service (EKS) ](https://aws.amazon.com/eks/)or [Amazon Elastic Container Service (Amazon ECS)](https://aws.amazon.com/ecs/) 管理,则调查结果还包括集群名称和[任务](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html)或 [pod](https://kubernetes.io/docs/concepts/workloads/pods/) ID,因此应用程序安全团队可以快速找到受影响的容器资源。\n\n与所有其他 GuardDuty 调查结果一样,恶意软件检测将发送到 GuardDuty 控制台,通过 [Amazon EventBridge](https://aws.amazon.com/eventbridge) 推送,路由到 [AWS Security Hub](https://aws.amazon.com/security-hub/),然后在 [Amazon Detective](https://aws.amazon.com/detective) 中提供以开展事件调查。\n\n#### **++GuardDuty 恶意软件保护的工作原理++**\n启用恶意软件保护后,您将设置一个 [Amazon Identity and Access Management (IAM) 服务相关角色,该角色授予 GuardDuty 执行恶意软件扫描的权限](https://aws.amazon.com/iam/)。对 EC2 实例启动恶意软件扫描时,GuardDuty 恶意软件保护使用这些权限拍摄小于 1 TB 的附加 [Amazon Elastic Block Store (EBS)](https://aws.amazon.com/ebs/) 卷快照,然后在同一 [Amazon 区域](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/#Regions)内的 Amazon 服务账户中恢复 EBS 卷,以对它们进行恶意软件扫描。您可以使用标记,从这些权限和扫描中包括或排除 EC2 实例。这样,您无需部署安全软件或代理来监控恶意软件,扫描卷的操作也不会影响正在运行的工作负载。扫描完成后,将删除服务账户中的 EBS 卷和您账户中的快照。或者,您可以在检测到恶意软件时保留快照。\n\n服务相关角色授予 GuardDuty 访问用于加密 EBS 卷的 [Amazon Key Management Service (Amazon KMS) ](https://aws.amazon.com/kms/)密钥的权限。如果对附加到可能遭到入侵的 EC2 实例的 EBS 卷使用客户托管式密钥进行加密,则 GuardDuty 恶意软件保护也会使用相同的密钥来加密副本 EBS 卷。如果这些卷未加密,GuardDuty 将使用自己的密钥来加密副本 EBS 卷并确保隐私。不支持使用 EBS 托管式密钥加密的卷。\n\n云中的安全是您与 Amazon [共同承担的责任](https://aws.amazon.com/compliance/shared-responsibility-model/)。作为防护机制,GuardDuty 恶意软件保护使用的服务相关角色如果具有 ```GuardDutyExcluded\\n```标签,则无法对您的资源(例如 EBS 快照和卷、EC2 实例和 KMS 密钥)执行任何操作。在将 ```\\nGuardDutyExcluded\\n```设置为 ```true\\n```的情况下标记快照后,GuardDuty 服务将无法访问这些快照。```GuardDutyExclud``` 标签将取代任何包含标记。权限还会限制 GuardDuty 修改快照的方式,以便在与 GuardDuty 服务账户共享时无法将其公开。\n\n由 GuardDuty 创建的 EBS 卷始终是加密的。GuardDuty 只能在具有 GuardDuty 扫描 ID 标签的 EBS 快照上使用 KMS 密钥。在获得 EC2 检测结果后创建快照时,GuardDuty 会添加扫描 ID 标签。无法从除 [Amazon EBS](https://aws.amazon.com/cn/ebs/?trk=cndc-detail) 服务之外的任何其他[上下文](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)调用与 GuardDuty 服务账户共享的 KMS 密钥。扫描成功完成后,将撤销 KMS 密钥授予并删除 GuardDuty 服务账户中的卷副本,从而确保 GuardDuty 服务在完成扫描操作后无法访问您的数据。\n\n#### **++为 Amazon 账户启用恶意软件保护++**\n如果您尚未使用 GuardDuty,则在为自己的账户激活 GuardDuty 时,默认情况下会启用恶意软件保护。我已经在使用 GuardDuty,因此需要从控制台启用恶意软件保护。如果您正在使用 [Amazon Organizations](https://aws.amazon.com/organizations/),您的[代理管理员账户](https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_organizations.html)可以为现有成员账户启用此功能,并配置是否应自动注册组织中的新 Amazon 账户。\n\n在 GuardDuty 控制台中,我选择导航窗格中 **Settings**(设置)下的 **Malware Protection**(恶意软件保护)。在其中,我选择 **Enable**(启用),然后选择 **Enable Malware Protection**(启用恶意软件保护)。\n\n![image.png](https://dev-media.amazoncloud.cn/a96814621aa9466a8d758e5e0c51a844_image.png)\n\n屏幕截图在扫描后会自动删除。在 **General settings**(常规设置)中,我可以选择将检测到恶意软件的屏幕截图保留在我的 Amazon 账户中,并将其用于进一步分析。\n\n![image.png](https://dev-media.amazoncloud.cn/583297e9ec7a4afa9a6a3c54d6712e57_image.png)\n\n在 **Scan options**(扫描选项)中,我可以配置包含标签的列表,以便只扫描带有这些标签的 EC2 实例;或者排除标签,以便跳过列表中包含标签的 EC2 实例。\n\n![image.png](https://dev-media.amazoncloud.cn/467bb293b9d040e984773c3cffe5e225_image.png)\n\n#### **++测试恶意软件保护 GuardDuty 检测结果++**\n为了生成几个 [Amazon GuardDuty](https://aws.amazon.com/cn/guardduty/?trk=cndc-detail) 检测结果,包括新的恶意软件保护检测结果,我克隆了 [Amazon GuardDuty](https://aws.amazon.com/cn/guardduty/?trk=cndc-detail) Tester 存储库:\n\n```\\n\$ git clone https://github.com/awslabs/amazon-guardduty-tester\\n```\n\n首先,我使用 ```guardduty-tester.template``` 文件创建一个 [Amazon CloudFormation](https://aws.amazon.com/cloudformation/) 堆栈。堆栈准备就绪后,我会按照说明将 SSH 客户端配置为通过堡垒主机登录到测试器实例。然后,我连接到测试器实例:\n\n```\\n\$ ssh tester\\n```\n\n从测试器实例中,我启动```guardduty_tester.sh``` 脚本来生成检测结果:\n\n```\\n\$ ./guardduty_tester.sh \\n\\n*********************************************************************\\n* Test #1 - Internal port scanning *\\n* This simulates internal reconaissance by an internal actor or an *\\n* external actor after an initial compromise.This is considered a *\\n* low priority finding for GuardDuty because its not a clear indicator*\\n* of malicious intent on its own. *\\n*********************************************************************\\n\\n\\nStarting Nmap 6.40 ( http://nmap.org ) at 2022-05-19 09:36 UTC\\nNmap scan report for ip-172-16-0-20.us-west-2.compute.internal (172.16.0.20)\\nHost is up (0.00032s latency).\\nNot shown: 997 filtered ports\\nPORT STATE SERVICE\\n22/tcp open ssh\\n80/tcp closed http\\n5050/tcp closed mmcc\\nMAC Address: 06:25:CB:F4:E0:51 (Unknown)\\n\\nNmap done: 1 IP address (1 host up) scanned in 4.96 seconds\\n\\n-----------------------------------------------------------------------\\n\\n*********************************************************************\\n* Test #2 - SSH Brute Force with Compromised Keys *\\n* This simulates an SSH brute force attack on an SSH port that we *\\n* can access from this instance.It uses (phony) compromised keys in *\\n* many subsequent attempts to see if one works.This is a common *\\n* techique where the bad actors will harvest keys from the web in *\\n* places like source code repositories where people accidentally leave*\\n* keys and credentials (This attempt will not actually succeed in *\\n* obtaining access to the target linux instance in this subnet) *\\n*********************************************************************\\n\\n2022-05-19 09:36:29 START\\n2022-05-19 09:36:29 Crowbar v0.4.3-dev\\n2022-05-19 09:36:29 Trying 172.16.0.20:22\\n2022-05-19 09:36:33 STOP\\n2022-05-19 09:36:33 No results found...\\n2022-05-19 09:36:33 START\\n2022-05-19 09:36:33 Crowbar v0.4.3-dev\\n2022-05-19 09:36:33 Trying 172.16.0.20:22\\n2022-05-19 09:36:37 STOP\\n2022-05-19 09:36:37 No results found...\\n2022-05-19 09:36:37 START\\n2022-05-19 09:36:37 Crowbar v0.4.3-dev\\n2022-05-19 09:36:37 Trying 172.16.0.20:22\\n2022-05-19 09:36:41 STOP\\n2022-05-19 09:36:41 No results found...\\n2022-05-19 09:36:41 START\\n2022-05-19 09:36:41 Crowbar v0.4.3-dev\\n2022-05-19 09:36:41 Trying 172.16.0.20:22\\n2022-05-19 09:36:45 STOP\\n2022-05-19 09:36:45 No results found...\\n2022-05-19 09:36:45 START\\n2022-05-19 09:36:45 Crowbar v0.4.3-dev\\n2022-05-19 09:36:45 Trying 172.16.0.20:22\\n2022-05-19 09:36:48 STOP\\n2022-05-19 09:36:48 No results found...\\n2022-05-19 09:36:49 START\\n2022-05-19 09:36:49 Crowbar v0.4.3-dev\\n2022-05-19 09:36:49 Trying 172.16.0.20:22\\n2022-05-19 09:36:52 STOP\\n2022-05-19 09:36:52 No results found...\\n2022-05-19 09:36:52 START\\n2022-05-19 09:36:52 Crowbar v0.4.3-dev\\n2022-05-19 09:36:52 Trying 172.16.0.20:22\\n2022-05-19 09:36:56 STOP\\n2022-05-19 09:36:56 No results found...\\n2022-05-19 09:36:56 START\\n2022-05-19 09:36:56 Crowbar v0.4.3-dev\\n2022-05-19 09:36:56 Trying 172.16.0.20:22\\n2022-05-19 09:37:00 STOP\\n2022-05-19 09:37:00 No results found...\\n2022-05-19 09:37:00 START\\n2022-05-19 09:37:00 Crowbar v0.4.3-dev\\n2022-05-19 09:37:00 Trying 172.16.0.20:22\\n2022-05-19 09:37:04 STOP\\n2022-05-19 09:37:04 No results found...\\n2022-05-19 09:37:04 START\\n2022-05-19 09:37:04 Crowbar v0.4.3-dev\\n2022-05-19 09:37:04 Trying 172.16.0.20:22\\n2022-05-19 09:37:08 STOP\\n2022-05-19 09:37:08 No results found...\\n2022-05-19 09:37:08 START\\n2022-05-19 09:37:08 Crowbar v0.4.3-dev\\n2022-05-19 09:37:08 Trying 172.16.0.20:22\\n2022-05-19 09:37:12 STOP\\n2022-05-19 09:37:12 No results found...\\n2022-05-19 09:37:12 START\\n2022-05-19 09:37:12 Crowbar v0.4.3-dev\\n2022-05-19 09:37:12 Trying 172.16.0.20:22\\n2022-05-19 09:37:16 STOP\\n2022-05-19 09:37:16 No results found...\\n2022-05-19 09:37:16 START\\n2022-05-19 09:37:16 Crowbar v0.4.3-dev\\n2022-05-19 09:37:16 Trying 172.16.0.20:22\\n2022-05-19 09:37:20 STOP\\n2022-05-19 09:37:20 No results found...\\n2022-05-19 09:37:20 START\\n2022-05-19 09:37:20 Crowbar v0.4.3-dev\\n2022-05-19 09:37:20 Trying 172.16.0.20:22\\n2022-05-19 09:37:23 STOP\\n2022-05-19 09:37:23 No results found...\\n2022-05-19 09:37:23 START\\n2022-05-19 09:37:23 Crowbar v0.4.3-dev\\n2022-05-19 09:37:23 Trying 172.16.0.20:22\\n2022-05-19 09:37:27 STOP\\n2022-05-19 09:37:27 No results found...\\n2022-05-19 09:37:27 START\\n2022-05-19 09:37:27 Crowbar v0.4.3-dev\\n2022-05-19 09:37:27 Trying 172.16.0.20:22\\n2022-05-19 09:37:31 STOP\\n2022-05-19 09:37:31 No results found...\\n2022-05-19 09:37:31 START\\n2022-05-19 09:37:31 Crowbar v0.4.3-dev\\n2022-05-19 09:37:31 Trying 172.16.0.20:22\\n2022-05-19 09:37:34 STOP\\n2022-05-19 09:37:34 No results found...\\n2022-05-19 09:37:35 START\\n2022-05-19 09:37:35 Crowbar v0.4.3-dev\\n2022-05-19 09:37:35 Trying 172.16.0.20:22\\n2022-05-19 09:37:38 STOP\\n2022-05-19 09:37:38 No results found...\\n2022-05-19 09:37:38 START\\n2022-05-19 09:37:38 Crowbar v0.4.3-dev\\n2022-05-19 09:37:38 Trying 172.16.0.20:22\\n2022-05-19 09:37:42 STOP\\n2022-05-19 09:37:42 No results found...\\n2022-05-19 09:37:42 START\\n2022-05-19 09:37:42 Crowbar v0.4.3-dev\\n2022-05-19 09:37:42 Trying 172.16.0.20:22\\n2022-05-19 09:37:46 STOP\\n2022-05-19 09:37:46 No results found...\\n\\n-----------------------------------------------------------------------\\n\\n*********************************************************************\\n* Test #3 - RDP Brute Force with Password List *\\n* This simulates an RDP brute force attack on the internal RDP port *\\n* of the windows server that we installed in the environment. It uses*\\n* a list of common passwords that can be found on the web.This test *\\n* will trigger a detection, but will fail to get into the target *\\n* windows instance. *\\n*********************************************************************\\n\\nSending 250 password attempts at the windows server...\\nHydra v9.4-dev (c) 2022 by van Hauser/THC & David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes (this is non-binding, these *** ignore laws and ethics anyway).\\n\\nHydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2022-05-19 09:37:46\\n[WARNING] rdp servers often don't like many connections, use -t 1 or -t 4 to reduce the number of parallel connections and -W 1 or -W 3 to wait between connection to allow the server to recover\\n[INFO] Reduced number of tasks to 4 (rdp does not like many parallel connections)\\n[WARNING] the rdp module is experimental.Please test, report - and if possible, fix.\\n[DATA] max 4 tasks per 1 server, overall 4 tasks, 1792 login tries (l:7/p:256), ~448 tries per task\\n[DATA] attacking rdp://172.16.0.24:3389/\\n[STATUS] 1099.00 tries/min, 1099 tries in 00:01h, 693 to do in 00:01h, 4 active\\n1 of 1 target completed, 0 valid password found\\nHydra (https://github.com/vanhauser-thc/thc-hydra) finished at 2022-05-19 09:39:23\\n\\n-----------------------------------------------------------------------\\n\\n*********************************************************************\\n* Test #4 - CryptoCurrency Mining Activity *\\n* This simulates interaction with a cryptocurrency mining pool which *\\n* can be an indication of an instance compromise.In this case, we are*\\n* only interacting with the URL of the pool, but not downloading *\\n* any files.This will trigger a threat intel based detection. *\\n*********************************************************************\\n\\nCalling bitcoin wallets to download mining toolkits\\n\\n-----------------------------------------------------------------------\\n\\n*********************************************************************\\n* Test #5 - DNS Exfiltration *\\n* A common exfiltration technique is to tunnel data out over DNS *\\n* to a fake domain. Its an effective technique because most hosts *\\n* have outbound DNS ports open. This test wont exfiltrate any data, *\\n* but it will generate enough unusual DNS activity to trigger the *\\n* detection. *\\n*********************************************************************\\n\\nCalling large numbers of large domains to simulate tunneling via DNS\\n\\n*********************************************************************\\n* Test #6 - Fake domain to prove that GuardDuty is working *\\n* This is a permanent fake domain that customers can use to prove that*\\n* GuardDuty is working. Calling this domain will always generate the *\\n* Backdoor:EC2/C&CActivity.B!DNS finding type *\\n*********************************************************************\\n\\nCalling a well known fake domain that is used to generate a known finding\\n\\n; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.amzn2.5.2 <<>> GuardDutyC2ActivityB.com any\\n;; global options: +cmd\\n;; Got answer:\\n;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11495\\n;; flags: qr rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 1\\n\\n;; OPT PSEUDOSECTION:\\n; EDNS: version: 0, flags:; udp: 4096\\n;; QUESTION SECTION:\\n;GuardDutyC2ActivityB.com.\\tIN\\tANY\\n\\n;; ANSWER SECTION:\\nGuardDutyC2ActivityB.com.6943\\tIN\\tSOA\\tns1.markmonitor.com. hostmaster.markmonitor.com.2018091906 86400 3600 2592000 172800\\nGuardDutyC2ActivityB.com.6943\\tIN\\tNS\\tns3.markmonitor.com.\\nGuardDutyC2ActivityB.com.6943\\tIN\\tNS\\tns5.markmonitor.com.\\nGuardDutyC2ActivityB.com.6943\\tIN\\tNS\\tns7.markmonitor.com.\\nGuardDutyC2ActivityB.com.6943\\tIN\\tNS\\tns2.markmonitor.com.\\nGuardDutyC2ActivityB.com.6943\\tIN\\tNS\\tns4.markmonitor.com.\\nGuardDutyC2ActivityB.com.6943\\tIN\\tNS\\tns6.markmonitor.com.\\nGuardDutyC2ActivityB.com.6943\\tIN\\tNS\\tns1.markmonitor.com.\\n\\n;; Query time: 27 msec\\n;; SERVER: 172.16.0.2#53(172.16.0.2)\\n;; WHEN: Thu May 19 09:39:23 UTC 2022\\n;; MSG SIZE rcvd: 238\\n\\n\\n*****************************************************************************************************\\n预期的 GuardDuty 检测结果\\n\\n测试 1:内部端口扫描\\n预期的检测结果:EC2 实例 i-011e73af27562827b 正在对远程主机执行出站端口扫描。172.16.0.20\\n检测结果类型:Recon:EC2/Portscan\\n\\n测试 2:使用泄露密钥的 SSH 蛮力攻击\\n预期有两个检测结果 - 一个用于出站检测,另一个用于入站检测\\n出站:i-011e73af27562827b 正在对 172.16.0.20 进行 SSH 蛮力攻击\\n入站:172.16.0.25 正在对 i-0bada13e0aa12d383 进行 SSH 蛮力攻击\\n检测结果类型:UnauthorizedAccess:EC2/SSHBruteForce\\n\\n测试 3:使用密码列表的 RDP 蛮力攻击\\n预期有两个检测结果 - 一个用于出站检测,另一个用于入站检测\\n出站:i-011e73af27562827b 正在对 172.16.0.24 进行 RDP 蛮力攻击\\n入站:172.16.0.25 正在对 i-0191573dec3b66924 进行 RDP 蛮力攻击\\n检测结果类型:UnauthorizedAccess:EC2/RDPBruteForce\\n\\n测试 4:加密货币活动\\n预期的检测结果:EC2 实例 i-011e73af27562827b 正在查询与比特币活动相关的域名\\n检测结果类型:CryptoCurrency:EC2/BitcoinTool.B!DNS\\n\\n测试 5:DNS 渗透\\n预期的检测结果:EC2 实例 i-011e73af27562827b 正在尝试查询与泄露数据相似的域名\\n检测结果类型:Trojan:EC2/DNSDataExfiltration\\n\\n测试 6:C&C 活动\\n预期检测结果:EC2 实例 i-011e73af27562827b 正在查询与已知命令与控制服务器关联的域名。\\n检测结果类型:Backdoor:EC2/C&CActivity.B!DNS\\n```\n\n几分钟后,检测结果将显示在 GuardDuty 控制台中。在顶部,我看到了新的恶意软件保护功能发现的恶意文件。其中一个检测结果与 EC2 实例相关,另一个与 ECS 集群相关。\n\n![image.png](https://dev-media.amazoncloud.cn/011b2459766242b082512373132a8e5e_image.png)\n\n首先,我选择与 EC2 实例相关的检测结果。在面板中,我看到有关实例和恶意文件的信息,例如文件名和路径。在 Malware scan details(恶意软件扫描详细信息)部分中,Trigger finding ID(触发检测结果 ID)指向触发恶意软件扫描的原始 GuardDuty 检测结果。就我而言,最初的检测结果是此 EC2 实例正在对另一个 EC2 实例执行 RDP 蛮力攻击。\n\n![image.png](https://dev-media.amazoncloud.cn/11848354ea9c42949b7903e289fc67fc_image.png)\n\n在此处,我选择 **Investigate with Detective**(使用 Detective 调查),然后直接从 GuardDuty 控制台转到 [Detective 控制台](https://console.aws.amazon.com/detective),从中可视化 EC2 实例、Amazon 账户和受检测结果影响的 IP 地址的 [Amazon CloudTrail](https://aws.amazon.com/cloudtrail/) 和 [Amazon Virtual Private Cloud (Amazon VPC)](https://aws.amazon.com/vpc/) 流数据。使用 Detective,我可以分析、调查和确定 GuardDuty 发现的可疑活动的根本原因。\n\n![image.png](https://dev-media.amazoncloud.cn/b1806092ac054173a9a66d7cc11c7875_image.png)\n\n选择与 ECS 群集相关的检测结果时,我将获得有关受影响资源的更多信息,例如 ECS 集群、任务、容器和容器映像的详细信息。\n\n![image.png](https://dev-media.amazoncloud.cn/fbe69d5f07be4ee896817493be048a0d_image.png)\n\n使用 GuardDuty 测试器脚本可以更轻松地测试 GuardDuty 与您使用的其他安全框架的整体集成,以便在检测到真正的威胁时做好准备。\n\n#### **++将 GuardDuty 恶意软件防护保护与 [Amazon Inspector](https://aws.amazon.com/cn/inspector/?trk=cndc-detail) 进行比较++**\n此时,您可能会问自己 GuardDuty 恶意软件保护与 [Amazon Inspector](https://aws.amazon.com/inspector/) 有何关系,[Amazon Inspector](https://aws.amazon.com/cn/inspector/?trk=cndc-detail) 是一项扫描 AWS 工作负载的软件漏洞和意外网络暴露的服务。这两种服务相辅相成,提供不同的保护层:\n\n- [Amazon Inspector](https://aws.amazon.com/cn/inspector/?trk=cndc-detail) 通过识别和修复已知软件和应用程序漏洞提供主动防护,这些漏洞是攻击者入侵资源和安装恶意软件的入口点。\n- GuardDuty 恶意软件保护可检测到活跃运行的工作负载中存在的恶意软件。此时,系统已经受损,但是 GuardDuty 可以限制感染的时间,并在系统受损导致影响业务的事件之前采取措施。\n#### **++可用性和定价++**\n[Amazon GuardDuty](https://aws.amazon.com/guardduty/) 恶意软件保护现已在[所有提供 GuardDuty 的 Amazon 区域](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/)推出,不包括 AWS 中国(北京)、Amazon 中国(宁夏)、Amazon GovCloud(美国东部)和 Amazon GovCloud(美国西部)区域。\n\n在发布时,GuardDuty 恶意软件保护已与以下合作伙伴产品集成:\n\n- [BitDefender](https://www.bitdefender.com/)\n- [CloudHesive](https://www.cloudhesive.com/)\n- [Crowdstrike](http://www.crowdstrike.com/)\n- [Fortinet](https://www.fortinet.com/)\n- [Palo Alto Networks](https://www.paloaltonetworks.com/)\n- [Rapid7](https://www.rapid7.com/)\n- [Sophos](https://www.sophos.com/)\n- [Sysdig](https://sysdig.com/)\n- [Trellix](https://www.trellix.com/)\n\n使用 GuardDuty,您无需部署安全软件或代理来监控恶意软件。您只需为文件系统中扫描的 GB 量(而不是 EBS 卷的大小)和 EBS 快照保存在您账户中的时间付费。除非您在发现恶意软件时启用快照保留功能,否则 GuardDuty 创建的所有 EBS 快照都会在扫描后自动删除。有关更多信息,请参阅 [GuardDuty 定价](https://aws.amazon.com/guardduty/pricing/)和 [EBS 定价](https://aws.amazon.com/ebs/pricing/)。请注意,GuardDuty 仅扫描小于 1 TB 的 EBS 卷。为了帮助您控制成本并避免重复警报,同一卷的扫描频率不会超过每 24 小时一次。\n\n#### **[使用 Amazon GuardDuty 检测恶意活动并保护您的应用程序免受恶意软件侵害。](https://aws.amazon.com/guardduty/faqs/#GuardDuty_Malware_Protection)**\n\n— [Danilo](https://twitter.com/danilop)","render":"<p>借助 <a href=\\"https://aws.amazon.com/guardduty/\\" target=\\"_blank\\">Amazon GuardDuty</a>,您可以监控自己的 AWS 账户和工作负载以检测恶意活动。我们于近日在 GuardDuty 中增加了检测恶意软件的功能。恶意软件用于危害工作负载、重新调整资源用途或未经授权访问数据。启用 <strong>GuardDuty 恶意软件保护</strong>之后,当 <a href=\\"https://docs.aws.amazon.com/guardduty/latest/ug/gd-findings-initiate-malware-protection-scan.html\\" target=\\"_blank\\">GuardDuty 检测到您在 EC2 上运行的 EC2 实例或容器工作负载之一正在执行可疑操作</a>时,就会启动恶意软件扫描。例如,当 EC2 实例与已知恶意的命令和控制服务器进行通信时,或者正在对其他 EC2 实例执行拒绝服务 (DoS) 或蛮力破解攻击时,就会触发恶意软件扫描。</p>\\n<p>GuardDuty <a href=\\"https://docs.aws.amazon.com/guardduty/latest/ug/malware-protection-supported-file-formats.html\\" target=\\"_blank\\">支持许多文件系统类型</a>,该工具会扫描已知用于传播或包含恶意软件的文件格式,包括 Windows 和 Linux 可执行文件、PDF 文件、存档、二进制文件、脚本、安装程序、电子邮件数据库和普通电子邮件。</p>\\n<p>识别出潜在的恶意软件后,将生成可操作的安全调查结果,其中包含威胁和文件名、文件路径、EC2 实例 ID、资源标签以及(如果是容器)容器 ID 和使用的容器映像等信息。GuardDuty 支持在 EC2 上运行的容器工作负载,包括客户管理的 <a href=\\"https://kubernetes.io/\\" target=\\"_blank\\">Kubernetes</a> 集群或个别 <a href=\\"https://www.docker.com/resources/what-container/\\" target=\\"_blank\\">Docker 容器</a>。如果容器由 <a href=\\"https://aws.amazon.com/eks/\\" target=\\"_blank\\">Amazon Elastic Kubernetes Service (EKS) </a>or <a href=\\"https://aws.amazon.com/ecs/\\" target=\\"_blank\\">Amazon Elastic Container Service (Amazon ECS)</a> 管理,则调查结果还包括集群名称和<a href=\\"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html\\" target=\\"_blank\\">任务</a>或 <a href=\\"https://kubernetes.io/docs/concepts/workloads/pods/\\" target=\\"_blank\\">pod</a> ID,因此应用程序安全团队可以快速找到受影响的容器资源。</p>\\n<p>与所有其他 GuardDuty 调查结果一样,恶意软件检测将发送到 GuardDuty 控制台,通过 <a href=\\"https://aws.amazon.com/eventbridge\\" target=\\"_blank\\">Amazon EventBridge</a> 推送,路由到 <a href=\\"https://aws.amazon.com/security-hub/\\" target=\\"_blank\\">AWS Security Hub</a>,然后在 <a href=\\"https://aws.amazon.com/detective\\" target=\\"_blank\\">Amazon Detective</a> 中提供以开展事件调查。</p>\\n<h4><a id=\\"GuardDuty__8\\"></a><strong><ins>GuardDuty 恶意软件保护的工作原理</ins></strong></h4>\n<p>启用恶意软件保护后,您将设置一个 <a href=\\"https://aws.amazon.com/iam/\\" target=\\"_blank\\">Amazon Identity and Access Management (IAM) 服务相关角色,该角色授予 GuardDuty 执行恶意软件扫描的权限</a>。对 EC2 实例启动恶意软件扫描时,GuardDuty 恶意软件保护使用这些权限拍摄小于 1 TB 的附加 <a href=\\"https://aws.amazon.com/ebs/\\" target=\\"_blank\\">Amazon Elastic Block Store (EBS)</a> 卷快照,然后在同一 <a href=\\"https://aws.amazon.com/about-aws/global-infrastructure/regions_az/#Regions\\" target=\\"_blank\\">Amazon 区域</a>内的 Amazon 服务账户中恢复 EBS 卷,以对它们进行恶意软件扫描。您可以使用标记,从这些权限和扫描中包括或排除 EC2 实例。这样,您无需部署安全软件或代理来监控恶意软件,扫描卷的操作也不会影响正在运行的工作负载。扫描完成后,将删除服务账户中的 EBS 卷和您账户中的快照。或者,您可以在检测到恶意软件时保留快照。</p>\\n<p>服务相关角色授予 GuardDuty 访问用于加密 EBS 卷的 <a href=\\"https://aws.amazon.com/kms/\\" target=\\"_blank\\">Amazon Key Management Service (Amazon KMS) </a>密钥的权限。如果对附加到可能遭到入侵的 EC2 实例的 EBS 卷使用客户托管式密钥进行加密,则 GuardDuty 恶意软件保护也会使用相同的密钥来加密副本 EBS 卷。如果这些卷未加密,GuardDuty 将使用自己的密钥来加密副本 EBS 卷并确保隐私。不支持使用 EBS 托管式密钥加密的卷。</p>\\n<p>云中的安全是您与 Amazon <a href=\\"https://aws.amazon.com/compliance/shared-responsibility-model/\\" target=\\"_blank\\">共同承担的责任</a>。作为防护机制,GuardDuty 恶意软件保护使用的服务相关角色如果具有 <code>GuardDutyExcluded </code>标签,则无法对您的资源(例如 EBS 快照和卷、EC2 实例和 KMS 密钥)执行任何操作。在将 <code>GuardDutyExcluded</code>设置为 <code>true </code>的情况下标记快照后,GuardDuty 服务将无法访问这些快照。<code>GuardDutyExclud</code> 标签将取代任何包含标记。权限还会限制 GuardDuty 修改快照的方式,以便在与 GuardDuty 服务账户共享时无法将其公开。</p>\\n<p>由 GuardDuty 创建的 EBS 卷始终是加密的。GuardDuty 只能在具有 GuardDuty 扫描 ID 标签的 EBS 快照上使用 KMS 密钥。在获得 EC2 检测结果后创建快照时,GuardDuty 会添加扫描 ID 标签。无法从除 Amazon EBS 服务之外的任何其他<a href=\\"https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context\\" target=\\"_blank\\">上下文</a>调用与 GuardDuty 服务账户共享的 KMS 密钥。扫描成功完成后,将撤销 KMS 密钥授予并删除 GuardDuty 服务账户中的卷副本,从而确保 GuardDuty 服务在完成扫描操作后无法访问您的数据。</p>\\n<h4><a id=\\"_Amazon__21\\"></a><strong><ins>为 Amazon 账户启用恶意软件保护</ins></strong></h4>\n<p>如果您尚未使用 GuardDuty,则在为自己的账户激活 GuardDuty 时,默认情况下会启用恶意软件保护。我已经在使用 GuardDuty,因此需要从控制台启用恶意软件保护。如果您正在使用 <a href=\\"https://aws.amazon.com/organizations/\\" target=\\"_blank\\">Amazon Organizations</a>,您的<a href=\\"https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_organizations.html\\" target=\\"_blank\\">代理管理员账户</a>可以为现有成员账户启用此功能,并配置是否应自动注册组织中的新 Amazon 账户。</p>\\n<p>在 GuardDuty 控制台中,我选择导航窗格中 <strong>Settings</strong>(设置)下的 <strong>Malware Protection</strong>(恶意软件保护)。在其中,我选择 <strong>Enable</strong>(启用),然后选择 <strong>Enable Malware Protection</strong>(启用恶意软件保护)。</p>\\n<p><img src=\\"https://dev-media.amazoncloud.cn/a96814621aa9466a8d758e5e0c51a844_image.png\\" alt=\\"image.png\\" /></p>\n<p>屏幕截图在扫描后会自动删除。在 <strong>General settings</strong>(常规设置)中,我可以选择将检测到恶意软件的屏幕截图保留在我的 Amazon 账户中,并将其用于进一步分析。</p>\\n<p><img src=\\"https://dev-media.amazoncloud.cn/583297e9ec7a4afa9a6a3c54d6712e57_image.png\\" alt=\\"image.png\\" /></p>\n<p>在 <strong>Scan options</strong>(扫描选项)中,我可以配置包含标签的列表,以便只扫描带有这些标签的 EC2 实例;或者排除标签,以便跳过列表中包含标签的 EC2 实例。</p>\\n<p><img src=\\"https://dev-media.amazoncloud.cn/467bb293b9d040e984773c3cffe5e225_image.png\\" alt=\\"image.png\\" /></p>\n<h4><a id=\\"_GuardDuty__36\\"></a><strong><ins>测试恶意软件保护 GuardDuty 检测结果</ins></strong></h4>\n<p>为了生成几个 Amazon GuardDuty 检测结果,包括新的恶意软件保护检测结果,我克隆了 Amazon GuardDuty Tester 存储库:</p>\n<pre><code class=\\"lang-\\">\$ git clone https://github.com/awslabs/amazon-guardduty-tester\\n</code></pre>\\n<p>首先,我使用 <code>guardduty-tester.template</code> 文件创建一个 <a href=\\"https://aws.amazon.com/cloudformation/\\" target=\\"_blank\\">Amazon CloudFormation</a> 堆栈。堆栈准备就绪后,我会按照说明将 SSH 客户端配置为通过堡垒主机登录到测试器实例。然后,我连接到测试器实例:</p>\\n<pre><code class=\\"lang-\\">\$ ssh tester\\n</code></pre>\\n<p>从测试器实例中,我启动<code>guardduty_tester.sh</code> 脚本来生成检测结果:</p>\\n<pre><code class=\\"lang-\\">\$ ./guardduty_tester.sh \\n\\n*********************************************************************\\n* Test #1 - Internal port scanning *\\n* This simulates internal reconaissance by an internal actor or an *\\n* external actor after an initial compromise.This is considered a *\\n* low priority finding for GuardDuty because its not a clear indicator*\\n* of malicious intent on its own. *\\n*********************************************************************\\n\\n\\nStarting Nmap 6.40 ( http://nmap.org ) at 2022-05-19 09:36 UTC\\nNmap scan report for ip-172-16-0-20.us-west-2.compute.internal (172.16.0.20)\\nHost is up (0.00032s latency).\\nNot shown: 997 filtered ports\\nPORT STATE SERVICE\\n22/tcp open ssh\\n80/tcp closed http\\n5050/tcp closed mmcc\\nMAC Address: 06:25:CB:F4:E0:51 (Unknown)\\n\\nNmap done: 1 IP address (1 host up) scanned in 4.96 seconds\\n\\n-----------------------------------------------------------------------\\n\\n*********************************************************************\\n* Test #2 - SSH Brute Force with Compromised Keys *\\n* This simulates an SSH brute force attack on an SSH port that we *\\n* can access from this instance.It uses (phony) compromised keys in *\\n* many subsequent attempts to see if one works.This is a common *\\n* techique where the bad actors will harvest keys from the web in *\\n* places like source code repositories where people accidentally leave*\\n* keys and credentials (This attempt will not actually succeed in *\\n* obtaining access to the target linux instance in this subnet) *\\n*********************************************************************\\n\\n2022-05-19 09:36:29 START\\n2022-05-19 09:36:29 Crowbar v0.4.3-dev\\n2022-05-19 09:36:29 Trying 172.16.0.20:22\\n2022-05-19 09:36:33 STOP\\n2022-05-19 09:36:33 No results found...\\n2022-05-19 09:36:33 START\\n2022-05-19 09:36:33 Crowbar v0.4.3-dev\\n2022-05-19 09:36:33 Trying 172.16.0.20:22\\n2022-05-19 09:36:37 STOP\\n2022-05-19 09:36:37 No results found...\\n2022-05-19 09:36:37 START\\n2022-05-19 09:36:37 Crowbar v0.4.3-dev\\n2022-05-19 09:36:37 Trying 172.16.0.20:22\\n2022-05-19 09:36:41 STOP\\n2022-05-19 09:36:41 No results found...\\n2022-05-19 09:36:41 START\\n2022-05-19 09:36:41 Crowbar v0.4.3-dev\\n2022-05-19 09:36:41 Trying 172.16.0.20:22\\n2022-05-19 09:36:45 STOP\\n2022-05-19 09:36:45 No results found...\\n2022-05-19 09:36:45 START\\n2022-05-19 09:36:45 Crowbar v0.4.3-dev\\n2022-05-19 09:36:45 Trying 172.16.0.20:22\\n2022-05-19 09:36:48 STOP\\n2022-05-19 09:36:48 No results found...\\n2022-05-19 09:36:49 START\\n2022-05-19 09:36:49 Crowbar v0.4.3-dev\\n2022-05-19 09:36:49 Trying 172.16.0.20:22\\n2022-05-19 09:36:52 STOP\\n2022-05-19 09:36:52 No results found...\\n2022-05-19 09:36:52 START\\n2022-05-19 09:36:52 Crowbar v0.4.3-dev\\n2022-05-19 09:36:52 Trying 172.16.0.20:22\\n2022-05-19 09:36:56 STOP\\n2022-05-19 09:36:56 No results found...\\n2022-05-19 09:36:56 START\\n2022-05-19 09:36:56 Crowbar v0.4.3-dev\\n2022-05-19 09:36:56 Trying 172.16.0.20:22\\n2022-05-19 09:37:00 STOP\\n2022-05-19 09:37:00 No results found...\\n2022-05-19 09:37:00 START\\n2022-05-19 09:37:00 Crowbar v0.4.3-dev\\n2022-05-19 09:37:00 Trying 172.16.0.20:22\\n2022-05-19 09:37:04 STOP\\n2022-05-19 09:37:04 No results found...\\n2022-05-19 09:37:04 START\\n2022-05-19 09:37:04 Crowbar v0.4.3-dev\\n2022-05-19 09:37:04 Trying 172.16.0.20:22\\n2022-05-19 09:37:08 STOP\\n2022-05-19 09:37:08 No results found...\\n2022-05-19 09:37:08 START\\n2022-05-19 09:37:08 Crowbar v0.4.3-dev\\n2022-05-19 09:37:08 Trying 172.16.0.20:22\\n2022-05-19 09:37:12 STOP\\n2022-05-19 09:37:12 No results found...\\n2022-05-19 09:37:12 START\\n2022-05-19 09:37:12 Crowbar v0.4.3-dev\\n2022-05-19 09:37:12 Trying 172.16.0.20:22\\n2022-05-19 09:37:16 STOP\\n2022-05-19 09:37:16 No results found...\\n2022-05-19 09:37:16 START\\n2022-05-19 09:37:16 Crowbar v0.4.3-dev\\n2022-05-19 09:37:16 Trying 172.16.0.20:22\\n2022-05-19 09:37:20 STOP\\n2022-05-19 09:37:20 No results found...\\n2022-05-19 09:37:20 START\\n2022-05-19 09:37:20 Crowbar v0.4.3-dev\\n2022-05-19 09:37:20 Trying 172.16.0.20:22\\n2022-05-19 09:37:23 STOP\\n2022-05-19 09:37:23 No results found...\\n2022-05-19 09:37:23 START\\n2022-05-19 09:37:23 Crowbar v0.4.3-dev\\n2022-05-19 09:37:23 Trying 172.16.0.20:22\\n2022-05-19 09:37:27 STOP\\n2022-05-19 09:37:27 No results found...\\n2022-05-19 09:37:27 START\\n2022-05-19 09:37:27 Crowbar v0.4.3-dev\\n2022-05-19 09:37:27 Trying 172.16.0.20:22\\n2022-05-19 09:37:31 STOP\\n2022-05-19 09:37:31 No results found...\\n2022-05-19 09:37:31 START\\n2022-05-19 09:37:31 Crowbar v0.4.3-dev\\n2022-05-19 09:37:31 Trying 172.16.0.20:22\\n2022-05-19 09:37:34 STOP\\n2022-05-19 09:37:34 No results found...\\n2022-05-19 09:37:35 START\\n2022-05-19 09:37:35 Crowbar v0.4.3-dev\\n2022-05-19 09:37:35 Trying 172.16.0.20:22\\n2022-05-19 09:37:38 STOP\\n2022-05-19 09:37:38 No results found...\\n2022-05-19 09:37:38 START\\n2022-05-19 09:37:38 Crowbar v0.4.3-dev\\n2022-05-19 09:37:38 Trying 172.16.0.20:22\\n2022-05-19 09:37:42 STOP\\n2022-05-19 09:37:42 No results found...\\n2022-05-19 09:37:42 START\\n2022-05-19 09:37:42 Crowbar v0.4.3-dev\\n2022-05-19 09:37:42 Trying 172.16.0.20:22\\n2022-05-19 09:37:46 STOP\\n2022-05-19 09:37:46 No results found...\\n\\n-----------------------------------------------------------------------\\n\\n*********************************************************************\\n* Test #3 - RDP Brute Force with Password List *\\n* This simulates an RDP brute force attack on the internal RDP port *\\n* of the windows server that we installed in the environment. It uses*\\n* a list of common passwords that can be found on the web.This test *\\n* will trigger a detection, but will fail to get into the target *\\n* windows instance. *\\n*********************************************************************\\n\\nSending 250 password attempts at the windows server...\\nHydra v9.4-dev (c) 2022 by van Hauser/THC & David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes (this is non-binding, these *** ignore laws and ethics anyway).\\n\\nHydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2022-05-19 09:37:46\\n[WARNING] rdp servers often don't like many connections, use -t 1 or -t 4 to reduce the number of parallel connections and -W 1 or -W 3 to wait between connection to allow the server to recover\\n[INFO] Reduced number of tasks to 4 (rdp does not like many parallel connections)\\n[WARNING] the rdp module is experimental.Please test, report - and if possible, fix.\\n[DATA] max 4 tasks per 1 server, overall 4 tasks, 1792 login tries (l:7/p:256), ~448 tries per task\\n[DATA] attacking rdp://172.16.0.24:3389/\\n[STATUS] 1099.00 tries/min, 1099 tries in 00:01h, 693 to do in 00:01h, 4 active\\n1 of 1 target completed, 0 valid password found\\nHydra (https://github.com/vanhauser-thc/thc-hydra) finished at 2022-05-19 09:39:23\\n\\n-----------------------------------------------------------------------\\n\\n*********************************************************************\\n* Test #4 - CryptoCurrency Mining Activity *\\n* This simulates interaction with a cryptocurrency mining pool which *\\n* can be an indication of an instance compromise.In this case, we are*\\n* only interacting with the URL of the pool, but not downloading *\\n* any files.This will trigger a threat intel based detection. *\\n*********************************************************************\\n\\nCalling bitcoin wallets to download mining toolkits\\n\\n-----------------------------------------------------------------------\\n\\n*********************************************************************\\n* Test #5 - DNS Exfiltration *\\n* A common exfiltration technique is to tunnel data out over DNS *\\n* to a fake domain. Its an effective technique because most hosts *\\n* have outbound DNS ports open. This test wont exfiltrate any data, *\\n* but it will generate enough unusual DNS activity to trigger the *\\n* detection. *\\n*********************************************************************\\n\\nCalling large numbers of large domains to simulate tunneling via DNS\\n\\n*********************************************************************\\n* Test #6 - Fake domain to prove that GuardDuty is working *\\n* This is a permanent fake domain that customers can use to prove that*\\n* GuardDuty is working. Calling this domain will always generate the *\\n* Backdoor:EC2/C&CActivity.B!DNS finding type *\\n*********************************************************************\\n\\nCalling a well known fake domain that is used to generate a known finding\\n\\n; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.amzn2.5.2 <<>> GuardDutyC2ActivityB.com any\\n;; global options: +cmd\\n;; Got answer:\\n;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11495\\n;; flags: qr rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 1\\n\\n;; OPT PSEUDOSECTION:\\n; EDNS: version: 0, flags:; udp: 4096\\n;; QUESTION SECTION:\\n;GuardDutyC2ActivityB.com.\\tIN\\tANY\\n\\n;; ANSWER SECTION:\\nGuardDutyC2ActivityB.com.6943\\tIN\\tSOA\\tns1.markmonitor.com. hostmaster.markmonitor.com.2018091906 86400 3600 2592000 172800\\nGuardDutyC2ActivityB.com.6943\\tIN\\tNS\\tns3.markmonitor.com.\\nGuardDutyC2ActivityB.com.6943\\tIN\\tNS\\tns5.markmonitor.com.\\nGuardDutyC2ActivityB.com.6943\\tIN\\tNS\\tns7.markmonitor.com.\\nGuardDutyC2ActivityB.com.6943\\tIN\\tNS\\tns2.markmonitor.com.\\nGuardDutyC2ActivityB.com.6943\\tIN\\tNS\\tns4.markmonitor.com.\\nGuardDutyC2ActivityB.com.6943\\tIN\\tNS\\tns6.markmonitor.com.\\nGuardDutyC2ActivityB.com.6943\\tIN\\tNS\\tns1.markmonitor.com.\\n\\n;; Query time: 27 msec\\n;; SERVER: 172.16.0.2#53(172.16.0.2)\\n;; WHEN: Thu May 19 09:39:23 UTC 2022\\n;; MSG SIZE rcvd: 238\\n\\n\\n*****************************************************************************************************\\n预期的 GuardDuty 检测结果\\n\\n测试 1:内部端口扫描\\n预期的检测结果:EC2 实例 i-011e73af27562827b 正在对远程主机执行出站端口扫描。172.16.0.20\\n检测结果类型:Recon:EC2/Portscan\\n\\n测试 2:使用泄露密钥的 SSH 蛮力攻击\\n预期有两个检测结果 - 一个用于出站检测,另一个用于入站检测\\n出站:i-011e73af27562827b 正在对 172.16.0.20 进行 SSH 蛮力攻击\\n入站:172.16.0.25 正在对 i-0bada13e0aa12d383 进行 SSH 蛮力攻击\\n检测结果类型:UnauthorizedAccess:EC2/SSHBruteForce\\n\\n测试 3:使用密码列表的 RDP 蛮力攻击\\n预期有两个检测结果 - 一个用于出站检测,另一个用于入站检测\\n出站:i-011e73af27562827b 正在对 172.16.0.24 进行 RDP 蛮力攻击\\n入站:172.16.0.25 正在对 i-0191573dec3b66924 进行 RDP 蛮力攻击\\n检测结果类型:UnauthorizedAccess:EC2/RDPBruteForce\\n\\n测试 4:加密货币活动\\n预期的检测结果:EC2 实例 i-011e73af27562827b 正在查询与比特币活动相关的域名\\n检测结果类型:CryptoCurrency:EC2/BitcoinTool.B!DNS\\n\\n测试 5:DNS 渗透\\n预期的检测结果:EC2 实例 i-011e73af27562827b 正在尝试查询与泄露数据相似的域名\\n检测结果类型:Trojan:EC2/DNSDataExfiltration\\n\\n测试 6:C&C 活动\\n预期检测结果:EC2 实例 i-011e73af27562827b 正在查询与已知命令与控制服务器关联的域名。\\n检测结果类型:Backdoor:EC2/C&CActivity.B!DNS\\n</code></pre>\\n<p>几分钟后,检测结果将显示在 GuardDuty 控制台中。在顶部,我看到了新的恶意软件保护功能发现的恶意文件。其中一个检测结果与 EC2 实例相关,另一个与 ECS 集群相关。</p>\n<p><img src=\\"https://dev-media.amazoncloud.cn/011b2459766242b082512373132a8e5e_image.png\\" alt=\\"image.png\\" /></p>\n<p>首先,我选择与 EC2 实例相关的检测结果。在面板中,我看到有关实例和恶意文件的信息,例如文件名和路径。在 Malware scan details(恶意软件扫描详细信息)部分中,Trigger finding ID(触发检测结果 ID)指向触发恶意软件扫描的原始 GuardDuty 检测结果。就我而言,最初的检测结果是此 EC2 实例正在对另一个 EC2 实例执行 RDP 蛮力攻击。</p>\n<p><img src=\\"https://dev-media.amazoncloud.cn/11848354ea9c42949b7903e289fc67fc_image.png\\" alt=\\"image.png\\" /></p>\n<p>在此处,我选择 <strong>Investigate with Detective</strong>(使用 Detective 调查),然后直接从 GuardDuty 控制台转到 <a href=\\"https://console.aws.amazon.com/detective\\" target=\\"_blank\\">Detective 控制台</a>,从中可视化 EC2 实例、Amazon 账户和受检测结果影响的 IP 地址的 <a href=\\"https://aws.amazon.com/cloudtrail/\\" target=\\"_blank\\">Amazon CloudTrail</a> 和 <a href=\\"https://aws.amazon.com/vpc/\\" target=\\"_blank\\">Amazon Virtual Private Cloud (Amazon VPC)</a> 流数据。使用 Detective,我可以分析、调查和确定 GuardDuty 发现的可疑活动的根本原因。</p>\\n<p><img src=\\"https://dev-media.amazoncloud.cn/b1806092ac054173a9a66d7cc11c7875_image.png\\" alt=\\"image.png\\" /></p>\n<p>选择与 ECS 群集相关的检测结果时,我将获得有关受影响资源的更多信息,例如 ECS 集群、任务、容器和容器映像的详细信息。</p>\n<p><img src=\\"https://dev-media.amazoncloud.cn/fbe69d5f07be4ee896817493be048a0d_image.png\\" alt=\\"image.png\\" /></p>\n<p>使用 GuardDuty 测试器脚本可以更轻松地测试 GuardDuty 与您使用的其他安全框架的整体集成,以便在检测到真正的威胁时做好准备。</p>\n<h4><a id=\\"_GuardDuty__Amazon_Inspector__324\\"></a><strong><ins>将 GuardDuty 恶意软件防护保护与 Amazon Inspector 进行比较</ins></strong></h4>\n<p>此时,您可能会问自己 GuardDuty 恶意软件保护与 <a href=\\"https://aws.amazon.com/inspector/\\" target=\\"_blank\\">Amazon Inspector</a> 有何关系,[Amazon Inspector](https://aws.amazon.com/cn/inspector/?trk=cndc-detail) 是一项扫描 AWS 工作负载的软件漏洞和意外网络暴露的服务。这两种服务相辅相成,提供不同的保护层:</p>\\n<ul>\\n<li>Amazon Inspector 通过识别和修复已知软件和应用程序漏洞提供主动防护,这些漏洞是攻击者入侵资源和安装恶意软件的入口点。</li>\n<li>GuardDuty 恶意软件保护可检测到活跃运行的工作负载中存在的恶意软件。此时,系统已经受损,但是 GuardDuty 可以限制感染的时间,并在系统受损导致影响业务的事件之前采取措施。</li>\n</ul>\\n<h4><a id=\\"_329\\"></a><strong><ins>可用性和定价</ins></strong></h4>\n<p><a href=\\"https://aws.amazon.com/guardduty/\\" target=\\"_blank\\">Amazon GuardDuty</a> 恶意软件保护现已在<a href=\\"https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/\\" target=\\"_blank\\">所有提供 GuardDuty 的 Amazon 区域</a>推出,不包括 AWS 中国(北京)、Amazon 中国(宁夏)、Amazon GovCloud(美国东部)和 Amazon GovCloud(美国西部)区域。</p>\\n<p>在发布时,GuardDuty 恶意软件保护已与以下合作伙伴产品集成:</p>\n<ul>\\n<li><a href=\\"https://www.bitdefender.com/\\" target=\\"_blank\\">BitDefender</a></li>\\n<li><a href=\\"https://www.cloudhesive.com/\\" target=\\"_blank\\">CloudHesive</a></li>\\n<li><a href=\\"http://www.crowdstrike.com/\\" target=\\"_blank\\">Crowdstrike</a></li>\\n<li><a href=\\"https://www.fortinet.com/\\" target=\\"_blank\\">Fortinet</a></li>\\n<li><a href=\\"https://www.paloaltonetworks.com/\\" target=\\"_blank\\">Palo Alto Networks</a></li>\\n<li><a href=\\"https://www.rapid7.com/\\" target=\\"_blank\\">Rapid7</a></li>\\n<li><a href=\\"https://www.sophos.com/\\" target=\\"_blank\\">Sophos</a></li>\\n<li><a href=\\"https://sysdig.com/\\" target=\\"_blank\\">Sysdig</a></li>\\n<li><a href=\\"https://www.trellix.com/\\" target=\\"_blank\\">Trellix</a></li>\\n</ul>\n<p>使用 GuardDuty,您无需部署安全软件或代理来监控恶意软件。您只需为文件系统中扫描的 GB 量(而不是 EBS 卷的大小)和 EBS 快照保存在您账户中的时间付费。除非您在发现恶意软件时启用快照保留功能,否则 GuardDuty 创建的所有 EBS 快照都会在扫描后自动删除。有关更多信息,请参阅 <a href=\\"https://aws.amazon.com/guardduty/pricing/\\" target=\\"_blank\\">GuardDuty 定价</a>和 <a href=\\"https://aws.amazon.com/ebs/pricing/\\" target=\\"_blank\\">EBS 定价</a>。请注意,GuardDuty 仅扫描小于 1 TB 的 EBS 卷。为了帮助您控制成本并避免重复警报,同一卷的扫描频率不会超过每 24 小时一次。</p>\\n<h4><a id=\\"_Amazon_GuardDuty_httpsawsamazoncomguarddutyfaqsGuardDuty_Malware_Protection_346\\"></a><strong><a href=\\"https://aws.amazon.com/guardduty/faqs/#GuardDuty_Malware_Protection\\" target=\\"_blank\\">使用 Amazon GuardDuty 检测恶意活动并保护您的应用程序免受恶意软件侵害。</a></strong></h4>\n<p>— <a href=\\"https://twitter.com/danilop\\" target=\\"_blank\\">Danilo</a></p>\n"}