Saturday, June 13, 2026
HomeCloud ComputingNew for Amazon GuardDuty – Malware Detection for Amazon EBS Volumes

New for Amazon GuardDuty – Malware Detection for Amazon EBS Volumes

[ad_1]

With Amazon GuardDuty, you’ll be able to monitor your AWS accounts and workloads to detect malicious exercise. In the present day, we’re including to GuardDuty the aptitude to detect malware. Malware is malicious software program that’s used to compromise workloads, repurpose assets, or acquire unauthorized entry to information. When you have got GuardDuty Malware Safety enabled, a malware scan is initiated when GuardDuty detects that one in every of your EC2 situations or container workloads working on EC2 is doing one thing suspicious. For instance, a malware scan is triggered when an EC2 occasion is speaking with a command-and-control server that’s recognized to be malicious or is performing denial of service (DoS) or brute-force assaults in opposition to different EC2 situations.

GuardDuty helps many file system sorts and scans file codecs recognized for use to unfold or include malware, together with Home windows and Linux executables, PDF recordsdata, archives, binaries, scripts, installers, electronic mail databases, and plain emails.

When potential malware is recognized, actionable safety findings are generated with info such because the menace and file title, the file path, the EC2 occasion ID, useful resource tags and, within the case of containers, the container ID and the container picture used. GuardDuty helps container workloads working on EC2, together with customer-managed Kubernetes clusters or particular person Docker containers. If the container is managed by Amazon Elastic Kubernetes Service (EKS) or Amazon Elastic Container Service (Amazon ECS), the findings additionally embody the cluster title and the activity or pod ID so software and safety groups can rapidly discover the affected container assets.

As with all different GuardDuty findings, malware detections are despatched to the GuardDuty console, pushed by Amazon EventBridge, routed to AWS Safety Hub, and made accessible in Amazon Detective for incident investigation.

How GuardDuty Malware Safety Works
If you allow malware safety, you arrange an AWS Identification and Entry Administration (IAM) service-linked function that grants GuardDuty permissions to carry out malware scans. When a malware scan is initiated for an EC2 occasion, GuardDuty Malware Safety makes use of these permissions to take a snapshot of the hooked up Amazon Elastic Block Retailer (EBS) volumes which can be lower than 1 TB in measurement after which restore the EBS volumes in an AWS service account in the identical AWS Area to scan them for malware. You should use tagging to incorporate or exclude EC2 situations from these permissions and from scanning. On this manner, you don’t must deploy safety software program or brokers to watch for malware, and scanning the volumes doesn’t influence working workloads. The EBS volumes within the service account and the snapshots in your account are deleted after the scan. Optionally, you’ll be able to protect the snapshots when malware is detected.

The service-linked function grants GuardDuty entry to AWS Key Administration Service (AWS KMS) keys used to encrypt EBS volumes. If the EBS volumes hooked up to a probably compromised EC2 occasion are encrypted with a customer-managed key, GuardDuty Malware Safety makes use of the identical key to encrypt the duplicate EBS volumes as nicely. If the volumes are usually not encrypted, GuardDuty makes use of its personal key to encrypt the duplicate EBS volumes and guarantee privateness. Volumes encrypted with EBS-managed keys are usually not supported.

Safety in cloud is a shared duty between you and AWS. As a guardrail, the service-linked function utilized by GuardDuty Malware Safety can not carry out any operation in your assets (corresponding to EBS snapshots and volumes, EC2 situations, and KMS keys) if it has the GuardDutyExcluded tag. When you mark your snapshots with GuardDutyExcluded set to true, the GuardDuty service received’t be capable to entry these snapshots. The GuardDutyExcluded tag supersedes any inclusion tag. Permissions additionally limit how GuardDuty can modify your snapshot in order that they can’t be made public whereas shared with the GuardDuty service account.

The EBS volumes created by GuardDuty are at all times encrypted. GuardDuty can use KMS keys solely on EBS snapshots which have a GuardDuty scan ID tag. The scan ID tag is added by GuardDuty when snapshots are created after an EC2 discovering. The KMS keys which can be shared with GuardDuty service account can’t be invoked from some other context besides the Amazon EBS service. As soon as the scan completes efficiently, the KMS key grant is revoked and the amount duplicate in GuardDuty service account is deleted, ensuring GuardDuty service can not entry your information after finishing the scan operation.

