{"id":20345,"date":"2021-02-15T21:45:48","date_gmt":"2021-02-15T21:45:48","guid":{"rendered":"http:\/\/www.devopsschool.com\/blog\/?p=20345"},"modified":"2021-10-28T10:28:34","modified_gmt":"2021-10-28T10:28:34","slug":"ddos-attack-and-http-flood-attack-from-new-relic-synthetics-monitoring-of-aws-ec2-instance","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/ddos-attack-and-http-flood-attack-from-new-relic-synthetics-monitoring-of-aws-ec2-instance\/","title":{"rendered":"DDOS attack and HTTP flood attack on AWS from AWS EC2 instance using New Relic Synthetics &#038; infalted aws bill to $3000"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote is-style-large is-layout-flow wp-block-quote-is-layout-flow\"><p>How I prevented DDOS attack and HTTP flood attack from New Relic Synthetics Monitoring of AWS EC2 Instance?<\/p><\/blockquote>\n\n\n\n<p><strong>5 Dec 2020 &#8211; DDOS attack and HTTP flood attack Start Date from AWS Ec2 Instance<\/strong><\/p>\n\n\n\n<p><strong>10 Jan 2021 &#8211; I found out this attack when the bill has come for more than $3000.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Phase 1 &#8211; Duration 10 Days &#8211; Contacting AWS Support team &#8211; No Help from them<\/h3>\n\n\n\n<p>I noticed that my AWS Data transfer bill has come to almost $3000 which is 100 times more than regular. I was shocked and for the moment, I assumed that it was an AWS issue and I reported it to them. After 5-6 days of struggling with the AWS support team who were not able to help me, they asked me to reach out to the AWS ec2 abuse team. Meanwhile everyday, the Data transfer cost was coming almost $100\/day. I was helpless. I started regretting my decision to migrate from Godaddy VPC to an AWS reserved instance. So many hidden charges which you would come to know only once you start using it even if you make a payment in advance for an AWS ec2 reserved instance. Definitely, I felt helpless that AWS is not good for small business with no proper IT team in place.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Phase 2 &#8211; Duration 15 Days &#8211; Contacting EC2 Abuse Team &#8211; Not much help from them<\/h3>\n\n\n\n<p>However, the AWS ec2 abuse team was taking a huge amount of waiting time and no useful response from the last 10 days, thus i decided to investigate myself only.<\/p>\n\n\n\n<p>I was not skilled enough but I stressed myself beyond my work time and got into an apache log and realized that its nothing but DDOS\/HTTP flood attack. Meanwhile, I installed many tools to block the request but found none helpful. It&#8217;s very difficult to trace HTTP flood attacks. Finally i decided to block all the IP addresses which are making requests to my server more than 1000 in a day.<\/p>\n\n\n\n<p>Some of the commands which helped me as below;<\/p>\n\n\n\n<p>Later, when I could control the DDOS attack, I tracked the IP Address using https:\/\/www.opentracker.net\/ and found that those IPs address belong to no one but Amazon itself. I was shocked. For some time, I started assuming that AWS itself is involved in this attack. Finally, I submitted my analysis report to the Ec2 abuse team. Again Abuse team took 3-4 days to locate the owner of IP addresses and it was owned by NewRelic and instead of blocking those IPaddress, they asked me to reach the NewRelic support team directly. For some time, I felt strange but I had to do it. For all these processes of the AWS Support Team, EC2 abuse team&#8217;s decision to reach out to the NewRelic support team was 15 days. Let me also, one interesting observation is &#8211; None of the team was able to help me anything rather just sending email responses and hurry to close a ticket. Here I was the myself who studied all the findings and shared with the abuse team and they asked me to reach out to the NewRelic Support team.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Phase 3 &#8211; Duration &#8211; 20 Days &#8211; Contacting NewRelic Support team &#8211; &#8211; Not much help from them<\/h3>\n\n\n\n<p><strong>However, I reached out to the NewRelic Support and NewRelic Abuse team with all the details of the IP address and their response was more shocking. Instead of finding a culprit accounts and blocking them, which you can find below;<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">Thanks <span class=\"hljs-keyword\">for<\/span> reaching out - sorry <span class=\"hljs-keyword\">for<\/span> your stressful situation. Those IP addresses <span class=\"hljs-keyword\">do<\/span> look to be related to New Relic Synthetics monitors.\n\nYou can identify the account is which the monitors live by using the X-Abuse-Info.\n\nHere are instructions <span class=\"hljs-keyword\">for<\/span> locating the account:\n\nhttps:<span class=\"hljs-comment\">\/\/docs.newrelic.com\/docs\/synthetics\/synthetic-monitoring\/administration\/identify-synthetic-monitoring-requests-your-app<\/span>\n\nPlease <span class=\"hljs-keyword\">let<\/span> me know the account IDs that you find so that I can investigate <span class=\"hljs-keyword\">this<\/span> further.\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><strong>I felt strange that NewRelic does not maintain the customer details of which website is monitored by which customer id. They were having domain names on which synthetic-monitoring is enabled but they were not able to trace the account. I was shocked. They sent me this email in response.<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">We are unable to assist you <span class=\"hljs-keyword\">with<\/span> finding the headers or the request logs on your network. Perhaps there is a network engineer within your organization who can assist <span class=\"hljs-keyword\">with<\/span> <span class=\"hljs-keyword\">this<\/span>.\n\nThe following header is sent along <span class=\"hljs-keyword\">with<\/span> every request that our Synthetics monitors make\n\nX-Abuse-Info: Request sent by a New Relic Synthetics Monitor (https:<span class=\"hljs-comment\">\/\/docs.newrelic.com\/docs\/synthetics\/new-relic-synthetics\/administration\/identify-synthetics-requests-your-app) - monitor id: ${MONITOR_ID_STRING} | account id: ${ACCOUNT_NUMBER}<\/span>\nWithout the above information there is unfortunately no way we can assist any further other than recommending blacklisting all <span class=\"hljs-keyword\">of<\/span> our associated IP addresses which will block these requests.\n\nIf you have any questions about <span class=\"hljs-keyword\">this<\/span> please <span class=\"hljs-keyword\">let<\/span> me know.<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"305\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2021\/02\/ddos-html-flood-attack-aws-newrelic-commands-1024x305.jpg\" alt=\"\" class=\"wp-image-20346\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2021\/02\/ddos-html-flood-attack-aws-newrelic-commands-1024x305.jpg 1024w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2021\/02\/ddos-html-flood-attack-aws-newrelic-commands-300x89.jpg 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2021\/02\/ddos-html-flood-attack-aws-newrelic-commands-768x229.jpg 768w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2021\/02\/ddos-html-flood-attack-aws-newrelic-commands.jpg 1216w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-style-large is-layout-flow wp-block-quote-is-layout-flow\"><p>This blog is still under in-progress<\/p><\/blockquote>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-devopsschool-com wp-block-embed-devopsschool-com\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"tkMWyFB5co\"><a href=\"http:\/\/www.devopsschool.com\/blog\/how-to-save-http-requests-headers-methods-and-body-to-a-file\/\">How to save HTTP requests headers, methods and body to a file?<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;How to save HTTP requests headers, methods and body to a file?&#8221; &#8212; DevOpsSchool.com\" src=\"http:\/\/www.devopsschool.com\/blog\/how-to-save-http-requests-headers-methods-and-body-to-a-file\/embed\/#?secret=tkMWyFB5co\" data-secret=\"tkMWyFB5co\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Final updates from NewRelic<\/h4>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1006\" height=\"442\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2021\/02\/FINAL-UPDATES-FROM-NEWRELIC.jpg\" alt=\"\" class=\"wp-image-20454\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2021\/02\/FINAL-UPDATES-FROM-NEWRELIC.jpg 1006w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2021\/02\/FINAL-UPDATES-FROM-NEWRELIC-300x132.jpg 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2021\/02\/FINAL-UPDATES-FROM-NEWRELIC-768x337.jpg 768w\" sizes=\"auto, (max-width: 1006px) 100vw, 1006px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Phase 4 \u2013 Dealing with Arrogant AWS customer support team<\/h3>\n\n\n\n<p>Initially AWS customer support team had promised that, upon recieveing the closure from NewRelic Team and AWS Abuse Team, They would adjust amount with unnecessary charges of Data transfer which has occured coz of this DDOS attack from AWS resources. From last 10 Days, I am trying to reach out to AWS customer support team and AWS Support team declined to accept my call and simply they close the ticket without any response.<\/p>\n\n\n\n<p>I am very much shocked that any ticket which i open questioning about updates, they simply close without even one line of response. Thus, I am stuck in same loop; I have sent an email again to following and waiting for response<\/p>\n\n\n\n<p>ec2-abuse@amazon.com ,<br>abuse@amazonaws.com ,<br>aws-in-receivables-support<br>Twitter &#8211; @awscloud @AWSSupport<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"277\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2021\/02\/aws-arrogance-support-no-response-1024x277.jpg\" alt=\"\" class=\"wp-image-20455\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2021\/02\/aws-arrogance-support-no-response-1024x277.jpg 1024w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2021\/02\/aws-arrogance-support-no-response-300x81.jpg 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2021\/02\/aws-arrogance-support-no-response-768x208.jpg 768w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2021\/02\/aws-arrogance-support-no-response.jpg 1049w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Log in AWS Public Forum is at &#8211; <\/strong><a href=\"https:\/\/forums.aws.amazon.com\/thread.jspa?messageID=974670&amp;#974670\" target=\"_blank\" rel=\"noopener\"><code>https:\/\/forums.aws.amazon.com\/thread.jspa?<\/code><\/a><code><a href=\"https:\/\/forums.aws.amazon.com\/thread.jspa?messageID=974670&amp;#974670\" target=\"_blank\" rel=\"noopener\">messageID=974670&amp;#974670<\/a><\/code><\/p>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_80231\"><iframe loading=\"lazy\"  id=\"_ytid_65759\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_80231\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>How I prevented DDOS attack and HTTP flood attack from New Relic Synthetics Monitoring of AWS EC2 Instance? 5 Dec 2020 &#8211; DDOS attack and HTTP flood attack Start Date&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[5633],"tags":[649,6542,6544,162,6540,6547,6548,6543,6546,6545,3940,6541],"class_list":["post-20345","post","type-post","status-publish","format-standard","hentry","category-aws","tag-amazon-web-services","tag-arroagantawssupport","tag-attack","tag-aws","tag-awssupport","tag-bills","tag-data-transfer","tag-ddos","tag-ec2instance","tag-flood","tag-http","tag-newrelic"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/20345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=20345"}],"version-history":[{"count":11,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/20345\/revisions"}],"predecessor-version":[{"id":24489,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/20345\/revisions\/24489"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=20345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=20345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=20345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}