Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting many requests with User Agent [Mozilla/5.0]

When a request arrives to my java servlet I'm checking its UserAgent:

protected void service(HttpServletRequest request, HttpServletResponse response){
    final String UA = request.getHeader("User-Agent");
    eu.bitwalker.useragentutils.Browser browser = UserAgent.parseUserAgentString(UA).getBrowser();}

Most requests has UA (User Agent) with information in it, e.g. Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36.
Some requests (about 10%) has only Mozilla/5.0 or Mozilla/4.0.

Does it means they are bots?
Is it possible that something before the servlet removes the relevant part in the UA?

I'm using HaraldWalker User Agent Utils to identify the UA and it returns Mozilla for those UA's.
But this online tool returns unknown.

Can someone please explain?

like image 928
ItayD Avatar asked Nov 01 '22 00:11

ItayD


1 Answers

It looks very likely that these are some sort of bot, as that user agent is not used by any mainstream browser.

It will be worth you filtering your logs to extract just these entries, and checking if they are following any sort of obvious bot-like pattern. For instance, you may see:

  • A request every X seconds exactly
  • That they all happen at a specific time of day
  • That they all happen within a very short period of time
  • That they request URLs in alphabetical order
  • That all the requests come from a single IP address, or limited range of IPs
like image 52
Peter Avatar answered Nov 16 '22 22:11

Peter