Enabling Malware Safety for an AWS Account
For those who’re not utilizing GuardDuty but, Malware Safety is enabled by default whenever you activate GuardDuty in your account. As a result of I’m already utilizing GuardDuty, I must allow Malware Safety from the console. For those who’re utilizing AWS Organizations, your delegated administrator accounts can allow this for present member accounts and configure if new AWS accounts within the group must be robotically enrolled.

Within the GuardDuty console, I select Malware Safety beneath Settings within the navigation pane. There, I select Allow after which Allow Malware Safety.

Console screenshot.

Snapshots are robotically deleted after they’re scanned. In Basic settings, I’ve the choice to retain in my AWS account the snapshots the place malware is detected and have them accessible for additional evaluation.

Console screenshot.

In Scan choices, I can configure an inventory of inclusion tags, in order that solely EC2 situations with these tags are scanned, or exclusion tags, in order that EC2 situations with tags within the record are skipped.

Console screenshot.

Testing Malware Safety GuardDuty Findings
To generate a number of Amazon GuardDuty findings, together with the brand new Malware Safety findings, I clone the Amazon GuardDuty Tester repo:

$ git clone https://github.com/awslabs/amazon-guardduty-tester

First, I create an AWS CloudFormation stack utilizing the guardduty-tester.template file. When the stack is prepared, I comply with the directions to configure my SSH consumer to log in to the tester occasion by the bastion host. Then, I connect with the tester occasion:

From the tester occasion, I begin the guardduty_tester.sh script to generate the findings:

$ ./guardduty_tester.sh 

***********************************************************************
* Check #1 - Inner port scanning                                    *
* This simulates inner reconaissance by an inner actor or an   *
* exterior actor after an preliminary compromise. That is thought of a    *
* low precedence discovering for GuardDuty as a result of its not a transparent indicator*
* of malicious intent by itself.                                     *
***********************************************************************


