I started to observe the password reset function of the wordpress blog and found a flaw in the generation of the md5 hash.
Starting on line 141, you can observe the function that is executed to generate a new password for a user as shown below:
The utilization of the microtime, uniqid, and the md5 functions in conjunction with each other was a clever way of generating the $new_pass or the new password. However observe that the value created is then truncated to 7 characters.
The truncated password of 7 characters leads to a password with 16^7 possible password combinations that are then md5 hashed. This equates to less than 300,000 possibilities that the password could be. Why are there only 16 character possibilities? An MD5 hash is composed of 16 characters consisting of the numbers 0-9 and the letters a-f.
A typical alpha-numeric password using upper-case, lower-case, and numbers that is 7 characters long consists of 62^7 possibilities that the password could be. This is much stronger than using the sub-string of an MD5 hash.
If they would have left off the substr function this would have been stronger than placing it and then hashing again the $new_pass.
Again, this is a flaw in the strength of the random password that is created when a reset password function in the web application is triggered.
If the admins email address is known for the site then a password can be reset for the administrator. Then this brute-force attack can be conducted and you can login to the account in less than a day depending on how observant the admin is that the password was reset and the speed of the connection to the site.
Twitter: @lokut
This blog is for educational purposes only. The opinions expressed in this blog are my own and do not reflect the views of my employers.
Subscribe to:
Post Comments (Atom)
Test Authentication from Linux Console using python3 pexpect
Working with the IT420 lab, you will discover that we need to discover a vulnerable user account. The following python3 script uses the pex...
-
Here is a quick walk through of GetBoo. The first item that I found was you can harvest the usernames of the existing users that are regist...
-
As I was glancing through the logs of my honeypots I spent some time to look at the following logs. In the past I have just overlooked them...
-
I thought I would work through a few of these web applications provided by OWASP on their broken web applications VM. The first one I th...
-
Today looking at the logs of the honeypots, I became curious based on the whois of the IP Addresses attempting to login to SSH which country...
-
Recently I was doing some scanning with a tool that is available on github called masscan. The tool allows you to configure a configuration...
No comments:
Post a Comment