Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have that my websites have been hacked by some auto running libwww-perl BOT/0.1 (BOT for JCE) and Gecko/20100101

Is there any way that my all websites are only avaiable to genuine browsers and not these automated scripts.

share|improve this question

No, you cannot ensure that your websites are only available to genuine browsers. This is because the only sources of data you have to determine the client's platform and web browser are the request headers, which can be completely forged by hackers.

For example, a hacker could use a tool like Fiddler to send a custom HTTP request to your website with a forged User-Agent request header that looks just like Internet Explorer, Chrome, Firefox, Googlebot, or some other HTTP client. Thus, it is very difficult, if not impossible, to discern a hacker from a legitimate user based on HTTP request data.

share|improve this answer

I could give you lists of countless defenses you could put up (limiting user agents, making your content appear using JavaScript from XML files, captchas - what a great way to piss off your audience!) but they're only going to stave off the inevitable while they work out how to get around them.

It would be best to drive a stake through the problem's heart rather than try to put defense after defense in place. If you're able, look at the application and try to find out how they were able to get in, and try to patch the holes. The most obvious places to look are form inputs - do these get passed to SQL strings without being parsed first? Are they generating SQL strings instead of using prepared statements (which kill off SQL injection attempts from the word go)? If it's something you can fix, do. If it's someone else's product, create a patch and send it to them.

The worst thing you can do in security is assume it won't happen to you. Worms, viruses and autobots are usually not smart enough to realise your little site isn't a threat.

Be smart, be safe, be aware.

share|improve this answer
i agree with you andi am working on it. but can you give me some defenses , i just want to know – user22 Sep 5 '13 at 5:34
I presume you're referring to this post - a captcha can help stop all but the most determined delinquents. I'd also look at ways to detect someone uploading something they shouldn't be and try to block them if they try it too many times. I'm sure tools exist to act when there's an abnormally large amount of data coming from an IP address and block it, Google is your friend here. – Aaron Mason Sep 5 '13 at 6:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.