Facebook Juniors-Cheesecake-Foxwoods SQL Injection

2011-12-21T00:00:00
ID PACKETSTORM:108064
Type packetstorm
Reporter longrifle0x
Modified 2011-12-21T00:00:00

Description

                                        
                                            `Title:  
======  
Facebook JuniorsCheesecakeFoxwoods - SQL Vulnerability  
  
  
Date:  
=====  
2011-12-21  
  
  
References:  
===========  
http://www.vulnerability-lab.com/get_content.php?id=338  
  
  
VL-ID:  
=====  
338  
  
  
Introduction:  
=============  
The application is currently included and viewable by all facebook users.  
The service is an external 3rd party application sponsored by the Juniors-Cheesecake-Foxwoods Development Team.  
  
(Copy from the Vendors Homepage: http://www.facebook.com/pages/Juniors-Cheesecake-Foxwoods/)  
  
Facebook is a social networking service and website launched in February 2004, operated and privately owned   
by Facebook, Inc. As of July 2011, Facebook has more than 750 million active users. Users may create   
a personal profile, add other users as friends, and exchange messages, including automatic notifications when   
they update their profile. Facebook users must register before using the site. Additionally, users may join   
common-interest user groups, organized by workplace, school or college, or other characteristics.   
  
(Copy of the Vendor Website: http://en.wikipedia.org/wiki/Facebook)  
  
  
Report-Timeline:  
================  
2011-11-21: Vendor Notification  
2011-11-22: Vendor Response/Feedback  
2011-12-21: Public or Non-Public Disclosure  
  
  
Status:  
========  
Published  
  
  
Exploitation-Technique:  
=======================  
Remote  
  
  
Severity:  
=========  
High  
  
  
Details:  
========  
A SQL Injection vulnerability is detected on the Juniors-Cheesecake-Foxwoods facebook application (apps.facebook).  
The vulnerability allows an attacker (remote) to inject/execute own sql statements on the affected fb application dbms.  
  
Vulnerable Module(s):   
[+] Juniors-Cheesecake-Foxwoods - Facebook 3rd Party Application  
  
Vulnerable Param(s)/File(s):   
[+] /153822597987021  
  
Affected Application:   
[+] facebook.com/pages/Juniors-Cheesecake-Foxwoods/  
  
  
--- SQL Error Logs ---  
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 5 in   
/var/www_corp/app/webroot/login/facebook/tab/index.php on line 10  
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in   
/var/www_corp/app/webroot/login/facebook/tab/lib/getAllTabData.php on line 5  
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in   
/var/www_corp/app/webroot/login/facebook/tab/lib/menus/menu.php on line 48  
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in   
/var/www_corp/app/webroot/login/facebook/tab/lib/getAllTabData.php on line 47  
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in   
/var/www_corp/app/webroot/login/facebook/tab/lib/getAllTabData.php on line 91  
-  
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in   
/var/www_corp/app/webroot/login/facebook/tab/lib/today/games.php on line 4  
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in   
/var/www_corp/app/webroot/login/facebook/tab/lib/games/games.php on line 6  
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in   
/var/www_corp/app/webroot/login/facebook/tab/lib/games/games.php on line 6  
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in   
/var/www_corp/app/webroot/login/facebook/tab/lib/games/games.php on line 6  
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in   
/var/www_corp/app/webroot/login/facebook/tab/lib/games/games.php on line 6  
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in   
/var/www_corp/app/webroot/login/facebook/tab/lib/games/games.php on line 6  
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in   
/var/www_corp/app/webroot/login/facebook/tab/lib/games/games.php on line 6  
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in   
/var/www_corp/app/webroot/login/facebook/tab/lib/games/games.php on line 6  
No events to display.  
  
  
Picture(s):  
../1.png  
  
  
Proof of Concept:  
=================  
The vulnerability can be exploited by remote attackers. For demonstration or reproduce ...  
  
URL: http://www.facebook.com/pages  
Path: /Juniors-Cheesecake-Foxwoods/  
File/Path: /153822597987021  
  
Example:  
http://[FACEBOOK]/[SERVICE/SITE]/[PATH]/[FILE][SQL Injection]  
  
  
PoC:  
http://www.facebook.com/pages/Juniors-Cheesecake-Foxwoods/153822597987021[SQL-Injection]  
  
  
Solution:  
=========  
Use the prepared statement class to fix the sql injection vulnerability & filter sql error requests.  
Set error(0) to prevent against information disclosure via exceptions or error reports.  
  
  
Risk:  
=====  
The security risk of the application sql injection vulnerabilities are estimated as high(+).  
  
  
Credits:  
========  
Vulnerability Laboratory Researcher - Ucha G. (longrifle0x)  
  
  
Disclaimer:  
===========  
The information provided in this advisory is provided as it is without any warranty. Vulnerability-Lab disclaims all warranties,   
either expressed or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-  
Lab or its suppliers are not liable in any case of damage, including direct, indirect, incidental, consequential loss of business   
profits or special damages, even if Vulnerability-Lab or its suppliers have been advised of the possibility of such damages. Some   
states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation   
may not apply. Any modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability-  
Lab. Permission to electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of   
other media, are reserved by Vulnerability-Lab or its suppliers.  
  
Copyright © 2011|Vulnerability-Lab  
  
  
  
  
--   
Website: www.vulnerability-lab.com ; vuln-lab.com or vuln-db.com  
Contact: admin@vulnerability-lab.com or support@vulnerability-lab.com  
  
`