赞
踩
http://cwe.mitre.org/data/definitions/307.html#Demonstrative%20Examples
Description Summary
Example 1
In January 2009, an attacker was able to gain administrator access to a Twitter server because the server did not restrict the number of login attempts. The attacker targeted a member of Twitter's support team and was able to successfully guess the member's password using a brute force attack by guessing a large number of common words. Once the attacker gained access as the member of the support staff, he used the administrator panel to gain access to 33 accounts that belonged to celebrities and politicians. Ultimately, fake Twitter messages were sent that appeared to come from the compromised accounts.
Example 1 References:
Kim Zetter. "Weak Password Brings 'Happiness' to Twitter Hacker". 2009-01-09. <
http://www.wired.com/threatlevel/2009/01/professed-twitt/>.
|
Example 2
The following code, extracted from a servlet's doPost() method, performs an authentication lookup every time the servlet is invoked.
However, the software makes no attempt to restrict excessive authentication attempts.
Example 3
This code attempts to limit the number of login attempts by causing the process to sleep before completing the authentication.
However, there is no limit on parallel connections, so this does not increase the amount of time an attacker needs to complete an attack.
Example 4
In the following C/C++ example the validateUser method opens a socket connection, reads a username and password from the socket and attempts to authenticate the username and password.
The validateUser method will continuously check for a valid username and password without any restriction on the number of authentication attempts made. The method should limit the number of authentication attempts made to prevent brute force attacks as in the following example code.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。