Website Under Attack
lewisfletcher
PROOP

2 years ago

This morning I woke up to over 7000 emails from my Django server of Disallowed Host errors. My app is correctly rejecting the requests, which are all coming from a single IP address and are also trying to access my site at the IP level rather than the domain. Here is an example: Invalid HTTPHOST header: '35.230.16.13:6868'. You may need to add '35.230.16.13' to ALLOWEDHOSTS.

DisallowedHost at /druid/index.html
Invalid HTTPHOST header: '35.230.16.13:6868'. You may need to add '35.230.16.13' to ALLOWEDHOSTS.

Request Method: GET
Request URL: http://35.230.16.13:6868/druid/index.html

Exception Value: Invalid HTTPHOST header: '35.230.16.13:6868'. You may need to add '35.230.16.13' to ALLOWEDHOSTS.

Request information:
USER: [unable to retrieve the current user]

GET: No GET data

POST: No POST data

FILES: No FILES data

COOKIES: No cookie data

META:
HTTPACCEPT = '/'
HTTP
ACCEPTENCODING = 'gzip' HTTPACCEPTLANGUAGE = 'en' HTTPCONNECTION = 'close'
HTTPHOST = '35.230.16.13:6868' HTTPUSERAGENT = 'Mozilla/5.0 (X11; Ubuntu; Linux x8664; rv:90.0) Gecko/20100101 Firefox/90.0 Information Security Team InfraSec Scanner'
PATHINFO = '/druid/index.html' QUERYSTRING = ''
RAWURI = '/druid/index.html' REMOTEADDR = '34.87.32.244'
REMOTEPORT = '49742' REQUESTMETHOD = 'GET'
SCRIPTNAME = '' SERVERNAME = '0.0.0.0'
SERVERPORT = '6868' SERVERPROTOCOL = 'HTTP/1.1'
SERVERSOFTWARE = 'gunicorn/20.1.0' The HTTPUSERAGENT and the REMOTEADDR are the same in all 7000 requests. The path it is attempting to access changes, and it sometimes includes POST data with usernames and passwords at an attempt to login with default IDs (like username="admin" password="123321"). This is eating through my email allotment with Amazon SES, but I don't want to turn off error notifications. The site is set up wiht Cloudflare nameservers, but as the bot is hitting the IP it seems to be bypassing the firewalls. Am I able to block an IP at the server level through railway?

14 Replies

lewisfletcher
PROOP

2 years ago

c69d7554-5299-4bf1-8e33-58cd68ebc682


2 years ago

Am I able to block an IP at the server level through railway?
no, railway does not provide a firewall, you would want to block the traffic at cloudflare


2 years ago

Given that the request is hitting your app at the IP level, it's not going through cloudflare


2 years ago

That's extremely odd


2 years ago

For now, turn off your email notifications. If your app is set up securely, you shouldn't have to worry about this


2 years ago

I'm hesitant to ping in the team here as this is just a bot attack, nothing to get them involved in. It's just odd that your IP was hit


2 years ago

The invalid host header error is a client side error, not server side. Not sure why you're recieving emails about that


lewisfletcher
PROOP

2 years ago

It's Django sending me emails, usually nice to know an error happened it gives me the traceback to help catch a bug. Unfortunately it's classifying the Disallowed host message as an error, which it isn't in this case. Its just doing it's job.I'


lewisfletcher
PROOP

2 years ago

I'm also being targeted on 4/5 websites - it's straneg enough that I did a malware scan but it showed nothing.


lewisfletcher
PROOP

2 years ago

strange*


2 years ago

This sort of stuff isn't targeted usually, just a bot scraping the internet trying to find vulnerabilities


lewisfletcher
PROOP

2 years ago

The other three sites are just classic spam bots with account signup forms and contact forms. Adding a captcha solved those. Guessing it will die down once they realize they are getting nothing accomplished?


2 years ago

You got it, once the bot has gone through its script it'll move on to the next site


lewisfletcher
PROOP

2 years ago

Sounds good. Thanks for the help!


Loading...