Beginning Nmap 6.40 ( http://nmap.org ) at 2022-05-19 09:36 UTC
Nmap scan report for ip-172-16-0-20.us-west-2.compute.inner (172.16.0.20)
Host is up (0.00032s latency).
Not proven: 997 filtered ports
PORT     STATE  SERVICE
22/tcp   open   ssh
80/tcp   closed http
5050/tcp closed mmcc
MAC Tackle: 06:25:CB:F4:E0:51 (Unknown)

Nmap completed: 1 IP deal with (1 host up) scanned in 4.96 seconds

-----------------------------------------------------------------------

***********************************************************************
* Check #2 - SSH Brute Pressure with Compromised Keys                     *
* This simulates an SSH brute power assault on an SSH port that we    *
* can entry from this occasion. It makes use of (phony) compromised keys in  *
* many subsequent makes an attempt to see if one works. It is a widespread      *
* techique the place the dangerous actors will harvest keys from the online in     *
* locations like supply code repositories the place individuals by chance depart*
* keys and credentials (This try is not going to really achieve     *
* acquiring entry to the goal linux occasion on this subnet)       *
***********************************************************************

2022-05-19 09:36:29 START
2022-05-19 09:36:29 Crowbar v0.4.3-dev
2022-05-19 09:36:29 Making an attempt 172.16.0.20:22
2022-05-19 09:36:33 STOP
2022-05-19 09:36:33 No outcomes discovered...
2022-05-19 09:36:33 START
2022-05-19 09:36:33 Crowbar v0.4.3-dev
2022-05-19 09:36:33 Making an attempt 172.16.0.20:22
2022-05-19 09:36:37 STOP
2022-05-19 09:36:37 No outcomes discovered...
2022-05-19 09:36:37 START
2022-05-19 09:36:37 Crowbar v0.4.3-dev
2022-05-19 09:36:37 Making an attempt 172.16.0.20:22
2022-05-19 09:36:41 STOP
2022-05-19 09:36:41 No outcomes discovered...
2022-05-19 09:36:41 START
2022-05-19 09:36:41 Crowbar v0.4.3-dev
2022-05-19 09:36:41 Making an attempt 172.16.0.20:22
2022-05-19 09:36:45 STOP
2022-05-19 09:36:45 No outcomes discovered...
2022-05-19 09:36:45 START
2022-05-19 09:36:45 Crowbar v0.4.3-dev
2022-05-19 09:36:45 Making an attempt 172.16.0.20:22
2022-05-19 09:36:48 STOP
2022-05-19 09:36:48 No outcomes discovered...
2022-05-19 09:36:49 START
2022-05-19 09:36:49 Crowbar v0.4.3-dev
2022-05-19 09:36:49 Making an attempt 172.16.0.20:22
2022-05-19 09:36:52 STOP
2022-05-19 09:36:52 No outcomes discovered...
2022-05-19 09:36:52 START
2022-05-19 09:36:52 Crowbar v0.4.3-dev
2022-05-19 09:36:52 Making an attempt 172.16.0.20:22
2022-05-19 09:36:56 STOP
2022-05-19 09:36:56 No outcomes discovered...
2022-05-19 09:36:56 START
2022-05-19 09:36:56 Crowbar v0.4.3-dev
2022-05-19 09:36:56 Making an attempt 172.16.0.20:22
2022-05-19 09:37:00 STOP
2022-05-19 09:37:00 No outcomes discovered...
2022-05-19 09:37:00 START
2022-05-19 09:37:00 Crowbar v0.4.3-dev
2022-05-19 09:37:00 Making an attempt 172.16.0.20:22
2022-05-19 09:37:04 STOP
2022-05-19 09:37:04 No outcomes discovered...
2022-05-19 09:37:04 START
2022-05-19 09:37:04 Crowbar v0.4.3-dev
2022-05-19 09:37:04 Making an attempt 172.16.0.20:22
2022-05-19 09:37:08 STOP
2022-05-19 09:37:08 No outcomes discovered...
2022-05-19 09:37:08 START
2022-05-19 09:37:08 Crowbar v0.4.3-dev
2022-05-19 09:37:08 Making an attempt 172.16.0.20:22
2022-05-19 09:37:12 STOP
2022-05-19 09:37:12 No outcomes discovered...
2022-05-19 09:37:12 START
2022-05-19 09:37:12 Crowbar v0.4.3-dev
2022-05-19 09:37:12 Making an attempt 172.16.0.20:22
2022-05-19 09:37:16 STOP
2022-05-19 09:37:16 No outcomes discovered...
2022-05-19 09:37:16 START
2022-05-19 09:37:16 Crowbar v0.4.3-dev
2022-05-19 09:37:16 Making an attempt 172.16.0.20:22
2022-05-19 09:37:20 STOP
2022-05-19 09:37:20 No outcomes discovered...
2022-05-19 09:37:20 START
2022-05-19 09:37:20 Crowbar v0.4.3-dev
2022-05-19 09:37:20 Making an attempt 172.16.0.20:22
2022-05-19 09:37:23 STOP
2022-05-19 09:37:23 No outcomes discovered...
2022-05-19 09:37:23 START
2022-05-19 09:37:23 Crowbar v0.4.3-dev
2022-05-19 09:37:23 Making an attempt 172.16.0.20:22
2022-05-19 09:37:27 STOP
2022-05-19 09:37:27 No outcomes discovered...
2022-05-19 09:37:27 START
2022-05-19 09:37:27 Crowbar v0.4.3-dev
2022-05-19 09:37:27 Making an attempt 172.16.0.20:22
2022-05-19 09:37:31 STOP
2022-05-19 09:37:31 No outcomes discovered...
2022-05-19 09:37:31 START
2022-05-19 09:37:31 Crowbar v0.4.3-dev
2022-05-19 09:37:31 Making an attempt 172.16.0.20:22
2022-05-19 09:37:34 STOP
2022-05-19 09:37:34 No outcomes discovered...
2022-05-19 09:37:35 START
2022-05-19 09:37:35 Crowbar v0.4.3-dev
2022-05-19 09:37:35 Making an attempt 172.16.0.20:22
2022-05-19 09:37:38 STOP
2022-05-19 09:37:38 No outcomes discovered...
2022-05-19 09:37:38 START
2022-05-19 09:37:38 Crowbar v0.4.3-dev
2022-05-19 09:37:38 Making an attempt 172.16.0.20:22
2022-05-19 09:37:42 STOP
2022-05-19 09:37:42 No outcomes discovered...
2022-05-19 09:37:42 START
2022-05-19 09:37:42 Crowbar v0.4.3-dev
2022-05-19 09:37:42 Making an attempt 172.16.0.20:22
2022-05-19 09:37:46 STOP
2022-05-19 09:37:46 No outcomes discovered...

-----------------------------------------------------------------------

***********************************************************************
* Check #3 - RDP Brute Pressure with Password Record                        *
* This simulates an RDP brute power assault on the interior RDP port  *
* of the home windows server that we put in within the setting.  It makes use of*
* an inventory of widespread passwords that may be discovered on the internet. This check  *
* will set off a detection, however will fail to get into the goal      *
* home windows occasion.                                                   *
***********************************************************************

Sending 250 password makes an attempt on the home windows server...
Hydra v9.4-dev (c) 2022 by van Hauser/THC & David Maciejak - Please don't use in army or secret service organizations, or for unlawful functions (that is non-binding, these *** ignore legal guidelines and ethics anyway).

Hydra (https://github.com/vanhauser-thc/thc-hydra) beginning at 2022-05-19 09:37:46
[WARNING] rdp servers typically don't love many connections, use -t 1 or -t 4 to cut back the variety of parallel connections and -W 1 or -W 3 to attend between connection to permit the server to get well
[INFO] Diminished variety of duties to 4 (rdp doesn't like many parallel connections)
[WARNING] the rdp module is experimental. Please check, report - and if potential, repair.
[DATA] max 4 duties per 1 server, total 4 duties, 1792 login tries (l:7/p:256), ~448 tries per activity
[DATA] attacking rdp://172.16.0.24:3389/
[STATUS] 1099.00 tries/min, 1099 tries in 00:01h, 693 to do in 00:01h, 4 lively
1 of 1 goal accomplished, 0 legitimate password discovered
Hydra (https://github.com/vanhauser-thc/thc-hydra) completed at 2022-05-19 09:39:23

-----------------------------------------------------------------------

***********************************************************************
* Check #4 - CryptoCurrency Mining Exercise                            *
* This simulates interplay with a cryptocurrency mining pool which *
* might be a sign of an occasion compromise. On this case, we're*
* solely interacting with the URL of the pool, however not downloading      *
* any recordsdata. It will set off a menace intel primarily based detection.        *
***********************************************************************

Calling bitcoin wallets to obtain mining toolkits

-----------------------------------------------------------------------

***********************************************************************
* Check #5 - DNS Exfiltration                                          *
* A typical exfiltration approach is to tunnel information out over DNS      *
* to a pretend area.  Its an efficient approach as a result of most hosts    *
* have outbound DNS ports open.  This check wont exfiltrate any information,  *
* however it can generate sufficient uncommon DNS exercise to set off the     *
* detection.                                                          *
***********************************************************************

Calling massive numbers of enormous domains to simulate tunneling through DNS

***********************************************************************
* Check #6 - Pretend area to show that GuardDuty is working            *
* It is a everlasting pretend area that clients can use to show that*
* GuardDuty is working.  Calling this area will at all times generate the *
* Backdoor:EC2/C&CActivity.B!DNS discovering kind                         *
***********************************************************************

Calling a well-known pretend area that's used to generate a recognized discovering

; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.amzn2.5.2 <<>> GuardDutyC2ActivityB.com any
;; world choices: +cmd
;; Bought reply:
;; ->>HEADER<<- opcode: QUERY, standing: NOERROR, id: 11495
;; flags: qr rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: model: 0, flags:; udp: 4096
;; QUESTION SECTION:
;GuardDutyC2ActivityB.com.	IN	ANY

;; ANSWER SECTION:
GuardDutyC2ActivityB.com. 6943	IN	SOA	ns1.markmonitor.com. hostmaster.markmonitor.com. 2018091906 86400 3600 2592000 172800
GuardDutyC2ActivityB.com. 6943	IN	NS	ns3.markmonitor.com.
GuardDutyC2ActivityB.com. 6943	IN	NS	ns5.markmonitor.com.
GuardDutyC2ActivityB.com. 6943	IN	NS	ns7.markmonitor.com.
GuardDutyC2ActivityB.com. 6943	IN	NS	ns2.markmonitor.com.
GuardDutyC2ActivityB.com. 6943	IN	NS	ns4.markmonitor.com.
GuardDutyC2ActivityB.com. 6943	IN	NS	ns6.markmonitor.com.
GuardDutyC2ActivityB.com. 6943	IN	NS	ns1.markmonitor.com.

;; Question time: 27 msec
;; SERVER: 172.16.0.2#53(172.16.0.2)
;; WHEN: Thu Could 19 09:39:23 UTC 2022
;; MSG SIZE  rcvd: 238


*****************************************************************************************************
Anticipated GuardDuty Findings

Check 1: Inner Port Scanning
Anticipated Discovering: EC2 Occasion  i-011e73af27562827b  is performing outbound port scans in opposition to distant host. 172.16.0.20
Discovering Sort: Recon:EC2/Portscan

Check 2: SSH Brute Pressure with Compromised Keys
Anticipating two findings - one for the outbound and one for the inbound detection
Outbound:  i-011e73af27562827b  is performing SSH brute power assaults in opposition to  172.16.0.20
Inbound:  172.16.0.25  is performing SSH brute power assaults in opposition to  i-0bada13e0aa12d383
Discovering Sort: UnauthorizedAccess:EC2/SSHBruteForce

Check 3: RDP Brute Pressure with Password Record
Anticipating two findings - one for the outbound and one for the inbound detection
Outbound:  i-011e73af27562827b  is performing RDP brute power assaults in opposition to  172.16.0.24
Inbound:  172.16.0.25  is performing RDP brute power assaults in opposition to  i-0191573dec3b66924
Discovering Sort : UnauthorizedAccess:EC2/RDPBruteForce

Check 4: Cryptocurrency Exercise
Anticipated Discovering: EC2 Occasion  i-011e73af27562827b  is querying a site title that's related to bitcoin exercise
Discovering Sort : CryptoCurrency:EC2/BitcoinTool.B!DNS

Check 5: DNS Exfiltration
Anticipated Discovering: EC2 occasion  i-011e73af27562827b  is making an attempt to question domains that resemble exfiltrated information
Discovering Sort : Trojan:EC2/DNSDataExfiltration

Check 6: C&C Exercise
Anticipated Discovering: EC2 occasion  i-011e73af27562827b  is querying a site title related to a recognized Command & Management server. 
Discovering Sort : Backdoor:EC2/C&CActivity.B!DNS

After a couple of minutes, the findings seem within the GuardDuty console. On the prime, I see the malicious recordsdata discovered by the brand new Malware Safety functionality. One of many findings is said to an EC2 occasion, the opposite to an ECS cluster.

Console screenshot.

First, I choose the discovering associated to the EC2 occasion. Within the panel, I see the knowledge on the occasion and the malicious file, such because the file title and path. Within the Malware scan particulars part, the Set off discovering ID factors to the unique GuardDuty discovering that triggered the malware scan. In my case, the unique discovering was that this EC2 occasion was performing RDP brute power assaults in opposition to one other EC2 occasion.

Console screenshot.

Right here, I select Examine with Detective and, immediately from the GuardDuty console, I am going to the Detective console to visualise AWS CloudTrail and Amazon Digital Non-public Cloud (Amazon VPC) move information for the EC2 occasion, the AWS account, and the IP deal with affected by the discovering. Utilizing Detective, I can analyze, examine, and determine the basis explanation for suspicious actions discovered by GuardDuty.

Console screenshot.

After I choose the discovering associated to the ECS cluster, I’ve extra info on the useful resource affected, corresponding to the main points of the ECS cluster, the duty, the containers, and the container photos.

Console screenshot.

Utilizing the GuardDuty tester scripts makes it simpler to check the general integration of GuardDuty with different safety frameworks you employ with the intention to be prepared when an actual menace is detected.

Evaluating GuardDuty Malware Safety with Amazon Inspector
At this level, you may ask your self how GuardDuty Malware Safety pertains to Amazon Inspector, a service that scans AWS workloads for software program vulnerabilities and unintended community publicity. The 2 providers complement one another and supply totally different layers of safety:

  • Amazon Inspector presents proactive safety by figuring out and remediating recognized software program and software vulnerabilities that function an entry level for attackers to compromise assets and set up malware.
  • GuardDuty Malware Safety detects malware that’s discovered to be current on actively working workloads. At that time, the system has already been compromised, however GuardDuty can restrict the time of an an infection and take motion earlier than a system compromise ends in a business-impacting occasion.

Availability and Pricing
Amazon GuardDuty Malware Safety is accessible at present in all AWS Areas the place GuardDuty is accessible, excluding the AWS China (Beijing), AWS China (Ningxia), AWS GovCloud (US-East), and AWS GovCloud (US-West) Areas.

At launch, GuardDuty Malware Safety is built-in with these accomplice choices:

With GuardDuty, you don’t must deploy safety software program or brokers to watch for malware. You solely pay for the quantity of GB scanned within the file techniques (not for the scale of the EBS volumes) and for the EBS snapshots throughout the time they’re saved in your account. All EBS snapshots created by GuardDuty are robotically deleted after they’re scanned except you allow snapshot retention when malware is discovered. For extra info, see GuardDuty pricing and EBS pricing. Be aware that GuardDuty solely scans EBS volumes lower than 1 TB in measurement. That will help you management prices and keep away from repeating alarms, the identical quantity shouldn’t be scanned extra typically than as soon as each 24 hours.

Detect malicious exercise and shield your purposes from malware with Amazon GuardDuty.

Danilo



[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments