Bobcares

Amazon EC2 abuse report – Quick way to fix

by | May 25, 2019

Amazon EC2 give users an option to setup apps without bothering much about servers. But, when you are with Amazon, you are bound to follow their usage policy.

Any resource abuse will immediately send an Amazon EC2 abuse report. And, this needs quick action to avoid service disruption.

That’s why, we often get requests from Amazon customers to find and fix the root cause of abuse activity as part of our Server Management Services.

Today, we’ll see how Bobcares’ Engineers identify and fix underlying problem based on Amazon EC2 abuse report.

 

Details of EC2 abuse report

Just like any other cloud service provider, Amazon network also implements strict usage policy for security reasons. This helps to avoid any problems with AWS stack due to abuse activity on a single server. And, users never experience any downtime due to resource abuse in the network.

It is the primary responsibility of AWS users to ensure that their instances or application running on AWS stack do not do any malicious activity.

Moreover, AWS team runs constant check on their network and alert users about stack abuse.

At this point of time, it’s worth to check on how the abuse report actually look like.

A sample report forwarded to us by a customer appears as:

We’re writing to follow up on your outstanding EC2 abuse reports. We’ve observed Intrusion Attempts activity from account xxxx370, and haven’t  received a response from you regarding this. Please take corrective
measures immediately and reply to this email to notify us that you’ve done so; failure to respond to this notice within 24 hours may result in your instances being isolated

As AWS team give just 24 hours, it becomes really critical to check the server immediately and do a proper fix. Again, in case of abuse, finding the real root cause becomes the trickiest thing.

 

How we fixed abuse on Amazon EC2

Now, we’ll see how our Security Engineers fixed the abuse on customer’s Amazon EC2 instance.

When the customer approached us with the abuse report, he was in a panic situation. He forwarded all the details given by the AWS abuse team.

So, we began troubleshooting straightaway.

 

1. Analyzing the report

As the first step of investigation, we analyzed the report sent by Amazon team. It had detailed log file that included the domain name, IP address involved in the suspicious attack, etc.

The IP 34.xx.xx.40 has just been banned by Fail2Ban after
1 attempts against apache-critico.

Domain: xxx.com (5.xx.172.xx)
/fabc/sites/xxx.com/web/htdocs/logs/access:34.xx.xx.40 - - [13/May/2019:05:06:11 +0200] "GET /books.php?lang=ab'&id_n=8'\" HTTP/1.1" 200 206265 "-" "-" "-"
/fabc/sites/xxx.com/web/htdocs/logs/access:34.xx.xx.40 - -  [13/May/2019:05:06:13 +0200] "GET /books.php?id_n=8&lang=ab HTTP/1.1" 200  206262 "-" "-" "-"

2. Identifying the attack

Our next step was to identify the type of attack from the domain. On detailed investigation, we found that the script in the domain was trying to initiate a login-attack on a remote website.

We found the entire details from the Mod_security logs of the EC2 instance.

3. Applying fix

After finding the abuse account, the next step was to apply a fix and stop the abuse. Here, the server was initiating outbound connections to a remote server. This is not intended as per the usual setup.

Therefore, our Dedicated Engineers blocked all the outbound port 80 connections from the server. We did this by tweaking the firewall of the EC2 instance from the AWS console.

We blocked the outbound connections to the specific IP mentioned in the report. Also, we confirmed that no outbound connections are established from the server:

"Failed to connect to xx.43.xx.162 port 80
"Failed to connect to 194.xx.xx.48 port 80

Additionally, we did a complete scan on the instance to find the infected files if any.

 

4. Reporting back to Amazon

The final step lies in informing AWS team about the actions taken on the server. They would evaluate the fix and avoid further actions on the abuse incident.

In this case, after sending the details to AWS abuse team, the server was saved from further followup actions.

[Do you know that abuse usually happens in un-managed servers? We offer 24×7 server management to avoid attacks.]

 

Conclusion

In short, none of the service providers allow abusing of resources. When you get Amazon EC2 abuse report, it’s really critical to take immediate action to avoid account termination. Today, we saw how Dedicated Engineers identified and fixed the abuse account on EC2 instance.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

4 Comments

  1. adit

    Hi,
    I am receiving aws ec2-abuse report for the second time now.
    when I received it for the first time, I terminated the instance.
    I am keeping very limited security-groups. what more changes do I need to make.

    Reply
  2. Maheen Aboobakkar

    Hello Adit,

    We’ll be happy to talk to you on chat (click on the icon at right-bottom).

    Reply
  3. Mmadubugwu

    I have received the message for the second time on my ec2 instance, what should I do? ec2-abuse ssh brute-force login

    Reply
    • Hiba Razak

      Hi,
      Please contact our support team through live chat (click on the icon at right-bottom).

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF