{"id":397,"date":"2009-01-09T22:26:59","date_gmt":"2009-01-10T06:26:59","guid":{"rendered":"http:\/\/cubist.cs.washington.edu\/Security\/?p=397"},"modified":"2009-01-10T11:28:23","modified_gmt":"2009-01-10T19:28:23","slug":"security-review-facebook-applications","status":"publish","type":"post","link":"https:\/\/secblog.cs.washington.edu\/Security\/2009\/01\/09\/security-review-facebook-applications\/","title":{"rendered":"Security Review: Facebook Applications"},"content":{"rendered":"<p>In mid-2007, <a href=\"http:\/\/www.facebook.com\">Facebook <\/a>launched a free <a href=\"http:\/\/developers.facebook.com\/\">development platform<\/a> that allows independent designers to create applications that integrate with core features of Facebook. Since then, <a href=\"http:\/\/www.sfgate.com\/cgi-bin\/article.cgi?f=\/c\/a\/2008\/07\/23\/BU7C11TAES.DTL\">over 33,000 applications<\/a> have been made, the most popular of the applications having over 16 million monthly active users. Facebook applications are intended to be opt-in modular extensions of Facebook for which users can voluntarily register. Facebook itself is composed of a collection of applications; many of the features people perceive as emblematic of Facebook (e.g. the Wall, Photos, and Events, to name a few) are actually \u201capplications\u201d in this design scheme, and they are provided by Facebook by default when one registers for the website.<\/p>\n<p><!--more--><\/p>\n<p>Since its initial launching, 3rd party applications have caused an influx of problems for Facebook and its users. Advertisement-heavy applications spammed users and popular applications cluttered profiles, reducing the usability of the website. In July 2008, Facebook implemented a considerable redesign to reduce the prominence of applications on Facebook profiles. However, applications pose significant security issues that have yet to be addressed.<\/p>\n<h3>Assets and Security Goals<\/h3>\n<ul>\n<li><strong>User Privacy.<\/strong> Many Facebook users trust the website with an abundance of highly sensitive information, such as religious and political views, phone numbers, home addresses, and even credit card numbers.<\/li>\n<li><strong>Facebook Source Code.<\/strong> Facebook itself runs the risk of revealing its source code or security holes by allowing developers to make API calls on Facebook data. Carelessness in the platform could result in ruining essential parts of the site.<\/li>\n<li><strong>Facebook Reputation.<\/strong> Facebook applications are embedded in the Facebook interface. Even though they are often developed by 3rd parties completely outside of Facebook\u2019s control, users still perceive Facebook to be partly responsible for the applications.<\/li>\n<li><strong>Facebook Liability.<\/strong> Allowing independent developers to create applications for their website could potentially put Facebook into legal trouble if the developers created malicious applications.<\/li>\n<\/ul>\n<h3>Adversaries\/Threats<\/h3>\n<ul>\n<li><strong>Thieves and Spammers.<\/strong> A social networking site as widespread as Facebook contains an abundance of information hackers would love to obtain. Spammers could get a hold of not only emails, phone numbers, and home addresses, but also a list of interests that allow for targeted advertisements. Gift and donation applications often take credit card numbers, which may or may not be secured.<\/li>\n<li><strong>Stalkers.<\/strong> Facebook is a repository of photos and contact information. Exploiting security flaws in applications, stalkers could indirectly retrieve personal information about the users of the application.<\/li>\n<li><strong>Government and Schools.<\/strong> Government, schools, and other authoritative figures may use Facebook to look for evidence of \u201cwrongdoings\u201d in the eyes of the authority. While Facebook itself takes measures to protect the privacy of users, these 3rd party applications are usually far less secure, but still have access to the information stored on Facebook such as profile information.<\/li>\n<\/ul>\n<h3>Potential Weaknesses<\/h3>\n<ul>\n<li><strong>Applications have access to the information of users\u2019 friends.<\/strong> When a user installs a Facebook application, the application developer has access to all the public information on a user\u2019s profile \u2013 <em>and all that user\u2019s friends\u2019 information<\/em>. Therefore there is no way to completely opt out of giving Facebook applications your information unless none of your friends add applications. One can <a href=\"http:\/\/www.facebook.com\/privacy\/?view=platform\">edit the amount<\/a> of information apps can see, but this feature is unknown and hidden away (not to mention unintuitive), and the default options allow apps to access copious amounts of user information.<\/li>\n<li><strong>Poorly coded\/secured applications.<\/strong> Applications can be written by anyone, even programmers with only a cursory knowledge of PHP and SQL, and code is stored entirely on 3rd party servers. Many applications do not have any sort of authentication on their servers when processing queries from their own Facebook applications, something the most novice hackers can intercept. (See Risks for more information). <\/li>\n<li><strong>Malicious applications.<\/strong> Anyone can make a Facebook application, and Facebook applications provide an environment conducive for convincing attacks. A famous example was the <a href=\"http:\/\/www.theregister.co.uk\/2008\/01\/04\/facebook_adware\/\">Secret Crush<\/a> application that led users to download malware onto their machines.<\/li>\n<li><strong>\u201cExtended permissions\u201d are easy to obtain.<\/strong> Facebook attempts to limit developer\u2019s access to user\u2019s Facebook accounts by default, but developers can request \u201c<a href=\"http:\/\/wiki.developers.facebook.com\/index.php\/Extended_permission\">extended permissions<\/a>\u201d through simple API calls. Extended permissions allow the application to email the user, send text messages to and from the users, access the user\u2019s data even when they are offline, and other invasive activities. The user must OK these requests, but many times users will accept the request, unsure of what it does. The permissions are also revocable, but again, many users do not know what these permissions are or why they would be revoked.<\/li>\n<li><strong>No enforced terms of service for applications.<\/strong> Facebook washes its hands of all legal responsibility via its <a href=\"http:\/\/developers.facebook.com\/user_terms.php\">terms of service<\/a>:<br \/>\n<blockquote>\n<p>When you install a Developer Application, you understand that \u2026 we are not responsible for your use of or inability to use any Developer Applications, including without limitation the content, accuracy, or reliability of such Developer Application and the privacy practices or other policies of the Developer. YOU USE SUCH DEVELOPER APPLICATIONS AT YOUR OWN RISK.<\/p>\n<\/blockquote>\n<p>While Facebook has a set of guidelines for 3rd party applications, Facebook makes no guarantee that these applications will obey the guidelines. This means that if an application stores your personal information indefinitely, sells your contact information, or otherwise abuses your privacy, Facebook will make no action to rectify the situation.\n<\/li>\n<\/ul>\n<h3>Potential Defenses<\/h3>\n<p><strong>Facebook should have legal backing behind the <a href=\"http:\/\/developers.facebook.com\/user_terms.php\">Platform Application Terms of Use<\/a>.<\/strong> Without legal backing, the document has no power at all. <\/p>\n<p><strong>Facebook could also play a larger role in the development process.<\/strong> Right now, applications are created entirely on the developer\u2019s webspace, and the application queries this \u201ccallback url\u201d for the content that should be rendered in the application canvas page. If Facebook hosted databases and webspace for applications, there would be less flexibility in application creation, but Facebook could employ tactics that would help enforce secure transactions.<\/p>\n<p><strong>Facebook could make privacy issues clear to the user.<\/strong> Very few users know exactly how much information applications are allowed to see. When a user adds an application, Facebook warns the user that the app has access to his or her information, but there\u2019s no mention to the user\u2019s friends, even though they too are giving up information.<\/p>\n<p><strong>Facebook could simply require a fee to develop applications.<\/strong> This would deter many amateurs from cobbling poorly designed applications.<\/p>\n<p>Of course, the ideas stated above would be very expensive to implement and annoying for usablity. Instead, Facebook has simple measures in place to help users determine \u201cspammy\u201d applications and safe applications. Facebook recently created an <a href=\"http:\/\/developers.facebook.com\/verification.php\">Application Verification Process<\/a> that essentially gives a seal of approval to applications that pass Facebook\u2019s standards. The seal of approval is expensive, though \u2013 the application alone is $375 (reduced to $175 for students and non-profits). It is also not likely that \u201cverified\u201d apps will be tested for robust code; verified apps only guarantee that the intentions are good, not the implementation.<\/p>\n<h3>Risks<\/h3>\n<p>Perhaps the biggest security risk raised by independent Facebook applications is the quality of code generated by amateur developers. While the platform code itself is fairly secure, literally anyone can make a Facebook application, and often these programmers know very little about basic website security. Many applications do not have any sort of authentication on their servers when processing queries from their own Facebook applications, something the most novice hackers can intercept. <\/p>\n<p>The Moods Application was a notorious example and there is a <a href=\"http:\/\/www.youtube.com\/watch?v=w65s1iyXqLo\">YouTube video<\/a> explaining how it could be hacked using Firebug. (The Moods Application has since fixed this security hole, but it is representative of the poor code prevalent on applications.) <\/p>\n<p>While changing your friend\u2019s \u201cmood\u201d is fairly innocuous, one can imagine the ramifications of poorly secured applications. There have been Facebook applications that could register users to vote in the 2008 election and applications that take credit card numbers for donations to charities; even if the intentions of the application developers are earnest, poor code can make these applications a hacker\u2019s goldmine. <\/p>\n<p>Furthermore, these risks are far greater when taking into account that (naturally) not all developers are trying to develop applications in earnest.<\/p>\n<h3>Conclusions<\/h3>\n<p>Facebook has the ability to make applications more secure and responsible of user privacy. Quite frankly, Facebook does not want to do this. Enforcing security involves a lot of manpower and financial obligation, and it introduces difficult usability challenges. The attraction to developing on the Facebook platform is exactly this abundance of easily accessible private information, and Facebook would lose a lot of its draw by tightening security.<\/p>\n<p>While Facebook applications seem unreliable right now, applications could be even more damaging in the future. Currently the average Facebook user is a college student, but in a few years many of these college students will graduate and obtain jobs. The information being hosted on Facebook now \u2013photos, comments, groups, interests \u2013 could be accessible to future employers, business partners, or political rivals. Although Facebook has some provisions to protect users, applications are an easy way to sidestep any security measures put in place by Facebook.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In mid-2007, Facebook launched a free development platform that allows independent designers to create applications that integrate with core features of Facebook. Since then, over 33,000 applications have been made, the most popular of the applications having over 16 million &hellip; <a href=\"https:\/\/secblog.cs.washington.edu\/Security\/2009\/01\/09\/security-review-facebook-applications\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":94,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-397","post","type-post","status-publish","format-standard","hentry","category-security-reviews"],"_links":{"self":[{"href":"https:\/\/secblog.cs.washington.edu\/Security\/wp-json\/wp\/v2\/posts\/397","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/secblog.cs.washington.edu\/Security\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/secblog.cs.washington.edu\/Security\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/secblog.cs.washington.edu\/Security\/wp-json\/wp\/v2\/users\/94"}],"replies":[{"embeddable":true,"href":"https:\/\/secblog.cs.washington.edu\/Security\/wp-json\/wp\/v2\/comments?post=397"}],"version-history":[{"count":10,"href":"https:\/\/secblog.cs.washington.edu\/Security\/wp-json\/wp\/v2\/posts\/397\/revisions"}],"predecessor-version":[{"id":407,"href":"https:\/\/secblog.cs.washington.edu\/Security\/wp-json\/wp\/v2\/posts\/397\/revisions\/407"}],"wp:attachment":[{"href":"https:\/\/secblog.cs.washington.edu\/Security\/wp-json\/wp\/v2\/media?parent=397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/secblog.cs.washington.edu\/Security\/wp-json\/wp\/v2\/categories?post=397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/secblog.cs.washington.edu\/Security\/wp-json\/wp\/v2\/tags?post=397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}