in reply to User tracking
There are two techniques I've been using recently to identify automated visitors and nasties.
The first is simply to do a reverse DNS lookup. The legitimate bots (msn, google, yahoo) have registered the IP address of their bots and often include the word "bot" in the name (e.g. google bot). That is the easy way.
Of course, the illegimate spider or reckless wget user is not going to be so obliging. Those annoying visitors will normally have domain names indicating a dynamic IP address, or even no reverse DSN lookup at all! For these, I use a script I wrote that looks for certain behavioral patterns.
Humans and bots are trying to do different things on a site and so they behave differently. Human users who spend a long time on the site tend to visit selected pages and may visit them repeatedly. It takes a certain physical amount of time to move from page to page so the number of hits per minute should be much less than a bot. Human beings also tend to visit content pages and items linked directly to those pages.
An IP address that is hitting your site with requests 100x a minute or is visiting every page on your site just once (or doing both at the same time!) is most likely *not* human. So I look first for IP addresses that have contributed heavily to bursts in traffic. I also look for IP addresses that have visited large numbers of pages or are systemically visiting pages that are supposed to be off limits to robots or of little interest to human visitors.
Knowing that a certain IP address is a bot or spider doesn't necessarily buy you much. If you are trying to improve statistics used for marketing, I suppose you can just eliminate the probable bots from your stats. However, if your goal is security, I'm not sure knowing that an IP is a bot is going to help you much.
Dynamic IP addresses shift around so blocking Mr. Bad Guy today at IP xxx.xxx.xxx.xxx today may block Mr Good Guy to tomorrow. To block such IP addresses you would probably need some type of software that allows you to expire the block based on the length of time since the bad behavior occured.
Best, beth
|
|---|