<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Social Hacking &#187; OpenSocial</title>
	<atom:link href="http://theharmonyguy.com/category/opensocial/feed/" rel="self" type="application/rss+xml" />
	<link>http://theharmonyguy.com</link>
	<description>Checking the security and privacy of social networking applications, white hat style...</description>
	<lastBuildDate>Sun, 14 Mar 2010 04:31:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Application Data Retention (Updated)</title>
		<link>http://theharmonyguy.com/2009/07/28/application-data-retention/</link>
		<comments>http://theharmonyguy.com/2009/07/28/application-data-retention/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 14:57:25 +0000</pubDate>
		<dc:creator>theharmonyguy</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[OpenSocial]]></category>

		<guid isPermaLink="false">http://theharmonyguy.com/?p=272</guid>
		<description><![CDATA[As many who follow news on privacy and technology know, Canada&#8217;s Privacy Commissioner Jennifer Stoddart recently issued a report criticizing Facebook for various problems with privacy on the site.  The report addressed several aspects of privacy on Facebook, including data access by third-party applications.
One item in the report, though, concerned data retention by Facebook.  As [...]]]></description>
			<content:encoded><![CDATA[<p>As many who follow news on privacy and technology know, Canada&#8217;s Privacy Commissioner Jennifer Stoddart recently <a title="Canadian Privacy Commissioner Says Facebook Is Full Of Holes" href="http://www.techcrunch.com/2009/07/16/canadian-privacy-commissioner-says-facebook-is-full-of-holes/">issued a report criticizing Facebook</a> for various problems with privacy on the site.  The report addressed several aspects of privacy on Facebook, including data access by third-party applications.</p>
<p>One item in the report, though, concerned data retention by Facebook.  As TechCrunch describes:</p>
<blockquote><p>The organization and Commissioner’s main concern is that Facebook provides confusing or incomplete information about its privacy practices, like not giving users to opportunity to complete wipe out their accounts instead of merely deactivating them. Stoddart also criticizes Facebook’s policy of indefinitely keeping the personal information of people who have done just that.</p></blockquote>
<p>Commissioner Stoddart is not the first to raise this issue, as it&#8217;s been a subject of debate for some time.  However, I have not heard many people discuss a related aspect: data retention by third-party applications.</p>
<p><span style="text-decoration: line-through;">Unfortunately, with the way the Facebook Platform is currently structured, applications receive no notification when a user removes an application&#8217;s access to their data or shuts down their Facebook account</span>.  Consequently, an application developer has no way to determine when a user has &#8220;uninstalled&#8221; the application, and thus for most applications, data retention lasts forever.  You can see this in action by removing an application then later authorizing it again: all of your data generated within the application will likely remain.  For some applications, this data continues to be accessible to other users even if you&#8217;ve uninstalled the application.</p>
<p>And this is not simply a Facebook problem.  From what I understand so far, the same issue applies to OpenSocial platforms, such as MySpace.</p>
<p>Granted, there&#8217;s not simple solution to this problem, but as concerns grow over the amount of data shared on social networking sites, third-party data retention policies will have to enter the discussion at some point.  One can argue that each application developer is responsible for their own policies, but most applications probably have no policy, and lack of notification on uninstall makes any policy difficult to implement.</p>
<p><strong>Update (8/26):</strong> Upon further research, I discovered that I was quite incorrect with this blog post; my apologies to Facebook for making an erroneous statement about the Facebook Platform.  Facebook does, in fact, allow developers to set a <a title="Post-Remove URL - Facebook Developers Wiki" href="http://wiki.developers.facebook.com/index.php/Post-Remove_URL">post-remove URL</a> which is notified when a user removes an application.  Apparently my experience has mostly been with applications which do not take advantage of this feature, meaning the issue primarily lies with application developers, not Facebook.  I do wonder how many applications actually remove data upon uninstallation.</p>
]]></content:encoded>
			<wfw:commentRss>http://theharmonyguy.com/2009/07/28/application-data-retention/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Social Security 102: Client-Side Code</title>
		<link>http://theharmonyguy.com/2008/02/11/social-security-102-client-side-code/</link>
		<comments>http://theharmonyguy.com/2008/02/11/social-security-102-client-side-code/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 16:44:25 +0000</pubDate>
		<dc:creator>theharmonyguy</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[OpenSocial]]></category>

		<guid isPermaLink="false">http://theharmonyguy.com/2008/02/11/social-security-102-client-side-code/</guid>
		<description><![CDATA[Second in a series.  First post: Query Strings
In this post, I&#8217;ll both detail the iLike on Ning hack and raise a question about web development in general.  This particular hack makes me wonder about some larger security issues.
In the early days of OpenSocial, I didn&#8217;t have many platforms to test on.  After working with Plaxo, [...]]]></description>
			<content:encoded><![CDATA[<p>Second in a series.  First post: <a title="Social Security 101: Query Strings" target="_blank" href="http://theharmonyguy.com/2008/02/01/social-application-security-101-query-strings/">Query Strings</a></p>
<p>In this post, I&#8217;ll both detail the iLike on Ning hack and raise a question about web development in general.  This particular hack makes me wonder about some larger security issues.</p>
<p>In the early days of OpenSocial, I didn&#8217;t have many platforms to test on.  After working with Plaxo, I turned to Ning, where I found a public site using the iLike application.  Most of the gadgets available at the time did not store any user-specific data, so iLike was one of the few that even could be hacked with any significance.  I started browsing through the iLike code to see if I could change the playlist.</p>
<p>I had learned from working with Emote that OpenSocial applications operated in the context of an owner and a viewer.  For instance, if you looked at my iLike playlist, you would be the viewer (you&#8217;re the one accessing the data) and I would be the owner (I&#8217;m the user who actually controls the data you&#8217;re seeing).  If you view an iLike playlist where you&#8217;re not the owner, you shouldn&#8217;t be able to change any data &#8211; only view it.</p>
<p>OpenSocial applications are embedded using an inline frame, so to work with the application&#8217;s code, I copied the URL of the iframe and opened it up in its own tab under Opera.  (I happily use <a title="Features of the Opera Desktop Browser" target="_blank" href="http://www.opera.com/products/desktop/features/">Opera</a> for nearly all of my daily browsing, and highly recommend it.)  Furthermore, much of the code for an OpenSocial application is client-side JavaScript, meaning it&#8217;s easily viewable within a browser.  While digging through the iLike application&#8217;s code, I found a few lines of JavaScript which set variables for owner and viewer to a JSON string of user data.</p>
<p>When viewing the source code of a page in Opera 9, you can also change the code.  After editing, clicking the &#8220;Apply Changes&#8221; button will then reload the page with your code modifications.  This feature was designed for developers in debugging their sites, but it works for any web page.  More on all this in a sec.  Anyway, I copied the JSON data for the owner and and pasted it in for the viewer data as well, essentially tricking the application into thinking that the owner of the playlist was the person currently accessing it.  A few more code tweaks were necessary to complete the spoof, but eventually it worked and I could modify the playlist at will.  Ning has since added some more authentication to the mix, but I recently had <a title="Top Friends on Facebook" target="_blank" href="http://theharmonyguy.com/2008/02/04/top-friends-on-facebook/">success</a> using the same technique to edit JavaScript in a Facebook application.</p>
<p>Now, the bigger question here, and one I can&#8217;t really answer at this point, is the security implications of client-side code in social applications.  From what I understand, the ability to edit the client-side code of a page is not limited to Opera, as I&#8217;m fairly certain Firefox extensions can accomplish the same task.</p>
<p>In the past, much of the business logic for web-based applications happened server-side.  If you edited the client-side code of, say, an ASP forum script, you&#8217;d just be playing with static HTML and wouldn&#8217;t get or set any new data within the application.  But since the rise of &#8220;Ajax&#8221; scripting, JavaScript is the new CSS, and many developers are realizing its potential.  This had led to web-based applications which are written mostly in JavaScript, often dynamically interfacing with a server-side controller.  All of that JavaScript is executed client-side, however, and user-modified code runs in the context of the remote application.</p>
<p>In one sense, modern browsers are allowing what forum scripts have tried to prevent for years &#8211; executing arbitrary scripts on a remote page.  But the forums prevented this to protect the user &#8211; if a hacker inserted malicious code into a page, an unsuspecting user could unknowingly execute it.  With user-modified code, the user is the one inserting and willfully executing the code &#8211; and now the target is the remote application&#8217;s data.</p>
<p>OpenSocial seems especially vulnerable to this type of hack, since the interface between an OpenSocial gadget and a host network&#8217;s data happens with JavaScript.  In fact, the business logic for many gadgets is written mostly in client-side JavaScript.  Facebook applications generally operate more server-side, but non-FBML applications are not immune, as the recent Top Friends hack demonstrates.</p>
<p>I&#8217;ll be quick to add that the threat of this hack compromising a host social network is probably not high.  Newer versions of OpenSocial appear to have added further user authentication that makes it difficult for a hacker to spoof user credentials and thus gain access to, say, profile data on Orkut or MySpace.  Facebook also includes safeguards to prevent an application from getting to data that a user could not normally access.</p>
<p>The problem is that social application frameworks like OpenSocial and the Facebook Platform create another tier of data which can be much more vulnerable.  For instance, while Facebook stores your profile data and friend list, Slide stores the data you create with Top Friends, SuperPoke, and FunWall.  Compromising Slide&#8217;s code could give a hacker access to all of that data, as I&#8217;ve already demonstrated.  Sometimes the application data can partially mirror Facebook&#8217;s data; accessing your Top Friends list gives information about who some of your friends are, regardless of whether your Facebook friend list is set to private.</p>
<p>Granted, most of the data stored by third-party applications at this point is fairly benign.  But that could change as developers come up with new ideas.  I could foresee an application with premium features storing credit card information, for instance.  And if users trust a host social network, they&#8217;re likely to trust the third-party applications on that network &#8211; and those applications may be less secure.</p>
<p>So what&#8217;s the main lesson for developers here?  Keep in mind that any client-side code you write is visible to the user and susceptible to changes.  (Always &#8211; at one point Compare People used a JavaScript compressor to obfuscate their code, but it didn&#8217;t take long to undo.)  Don&#8217;t rely on client-side code to plug security holes &#8211; an enterprising user can remove those plugs.  Make use of server-side checks to ensure that application requests are legitimate.</p>
<p>And I&#8217;ll add that I&#8217;d be interested in seeing other developers comment on the larger security issues here.  I&#8217;m still not sure about the full security implications of up-and-coming technologies, such as Facebook&#8217;s JavaScript library or new methods for application data storage.  How much of a danger do client-side web applications really present?</p>
]]></content:encoded>
			<wfw:commentRss>http://theharmonyguy.com/2008/02/11/social-security-102-client-side-code/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Social Security 101: Query Strings</title>
		<link>http://theharmonyguy.com/2008/02/01/social-application-security-101-query-strings/</link>
		<comments>http://theharmonyguy.com/2008/02/01/social-application-security-101-query-strings/#comments</comments>
		<pubDate>Sat, 02 Feb 2008 00:29:49 +0000</pubDate>
		<dc:creator>theharmonyguy</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[OpenSocial]]></category>

		<guid isPermaLink="false">http://theharmonyguy.com/2008/02/01/social-application-security-101-query-strings/</guid>
		<description><![CDATA[Perhaps people have wondered where I&#8217;ve been&#8230; I apologize for the long delay in posting again.  I&#8217;m actually still involved in educational pursuits, and studying for finals quickly became a priority after my last post.  I can&#8217;t promise how often I&#8217;ll often I&#8217;ll be on here, but I have continued to keep up with the [...]]]></description>
			<content:encoded><![CDATA[<p>Perhaps people have wondered where I&#8217;ve been&#8230; I apologize for the long delay in posting again.  I&#8217;m actually still involved in educational pursuits, and studying for finals quickly became a priority after my last post.  I can&#8217;t promise how often I&#8217;ll often I&#8217;ll be on here, but I have continued to keep up with the social networking market and have continued to tinker with a few applications.  I also want to apologize that I never got back to many people about offers they made; all were very appreciated, but none feasible at this time.</p>
<p>I&#8217;ve also learned from my last few adventures how much of an amateur I am and that I shouldn&#8217;t be too quick to point out potential holes.  Consequently, I&#8217;m evaluating potential hacks more carefully to provide the most reliable information possible.</p>
<p>Anyway, I wanted to make good on previous promises and detail some of the previous techniques I&#8217;ve used for hacking social applications.  Once again, they&#8217;re surprisingly simple, so I thought this would be a good opportunity to remind social application developers of basic security issues they need to be aware of.  You&#8217;d be surprised by how many popular applications neglect these issues.</p>
<p>Many of my previous hacks simply came from passing the right <a title="Wikipedia entry on query strings" target="_blank" href="http://en.wikipedia.org/wiki/Query_string">query string</a> to an application.  For instance, by examining the code for RockYou&#8217;s Emote application on OpenSocial, I found certain URLs that were accessed for performing particular actions.  This means that when you clicked a button to, say, update your current Emote status, the application would send the data by forwarding you to an address like this (fake URL &#8211; I&#8217;m only illustrating): <u>http://theharmonyguy.com/app/update.php?uid=1234&amp;status=Happy</u>  Each parameter of the query string sent information on the action to be performed.  Amazingly enough, I simply had to change a few parameters, such as changing the user ID number for &#8220;uid&#8221; to John McCrea&#8217;s ID, to accomplish the same action but for another user.  The application never performed any authentication to see if the request was coming from someone logged in with the changed user ID.</p>
<p>This can also become a privacy issue, as I&#8217;ve seen on several Facebook applications.  The Graffiti application used to have this issue; best I can tell they&#8217;ve fixed it.  To access a table of drawings that people have sent you in Graffiti, you visit this URL: <u>http://apps.facebook.com/graffitiwall/wall.php?to_id=1234</u> (where 1234 is your Facebook ID).  Previously, changing the ID number to any other Facebook ID would let you view that person&#8217;s drawings as well.  The application failed to check your relationship to the person before presenting the data.  Any application which has some sort of history page is susceptible to this problem.</p>
<p>Finally, query strings have long been a source of <a title="Wikipedia entry on SQL injections" target="_blank" href="http://en.wikipedia.org/wiki/SQL_injection">injection attacks</a>.  This comes from passing data via a query string parameter which gets interpreted by the application as a command of some sort.  A common problem I&#8217;m seeing in Facebook applications leads to a new type of injection: inserting FBML into canvas pages.  Many applications, including popular ones, will render messages on a page by adding a query string, such as (again, fake URL): <u>http://apps.facebook.com/app/status.php?message=Your+status+has+been+updated</u>  The problem is that the canvas page then takes the query string parameter and inserts it without any filtering.  That allows a hacker to insert FBML into the parameter, which will then be rendered by the application &#8211; I&#8217;ve inserted iframe&#8217;s into several apps.  I&#8217;m not exactly sure how much of a security issue this is, since something like an iframe can&#8217;t easily spoof application authentication parameters, but it certainly seems like a problem waiting to happen.  Furthermore, in RockYou&#8217;s OpenSocial application, I used this same technique to insert HTML/JavaScript into pages.  Take note: any input parameters that are rendered in a page should be escaped first to avoid injection attacks.</p>
<p>Query strings have been a way to hack several applications, ranging from Emote to SuperPoke.  But hacks like iLike on Ning utilized a different technique that developers ought to be aware of &#8211; one I&#8217;ll detail in my next post.</p>
<p>Oh, one little bonus before I go&#8230; one of my SuperPoke hacks was figuring out how to access all available actions, regardless of &#8220;level&#8221; or season.  SuperPoke recently introduced pay-only premium pokes, and while they block access to the premium pokes using my technique, all of the free ones still work.  I took that as a sign they don&#8217;t mind my little hack (which I did mention to them months ago), so I whipped up a simple application just for fun: <a title="Full SuperPoke application on Facebook" target="_blank" href="http://www.facebook.com/apps/application.php?id=11544595367">Full SuperPoke</a>.  As I say, this is only for fun, not to harm anyone, and if you don&#8217;t want to spoil the fun by skipping all the levels, you needn&#8217;t bother with it.  But if you&#8217;d like to enjoy some new actions, check it out.</p>
]]></content:encoded>
			<wfw:commentRss>http://theharmonyguy.com/2008/02/01/social-application-security-101-query-strings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iLike on Ning (Fixed)</title>
		<link>http://theharmonyguy.com/2007/11/06/ilike-on-ning/</link>
		<comments>http://theharmonyguy.com/2007/11/06/ilike-on-ning/#comments</comments>
		<pubDate>Tue, 06 Nov 2007 06:06:28 +0000</pubDate>
		<dc:creator>theharmonyguy</dc:creator>
				<category><![CDATA[OpenSocial]]></category>

		<guid isPermaLink="false">http://theharmonyguy.com/2007/11/06/undisclosed-on-undisclosed/</guid>
		<description><![CDATA[Date: November 5, 2007
Initial hack: 20 minutes
Vulnerabilities:

Able to access listing of friends for any user and limited personal information about these friends
Able to add and remove playlist tracks for any user

Coverage: TechCrunch
Progress:  Ning and iLike have both been notified.  Ning has replied and stated they are working to fix the issues ASAP.
Update: First &#8220;vulnerability&#8221; not [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Date:</strong> November 5, 2007</p>
<p><strong>Initial hack:</strong> 20 minutes</p>
<p><strong>Vulnerabilities:</strong></p>
<ul>
<li><strike>Able to access listing of friends for any user and limited personal information about these friends</strike></li>
<li>Able to add and remove playlist tracks for any user</li>
</ul>
<p><strong>Coverage:</strong> <a href="http://www.techcrunch.com/2007/11/05/opensocial-hacked-again/" title="OpenSocial Hacked Again">TechCrunch</a></p>
<p><strong>Progress:</strong>  Ning and iLike have both been notified.  Ning has replied and stated they are working to fix the issues ASAP.</p>
<p><strong>Update:</strong> First &#8220;vulnerability&#8221; not a vulnerability at all; I&#8217;m new to Ning so didn&#8217;t realize the data was already available via JSON.  Ning has made some updates to fix the iLike issues; haven&#8217;t tested them yet.</p>
<p><strong>Update 2:</strong> On November 14 I tested my hack again, and Ning seems to have plugged the hole.  Good work.</p>
]]></content:encoded>
			<wfw:commentRss>http://theharmonyguy.com/2007/11/06/ilike-on-ning/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>RockYou&#8217;s Emote on Plaxo</title>
		<link>http://theharmonyguy.com/2007/11/06/rockyous-emote-on-plaxo/</link>
		<comments>http://theharmonyguy.com/2007/11/06/rockyous-emote-on-plaxo/#comments</comments>
		<pubDate>Tue, 06 Nov 2007 05:50:28 +0000</pubDate>
		<dc:creator>theharmonyguy</dc:creator>
				<category><![CDATA[OpenSocial]]></category>

		<guid isPermaLink="false">http://theharmonyguy.com/2007/11/06/rockyous-emote-on-plaxo/</guid>
		<description><![CDATA[Date: Friday, November 2, 2007
Initial hack: 45 minutes
Vulnerabilities:

Able to change current Emote status for any user
Able to access Emote history and current status for any user
Able to insert HTML, including JavaScript, into Emote pages

Coverage: TechCrunch
Progress: Plaxo has removed Emote from their whitelist.  As of Nov. 6, Emote remains unpatched.
]]></description>
			<content:encoded><![CDATA[<p><strong>Date:</strong> Friday, November 2, 2007</p>
<p><strong>Initial hack:</strong> 45 minutes</p>
<p><strong>Vulnerabilities:</strong></p>
<ul>
<li>Able to change current Emote status for any user</li>
<li>Able to access Emote history and current status for any user</li>
<li>Able to insert HTML, including JavaScript, into Emote pages</li>
</ul>
<p><strong>Coverage:</strong> <a TITLE="First OpenSocial Application Hacked Within 45 Minutes" HREF="http://www.techcrunch.com/2007/11/02/first-opensocial-application-hacked-within-45-minutes/">TechCrunch</a></p>
<p><strong>Progress:</strong> Plaxo has removed Emote from their whitelist.  As of Nov. 6, Emote remains unpatched.</p>
]]></content:encoded>
			<wfw:commentRss>http://theharmonyguy.com/2007/11/06/rockyous-emote-on-plaxo/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
