SecurityReason.com - Our Reason is

Security

Register | Forget Password | Login
SecurityReason
WLB
Services
RSS
Corporate
Note

If you have found a vulnerability, please send to our SecurityAlert Database :
secalert()securityreason()com

Also if you have new ( 0-day ) exploit, please send to our ExploitAlert Archive :
exploit()securityreason()com

Home arrow SecurityAlert Database

Arrow  Topic :

CCLeague Pro <= 1.2 Insecure Cookie Authentication Vulnerability


Arrow  SecurityAlert : 4604
Arrow  CVE : CVE-2008-5123
Arrow  CVE : CVE-2008-5125
Arrow  CWE : CWE-89
Arrow  SecurityRisk : Medium  Security Risk Medium  (About)
Arrow  Remote Exploit : Yes
Arrow  Local Exploit : No
Arrow  Victim interaction required : No
Arrow  Exploit Available : Yes
  ExploitAlert :   4162
Arrow  Credit : t0pP8uZz
Arrow  Published : 19.11.2008

Arrow  Affected Software : castillocentral:ccleague:1.2::pro



Arrow  Advisory Content :  

-[*]+======================================================================
==========+[*]-
-[*]+ CCLeague Pro <= 1.2 Insecure Cookie Authentication
Vulnerability +[*]-
-[*]+======================================================================
==========+[*]-



[*] Discovered By: t0pP8uZz
[*] Discovered On: 19 JUNE 2008
[*] Script Download: http://castillocentral.com/
[*] DORK: "Powered by CCLeague Pro" (alot of sites removed dork, so find
another)



[*] Vendor Has Not Been Notified!



[*] DESCRIPTION:

CCLeage Pro 1.2 and all prior versions suffer from multiple insecure
cookie validation vulnerabilitys.

Lets take a look at a line from the "admin.php" file from "CCLeage Pro
1.2"

CODE LINE 52 (admin.php):
if($_COOKIE['PHPSESSID'] == session_id( ) && $_COOKIE['type'] ==
"admin") { .. }

As we can see above, the script checks to see if a cookie is set and
matches a value, as we know this is very easy to bypass by creating a
cookie,
but now what above the "$_COOKIE['PHPSESSID'] == session_id( )" how do we
bypass this you ask?

well in some versions this part doesnt even exist, but most hosts are
running the upto date versions so we still need a way to bypass.

anyway, the php function session_id checks/returns the PHPSESSID if any,
and here it is returning the sessionid, since we havent created any
session
the function will return "" (not null), so all we need to do is make our
PHPSESSID match this, and since its grabbing it from a cookie thats
simple.

at the minute our PHPSESSID will be some random hash, so we can simply
change this by overwriting the cookie.

See the javascript code below in a second to successfully exploit this.

Once you have run the javascript code in your browser, you will be able to
visit the "admin.php" area without having to login, but now
you probarly see alot of errors, this is because the script attempts to
load the admin preferences based on a cookie, since we dont have this
cookie set
its pulling non-existent data from the mysql database.

so once again we need to set another cookie which needs to contain a
existing admins email address, this should be too hard to obtain from
sniffing around
the site.

here is the line of code from the admin.php which attempts to select the
admin config from the db.

CODE LINE 67 (admin.php): $admininfo = mysql_query("SELECT * FROM
".$_CONF['tprefix']."administrators WHERE contact_email = '$_COOKIE[u]'
LIMIT 0,1");

there is also a sql injection in the above line, if magic quotes are off,
so you rippers dont bother reposting that has a seperate vulnerability.

Thats about it, Check below for the javascript code which will craft the
cookies for you.

Goodluck!



[*] Vulnerability/Javascript:

javascript:document.cookie = "type=admin; path=/"; document.cookie =
"PHPSESSID=; path=/"; // this will create one cookie and null the other
javascript:document.cookie = "u=admin@domain.com; path=/"; // replace the
email with a existent admin email from the site, if this isnt correct your
not gona get very far.



[*] NOTE/TIP:


Use the dork and find a site, navigate to the site, once at the site run
the above javascript code (paste into your address bar), dont forget
to replace the email in the second javascript line.

after you have done the above steps visit the admin area at "admin.php"



[*] GREETZ:




[-] peace,

t0pP8uZz



-[*]+======================================================================
==========+[*]-
-[*]+ CCLeague Pro <= 1.2 Insecure Cookie Authentication
Vulnerability +[*]-
-[*]+======================================================================
==========+[*]-



Arrow  References :

http://securityreason.com/expldownload/1/4162/1 (Exploit)
http://xforce.iss.net/xforce/xfdb/43280
http://www.securityfocus.com/bid/29876
http://www.milw0rm.com/exploits/5888
http://secunia.com/advisories/30796




Arrow  Feedback :

If you have additional information or notice any errors regarding this security advisory, please use contact form or email us at info()securityreason()com.
Alert

libc:fts_*() Multiple Denial of Service

Security Risk Medium- 2009-10-02

The fts functions are provided for traversing UNIX file hierarchies...

Apache RSS Apache Alert

» Apache 1.3.41 mod_proxy
   Integer overflow (code
   execution)

» Apache Tomcat 6.0.20 and
   5.5.28 unexpected file
   deletion in work
   directory

» Apache Tomcat 6.0.20 and
   5.5.28 insecure partial
   deploy after failed
   undeploy

» Apache Tomcat 6.0.20 and
   5.5.28 unexpected file
   deletion and/or
   alteration

PHP RSS PHP Alert

» PHP 5.2.12/5.3.1
   session.save_path
   safe_mode and
   open_basedir bypass

» PHP 5.2.12/5.3.1 Multiple
   Vulnerabilities

» PHP 5.2.11 libgd multiple
   vulnerabilities

» PHP 5.2.11 tempnam()
   safe_mode bypass

Copyright © SecurityReason.com. All Rights Reserved.