Facebook FitnessGrade – SQL Injection Vulnerability

Introduction:
=============
The application is currently included and viewable by all facebook users.
The service is an external 3rd party application sponsored by the Facebook FitnessGrade Development Team.

(Copy from the Vendors Homepage: http://apps.facebook.com/fitnessgrade/)

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)

Abstract:
=========
Vulnerability-Lab researcher discovered a remote SQL Injection vulnerability on the 3rd party web
application - FitnessGrade (apps.facebook.com).

Report-Timeline:
================
2011-11-22:	Vendor Notification
2011-11-23:	Developer Notification
2011-11-24:	Vendor Response/Feedback
2011-12-14:	Public or Non-Public Disclosure

Status:
========
Published

Exploitation-Technique:
=======================
Remote

Severity:
=========
High

Details:
========
A remote SQL Injection vulnerability is detected on the FitnessGrade 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): 
			                            [+] FitnessGrade - Facebook 3rd Party Application

Vulnerable Param(s)/File(s): 
			                            [+] scorecard.php; entry.php; goals.php; reports.php; freinds.php; cohourt.php; business.php
Affected Application: 
			                            [+] apps.facebook.com/fitnessgrade/

--- SQL Error Logs --- Heading Tabs
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/content/m/y/f/myfgg/html/mydir/headingtabs.php on line 76
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/content/m/y/f/myfgg/html/mydir/headingtabs.php on line 105
- All-Time
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/content/m/y/f/myfgg/html/mydir/headingtabs.php on line 108
- This Year
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/content/m/y/f/myfgg/html/mydir/headingtabs.php on line 111
- This Quarter
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/content/m/y/f/myfgg/html/mydir/headingtabs.php on line 114
- This Month
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/content/m/y/f/myfgg/html/mydir/headingtabs.php on line 117
- This Week

--- Scorecard
Hello, Facebook User - Here is your SCORECARD of fitness grade entries. These Scores are on a 4.0 scale.
COMING SOON COHORT SCORES!
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/content/m/y/f/myfgg/html/mydir/scorecard.php on line 57
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/content/m/y/f/myfgg/html/mydir/scorecard.php on line 68
- All-Time
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/content/m/y/f/myfgg/html/mydir/scorecard.php on line 71
- This Year
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/content/m/y/f/myfgg/html/mydir/scorecard.php on line 74
- This Quarter
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/content/m/y/f/myfgg/html/mydir/scorecard.php on line 77
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/content/m/y/f/myfgg/html/mydir/scorecard.php on line 174
- 7 Days Ago	
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/content/m/y/f/myfgg/html/mydir/scorecard.php on line 205
- 14 Days of Fitnessgrade Campaign
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/content/m/y/f/myfgg/html/mydir/scorecard.php on line 208
- Lose 30 by Christmas Campaign
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/content/m/y/f/myfgg/html/mydir/scorecard.php on line 211
- Dinner on the Road Campaign
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/content/m/y/f/myfgg/html/mydir/scorecard.php on line 214
- P90X Campaign
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/content/m/y/f/myfgg/html/mydir/scorecard.php on line 217
- Lunch Basketball Campaign
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/content/m/y/f/myfgg/html/mydir/scorecard.php on line 220
- Running Campaign
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/content/m/y/f/myfgg/html/mydir/scorecard.php on line 223
- Personal Training Campaign
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/content/m/y/f/myfgg/html/mydir/scorecard.php on line 226
- General Health Campaign
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/content/m/y/f/myfgg/html/mydir/scorecard.php on line 229
- Cholesterol Lowering Campaign

Picture(s):
						../1.png

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   -   longrifle0x
发表评论?

0 条评论。

发表评论