How to Detect Malicious Bots Before They Cause Damage