Protect an Amazon EC2 server with GuardDuty
Turn on Amazon GuardDuty for an Amazon EC2 server: a weekly malware scan of its disk and a watch on its traffic, with Clean, Undo, Ignore and Block in the panel, priced by what each scan reads.
6 min read Updated
Amazon GuardDuty is AWS's own threat detection, for your Amazon EC2 servers. Every week it scans a copy of the server's disk for malware, and all the time it watches the server's network and DNS traffic for attacks and for signs that something on it is infected. It works from Amazon's side, so nothing is installed on the server and the server isn't slowed down. What it finds comes to the server's GuardDuty page, where you clean files, block attackers and dismiss what's fine.
Which servers can have it
Amazon EC2 servers you've paid for. It isn't part of the free trial. On the other clouds, servers with Intel or AMD processors have Imunify360 instead. Either way, every site keeps the standard web application firewall.
What it costs
GuardDuty is off until you turn it on, and it's priced by what each scan reads: the more data on the server's disk, the more a scan costs. A new server with a site or two costs about $0.50 to $1 a scan, about $2 to $4 a month with weekly scans, depending on its location. Scan now and the scans that start after a finding cost the same as a weekly one.
The price for your server, for one scan and for a month, shows on its GuardDuty page before you turn it on. A month's scans are charged after the month ends, with your other services: from your wallet first, then your card. Turn it off at any time and nothing more is charged.
Turn it on
-
Open the server's GuardDuty page
In Servers, open the Amazon EC2 server and choose GuardDuty in its menu.
-
Turn it on
Choose Turn on GuardDuty and confirm. It needs a saved card; on a team, it needs the Billing permission as well, since it's paid.
-
The first scan starts
The first scan of the disk starts within half an hour and takes about 20 to 30 minutes. Findings show within the hour. You can leave the page.
The GuardDuty page
Once it's on, the server's GuardDuty page opens on its Overview: the files that need you, the latest scan, open findings, this month's charge so far, and the latest findings. The other tabs:
- Malware
- The files a scan found, with Clean and Ignore; the ones cleaned in the last 30 days, each with Undo; and every scan with what it read and cost.
- Findings
- What GuardDuty noticed in the server's traffic, in plain words with what to do, and the addresses you've blocked.
- Settings
- Email alerts, the price for this server, and turning GuardDuty off.
Malware scans
GuardDuty copies the server's disk, scans the copy and deletes it, so your sites keep running at full speed. The disk is scanned every week. Use Scan now for another scan, at most once a day; a finding that hints at malware starts one by itself, at most once a day too.
A scan names up to 5 files for each kind of malware it finds. After you clean them, scan again to find any more.
When malware is found
You get an email, and the files are listed on the Malware tab with the site each one is in. Nothing on the server changes until you choose:
- Clean
- Moves the file off the site. It's kept on the server for 30 days, so Undo puts it back exactly as it was. A file that changed since the scan isn't cleaned: scan again first.
- Ignore
- For a file of your own that GuardDuty mistook for malware. It isn't listed again while it stays the same file.
Findings
GuardDuty watches the server's network and DNS traffic, and the panel reads what it notices every 15 minutes. Each finding says what happened, how serious it is, where it came from and what to do. Some examples:
- Someone is guessing SSH passwords. Servers Rabbitflare creates take SSH keys only, so guessing gets nowhere; block the address to stop the noise.
- A known attacker probed an open port. An address known for attacks tried a port that's open to everyone.
- The server talked to a known hacker control server, a crypto-mining service, or a phishing site, or is sending spam or attacking other machines. These hint at malware on the server: a scan starts by itself, and you get an email.
Block, on a finding about someone who reached the server, adds the address to the server's firewall: it can't connect at all any more, to SSH, the sites or anything else. Blocked addresses are listed on the Findings tab, each with Unblock. The panel's own address and the server's are never blocked. Dismiss moves a finding that's fine out of the open list.
Email alerts
The account gets an email once for each new file a scan finds, and once for each finding that hints at malware or is rated high. Password guessing and port probes alone aren't emailed. Turn the emails off on the Settings tab.
Turn it off
On the Settings tab, choose Turn off. The weekly scans and the findings stop, and so does the charge; a scan already running finishes but isn't charged. Its files and findings are kept, and show again if you turn it back on. Blocked addresses stay blocked, and listed on the page, until you unblock them.