Tuesday, March 31, 2009
New RIT Honeynet Website
http://honeynet.rit.edu
We will be posting the honeynet updates there, as well as data once we go live. Stay tuned for more updates!
Monday, March 30, 2009
Using MD5 with new PHPbb
MD5 is one of today’s biggest security weaknesses. So why would anyone ever want to use it or worse migrate away from a stronger scheme to it? The answer to these questions is the ever looming interoperability. Even though SPARSA is a security group we also face these challenges and while writing code to allow for Blowfish interfacing with all these programs might be more secure it would also be much more time consuming.
As a result we here at SPARSA are completing an endeavor to migrate all our usernames systems ( Drupal, Linux, PHPbb3, Gallery2…etc ) to a single username and password scenario. The problem we face is that we have significant presence already established via PHPbb. As such we would want to use our PHPbb database and group structures to propagate all the databases and passwd files.
In order to do this in the easiest way and the way that currently allows for the most expansion is to revert PHPbb3's PHPass library usage and replace it with MD5 that was featured in PHPbb2.
The PHPass library creates hash's based on a structure similar to MD5 but with pseudo-random salt values.
The reason we decided against this course of action is because PHPBB’s next incarnation will probably not accept MD5 at all or will certainly discourage its use. Instead we decided to pursue a course of action that would make a new column in the PHPbb database explicitly for MD5 Passwords for security reasons the naming of this database should be something that hides its true purpose and an additional hash function should be placed over it making it difficult for anyone who might break into your database to break your MD5 passwords.
It is at this time less than feasible to reverse each hash and then re-encrypt into MD5 for the other databases although that would be optimum this is of course the exact opposite of the purpose of the hash and this is action is of questionable ethics. An additional concern is we do not want any users to experience lockout time or have to reset their password.
This problem turns out to be a relatively easy fix, almost too easy and would prove an interesting local attack against PHPbb by an attacker to gain passwords even if they were encrypted in those most sophisticated encryption.
There is only one file that one needs to edit.
phpbb3/includes/auth/auth_db.php – Where success and plain text password are handeled.
add these lines right before
// Successful login... set user_login_attempts to zero...
Add in the lines
$password_new = md5( $password );
$sql = "UPDATE " . USERS_TABLE . "
SET column_name = '$password_new'
WHERE user_id = " . $row['user_id'];
$db->sql_query($sql);