To prevent from those attacker that use robot to do multi-attempt, I think
we can use Secure Code Image technique. Robot cannot guess what
code that contain in the image so that robot is useless to attack us.
Yes, a CAPCHA is a great method, I'd like to note a few things that usually aren't considered with CAPTCHAs on login forms, as opposed to on on a non-authenticated form. (such as a public comment form etc.)
A CAPTCHA is ok for preventing spam, but not so much for brute force. You can use it to stop the bulk of attakers, but it does not stop the determined brute force attack.
The CAPTCHA is subject to a few things that a simple thing such as <?php sleep(10); ?> isn't.
1) Can be read by OCR (Optical Character Recognition)
2) Subject to Social based attacks (using people to attack without their knowledge)
3) Subject to Session based attacks
A good number of generated CAPTCHAs can be read by a bot that uses Optical Character Recognition (OCR). At times a bot can be faster than a human at recognizing an optical character.
Even if a bot can only recognize 1% of your generated CAPTCHAs, it has the ability to launch a brute force attack.
The reason CAPTCHAs are used is that they slow down bots. They require a lot of processing power to run numerous OCR software on an image, and only get 1% favorable outcome to exploit on your sever (thus it costs alot).
If the incentive was to post spam on your blog, then a bot would not be interested in wasting so much money on it. If the incentive was to figure out a users password, such as in a brute force, then matching a CAPTCHAs 1% of the time is a doable expense.
Attackers can also use social based attacks on CAPTCHAs. A simple example is generating 1000s of sessions on your server which generate 1000s of CAPTCHA images. The images that cannot be solved by OCR are then placed on login forms, comment forms, forum post forms, etc. on other websites. Users using these websites do not realize they are contributing to a brute force attack. On high traffic websites, the attacker can launch an attack in seconds once they have collected enough validated CAPTCHAs.
Since a CAPTCHA is session based, the single attack can be postponed untill the attacker has 1000s of user or OCR validated CAPTCHAs (before the session times out). Thus the longer they carry out the attack, the faster they can make authentication attempts as they collect more and more user validated CAPTCHAs and store it for the next attempts.