<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">

    <channel>
    
    <title>http://www.yvoschaap.com/</title>
    <link>http://www.yvoschaap.com/index.php/weblog/index/</link>
    <description></description>
    <dc:language>en</dc:language>
    <dc:creator>ymschaap@gmail.com</dc:creator>
    <dc:rights>Copyright 2011</dc:rights>
    <dc:date>2011-09-17T09:51:51+00:00</dc:date>
    

    <item>
      <title>More hints of Facebook Music (code leaks)</title>
      <link>http://www.yvoschaap.com/weblog/more_hints_of_facebook_music_code_leaks</link>
      <content:encoded><![CDATA[<p>The rumor mill of Facebook finally doing something with actual Music has been going on for <a href="http://www.businessinsider.com/facebook-music-2011-9">months</a>. Most Facebook app developers have been steering away from developing anything related to music, afraid of being <a href="http://articles.businessinsider.com/2009-08-18/tech/29985644_1_traction-lastfm-real-value">squashed</a> by Facebook, hence the platform doesn't have any real mainstream music services.</p>

<p>Most of the rumors involve having the major streaming music players (pun intended) Spotify, MOG, Rdio more deeply integrated into the Facebook platform. GigaOm summarized Facebook's <a href="http://gigaom.com/2011/06/19/revealed-facebook%E2%80%99s-music-plans-involve-spotify-others/">proposal</a> to the music services (the mentioned Ticker has rolled out in a new design since).</p>

<p>22 September seems to be the date of the upcoming Facebook music <a href="http://techcrunch.com/2011/09/10/facebook-music-tracks/">announcement</a> at <a href="http://www.facebook.com/f8">f8</a> given the first talk beeing about "The Future of Digital Music". </p>

<p>Suprisingly this week MOG and Rdio both <a href="http://venturebeat.com/2011/09/15/rdio-free-on-demand-music/">announcement</a> support of limited free streaming, something Spotify has been offering in Europe, and more recently also in the US.</p>

<h3>The Hints</h3>
<p>I looked at the major music streaming services, and found an interesting reference in their HTML code. All <a href="http://open.spotify.com/track/3ssX20QT5c3nA9wk78V1LQ">track</a>, <a href="http://open.spotify.com/album/4CzT5ueFBRpbILw34HQYxi">album</a> and <a href="http://open.spotify.com/artist/1ZwdS5xdxEREPySFridCfh">artist</a> pages got meta data in a yet <a href="http://ogp.me/">undocumented</a> format:<br>
<div style="width: 620px">
<textarea cols="60" rows="5" name="code" class="html" style="width: 620px">
    <meta property="og:type" content="music.song" />
    <meta property="og:audio" content="spotify:track:3ssX20QT5c3nA9wk78V1LQ" />
    <meta property="og:audio:type" content="audio/vnd.facebook.bridge" />
    <meta property="music:duration" content="278" />
    <meta property="music:musician" content="http://open.spotify.com/artist/1ZwdS5xdxEREPySFridCfh" />
    <meta property="music:album" content="http://open.spotify.com/album/4CzT5ueFBRpbILw34HQYxi" />
    <meta property="music:album:track" content="1" />
</textarea >
</div>
</p>

<p>The providers whom all serve this custom Facebook format by tagging their pages <strong>music.song</strong>, <strong>music.album</strong> are:<br>
<ul>
<li><a href="http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fopen.spotify.com%2Ftrack%2F3ssX20QT5c3nA9wk78V1LQ">Spotify</a></li>
<li><a href="http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fmog.com%2Fm%2Ftrack%2F57587005">MOG</a></li>
<li><a href="http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.rhapsody.com%2Fartist%2Ftrombone-shorty%2Falbum%2Ffor-true">Rhapsody</a></li>
<li><a href="http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fsoundcloud.com%2Figamusic%2Fcolette-carr-we-do-it-primo-x">Soundcloud</a></li>
<li><a href="http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.rdio.com%2Fartist%2FJustin_Bieber%2Falbum%2FMy_World_2.0%2Ftrack%2FBaby%2F">Rdio</a></li>
<li><a href="http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.deezer.com%2Fmusic%2Ftrack%2F6461440">Deezer</a> (France)</li>
<li><a href="http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.vevo.com%2Fwatch%2Fj-cole-featuring-trey-songz-j-cole-1%2Fcant-get-enough%2FUSQX91101318">VEVO</a> (added!)</li>
<li><a href="http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.iheart.com%2Fartist%2FSting-3802%2Fsongs%2FRoxanne-8063777%2F">iheart</a> (possible, no bridge)</li>
</ul>
</p>
<p>These seem to be the launching partners. Confirmed notable services without the format:<br>
<ul>
<li><a href="http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fitunes.apple.com%2Fnl%2Falbum%2Fmy-worlds-the-collection%2Fid403208857">iTunes</a></li>
<li><a href="http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.myspace.com%2Fjustinbieber%2Fmusic%2Fsongs%2Fnever-let-you-go-album-version-65776389">MySpace</a></li>
<li><a href="http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.pandora.com%2Fmusic%2Falbum%2Feminem%2Feminem%2Bshow%2Bexplicit">Pandora</a></li>
<li>Turntable.fm</li>
<li>Amazon.com (store and cloud player)</li>
<li>Last.fm</li>
<li>Napster</li>
<li>Kazaa</li>
<li>Groovershark</li>
<li>emusic</li>
<li>OVI Music</li>
</ul>
</p>

<p>Facebook has been building a <a href="http://developers.facebook.com/docs/opengraph/">social graph</a> for almost anything and anyone. These services providing detailed meta data regarding music, which users could like, share and comment would be a big win for Facebook and other developers to build from. The social graph would be expanded by a detailed music profile of users, and their friends.</p>

<p>The undocumented mentioned audio type <strong>audio/vnd.facebook.bridge</strong> seems to refer to a format that bridges audio between the streaming services and the Facebook platform.</p>

<p>It seems all the partners are ready: free streaming, link between the music service and Facebook, all we need is to wait few more days.</p>

<p><strong>Update:</strong> the official partner list<br><a href="/img//f8-open-graph-music-partners.jpg"><img src="http://www.yvoschaap.com/images/uploads/f8-open-graph-music-partners1_thumb.jpg"  width="250" height="166"  border="0" alt="f8 Open Graph Music Partners" ></a>

<p><iframe src="/so/#href=http%3A%2F%2Fwww.yvoschaap.com%2Fweblog%2Fmore_hints_of_facebook_music_code_leaks&position=tall&"  scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:260px; height:65px;" allowTransparency="true"></iframe></p>]]></content:encoded>
      <dc:subject></dc:subject>
      <dc:date>2011-09-17T09:51:51+00:00</dc:date>
    </item>

    <item>
      <title>Easy Share buttons for publishers</title>
      <link>http://www.yvoschaap.com/weblog/easy_share_buttons_for_publishers</link>
      <content:encoded><![CDATA[<p>I&#8217;ve always found it overly complicating to attach the famous Facebook Like, Twitter Tweet and most recently the Google +1 buttons on appropriate locations. Adding these buttons with the provider provided code involves adding blocking javascript which could cause your whole site to not load at all, significantly increase total page load, lead to unwanted javascript errors and could break the existing layout. Next to those issues: positioning the buttons, adding/removing providers and creating a common layout between the buttons is a huge hassle. <br />
While not implementing these buttons is of course an option, the push from search engines to promote retweeted links, likes &amp; +1-ed pages of friends in their search results could harm your competitive position. </p>

<p>For DirectLyrics I recently created a one-stop solution which solves all the issues these buttons cause. Key issues that needed solving: quick &amp; fast loads (2kb gzipped), wide provider support (5), and non-blocking. 
</p><h3>Result</h3>
<ul><li>Easy install on any page by including an iframe which refers to a CDN hosted long term cached <a href="http://c.directlyrics.com/so/index.html">html</a> file.</li>
<li>Control variables on layout, supported providers, relevant url. Passed as #hash (keeps the file completely cached for users)</li>
<li>Support both (native) <a href="/so/#href=http%3A%2F%2Fwww.yvoschaap.com&amp;tw=true&amp;li=true&amp;position=tall">tall</a> counters as well the <a href="/so/#href=http%3A%2F%2Fwww.yvoschaap.com&amp;tw=true&amp;li=true&amp;position=wide">wide</a> layout including the counters</li>
<li>Providers: Facebook (Link and Send), Twitter, LinkedIn, StumbleUpon and Google +1</li>
<li>Non-load blocking by using smart Javascript loaders</li></ul>

<p>This is an early and quick release, but I&#8217;m planning on supporting this for a while. You can download the <a href="/so/">source</a>, or hotlink to the Amazon CloudFront <a href="http://c.directlyrics.com/so/index.html">CDN</a> version.</p>

<h3>Setting</h3><p>
Example iframe:
</p><pre>
&lt;iframe
    src=&quot;/so/#href=http%3A%2F%2Fwww.yvoschaap.com%2F&amp;promo=tweet%20text&amp;position=tall&amp;su=true&quot;
    scrolling=&quot;no&quot; frameborder=&quot;0&quot;
    style=&quot;border:none; overflow:hidden; width:260px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;
&lt;/iframe&gt;
</pre><p>
<em>Implementation settings go here</em></p>

<h3>Sample</h3>
<iframe src="/so/#href=http%3A%2F%2Fwww.yvoschaap.com%2Fweblog%2Feasy_share_buttons_for_publishers&amp;promo=Yvo%20Schaap%20provides%20easy%20share%20buttons:%20" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:65px;" allowTransparency="true"></iframe><p> 
</p>]]></content:encoded>
      <dc:subject></dc:subject>
      <dc:date>2011-07-01T17:09:12+00:00</dc:date>
    </item>

    <item>
      <title>The Google  1 Button Discovered</title>
      <link>http://www.yvoschaap.com/weblog/the_google_1_button_discovered</link>
      <content:encoded><![CDATA[<p><img src="/+1.png" style="float: left; margin-right: 1em; margin-bottom: 1em;"> Google just recently introduced the <a href="http://www.google.com/+1/button/">+1 Button</a> to move towards a more social search. The +1 button is added to each search result on Google and allows users to share what results they <del>liked</del> +1&#8217;d. User&#8217;s friends can see the +1 in their search results and hence act on this piece of recommendation. These +1 are also used as lists to spice up the otherwise boring <a href="https://profiles.google.com/applitjester/plusones">Google profile</a> pages and to influence the search results rankings.</p>

<p>Google users must reside in the US, have a Google Profile, be logged in and <a href="http://www.google.com/experimental/">enable +1</a> to see how it works.</p>

<p>Whether the +1 is <a href="http://news.ycombinator.com/item?id=2388432">useful</a> or not is too early to call. But a noteworthy feature is missing: a button which can be attached on news posts to let visitors +1 their content. Just like when Google Buzz was launched an <a href="http://techcrunch.com/2010/04/13/google-buzz-spreads-across-the-web-launches-official-share-buttons/">ugly hack</a> was needed for months untill an official <em>buzz</em> button was made available. The buttons does exists because there is <a href="https://profiles.google.com/u/0/+1/personalization/">personalisation</a> option available refering to non-Google sites.</p>

<p>Google claims the button is &#8220;<a href="http://searchengineland.com/meet-1-googles-answer-to-the-facebook-like-button-70569">coming soon</a>&#8221; but I couldn&#8217;t wait, so I looked around the code, and looked some more, untill I found the button endpoint hiding from me, obfuscated, in a stray piece of javascript.</p>

<p>Check out these live Google +1 buttons:<br />
[since this was posted the button is available to anyone]</p>

<p>as seen on <a href="http://fanity.com/ ">Fanity</a> integrated in the right-hand side bar.</p>

<p>You can make them horizontal or vertical just like Twitter retweet and Facebook like.<br />
[since this was posted the button is available to anyone]</p>

<p>What I found out:<br />
- They work! Clicking the button (try: <a href="http://fanity.com/ ">Fanity</a>)&nbsp; indeed makes your +1 link appear on your <a href="http://profiles.google.com">Google profile</a>.<br />
- <b>If the button is red</b> with an exclamation mark you are not logged in or from outside the US. Check out the screen cap below.<br />
- These buttons also reveal the total number of +1&#8217;s by changing the request URL. For example Google.com has <a href="#">982</a> +1s, Techcrunch.com <a href="#">241</a>, Reddit.com <a href="#">125</a>. Whether this is a total count from my friend-circle only I&#8217;m not sure, but it should since that would make more sense.<br />
- Google needs some more <a href="http://stopdesign.com/archive/2009/03/20/goodbye-google.html">A/B</a>-testing on alignment of the total +1 count.</p>

<p>An image for when Google takes it down, or you are not from the US/logged in:<br />
<img src="http://yvoschaap.com/screen-cap.png"></p>

<p>As seen on:
</p><li><a href="http://techcrunch.com/2011/03/31/omg-someone-just-found-an-embeddable-google-1-button-%e2%80%93-and-it-works/">Techcrunch</a></li>
<li><a href="http://www.businessinsider.com/google-1-button-2011-3">Business Insider</a><p></li>
</p>]]></content:encoded>
      <dc:subject></dc:subject>
      <dc:date>2011-03-31T17:24:48+00:00</dc:date>
    </item>

    <item>
      <title>Sierre, 18 March 2011</title>
      <link>http://www.yvoschaap.com/weblog/sierre_18_march_2011</link>
      <content:encoded><![CDATA[<p><img src="http://www.yvoschaap.com/images/uploads/IMG_0081.JPG"  alt="" width="670" height="390"  border="0" alt="image" name="image" />
</p>]]></content:encoded>
      <dc:subject></dc:subject>
      <dc:date>2011-03-18T11:25:33+00:00</dc:date>
    </item>

    <item>
      <title>Directlyrics and Fanity project updates</title>
      <link>http://www.yvoschaap.com/weblog/directlyrics_and_fanity_project_updates</link>
      <content:encoded><![CDATA[<p>Let me give you an update on what significant milestones I&#8217;ve reached in the past six months.<br />
First of all <a href="http://www.directlyrics.com/">Directlyrics</a> has seen double digit growth every month with in August over 23 million page views. Doubling my previous record from 2007 of an ex-site. Thanks go out to Eminem, Katy Perry and Rihanna with their enormous single successes.<br />
I&#8217;ve also released a complete re-design of the website together with a daily updated music blog which already attracts 30.000 page views per day thanks to Kevin and his work. <br />
With the maturity of site, I&#8217;ve also negotiated lyrics publishing rights from the major publishing companies through a deal with <a href="http://www.gracenote.com">Gracenote</a>. Where previously the songwriters did not retrieve any compensation for their work, I&#8217;m currently rolling out the official lyrics to the site which guarantee the correct lyrics and compensate the artists for their work.<br />
Next to the publishing rights, I&#8217;ve partnered with <a href="http://buzz-media.com/">BUZZMEDIA</a> for exclusive brand ad sales representation on Directlyrics. This should attract premium advertisers to the site, hence increase user experience and revenue to keep the site running. Sears currently has a campaign running.</p>

<p>And last but not least, I&#8217;ve been developing <a href="http://fanity.com">Fanity</a> for the past few months together with Raoul. A lot of backend work has been done, tons of data is coming in and algoritmes are trained to handle it all. We&#8217;ve just launched a simple invitation interface to allow alpha users of the site to login and try the site out, while others (you!) can get an invitation for the upcoming launch. Expect something big! 
</p>]]></content:encoded>
      <dc:subject></dc:subject>
      <dc:date>2010-09-01T12:12:44+00:00</dc:date>
    </item>

    <item>
      <title>Facebook and MySpace security: backdoor wide open, millions of accounts exploitable</title>
      <link>http://www.yvoschaap.com/weblog/facebook_myspace_accounts_hijacked</link>
      <content:encoded><![CDATA[<p><strong>Facebook and MySpace fixed this quickly after being notified.</strong></p> 
<p>As a application developer on Facebook, I usually run into certain walls that limit my application functionality. But I don't give up easily, and only recently I found a solution to one of my function limitations. Surprisingly, when looked into more carefully my solution  allowed full access and control to the Facebook user account that accessed my application. Did I mention this would also be untraceable since exploit actions would happen from the users IP and own domain cookie?</p> 
<p>Lets walk through it along some clarifying images. Flash applications run on a users' computer. A Flash application is able to load data into its environment. This is done by a request of the application, where the user loads a certain URL. Luckily - just with browser AJAX requests- a flash application hosted on domain X is unable to open a file on domain Y. If this would be possible, domain X is able to access content on domain Y, and when the user is logged in on domain Y retrieve and post back any personal data. </p> 
<p>In certain cases this could limit a flash application capabilities. A relevant example: an application wants to display public Facebook user thumbnails. The application is on domain X, the thumbnails on domain facebook.com. To resolve such issues, <a href="http://kb2.adobe.com/cps/142/tn_14213.html">Adobe</a> (Flash's developers) introduced a &quot;crossdomain.xml&quot; file which could allow  certain domains  accessing another domain, leading to cross domain access by certain or all  domains.</p> 
<p>While indeed Facebook <a href="http://www.facebook.com/crossdomain.xml">locked</a> the front door from any non-facebook domain access via Flash, a simple subdomain change allowed any flash application (domain=&quot;*&quot;) to access it's domain data:.</p> 
<p><img src="/exploit/facebook.gif" alt="crossdomain.xml"  /></p> 
<p>This wouldn't be a big deal if the subdomain only hosts images, but unfortunately this domain hosts the whole Facebook property, including a facebook user session. <br> 
<img src="/exploit/screen_cap.gif"  />
<br> 
If you have auto-login enabled on facebook, you might recognize your fullname [<b>update: its a screen cap now</b>] in the snippet above (and the keys to do actions from the accounts credentials).
</p> 
<p><img src="/exploit/facebook_domain.gif" width="531" height="208" /></p> 
<p>&nbsp;</p> 
<p>A huge problem that leads to full access and control of a user account whom has &quot;auto login&quot; enabled, and who hasn't?</p> 
<p>But how does MySpace fit in this story? You would be surprised if I found a similar back door on not one, but two of the top 10 websites online, right? Well a quick look at the MySpace crossdomain.xml file shows again a locked door, except for one element: the domain <strong>farm.sproutbuilder.com</strong> was enabled to access myspace.com data.</p> 
<p><img src="/exploit/myspace.gif" alt="crossdomain.xml" width="846" height="338" /></p> 
<p>A look at &quot;<a href="http://sproutinc.com/solution/sprout-builder/pricing/">sproutbuilder</a>&quot; showed a application builder (which indeed has a module able to load MySpace data: news updates) but more disturbing an upload function allows anybody uploading  &quot;.swf&quot; files, the file extension of Flash applications. The location of the uploaded file? <a href="#">farm.sproutbuilder.com</a> [exploit closed], exactly the domain that is allowed access to MySpace data.</p> 
<p><img src="/exploit/myspace_upload.gif" alt="upload" width="531" height="419" /></p> 
<p>You don't need much time to think of all the ways this could be exploited. All what has to happen is a active session, or a &quot;auto login&quot;-cookie and a URL which hosts a exploiting Flash file. For example when accessed, a automatic &quot;post update&quot; could be made, that would lure friends of the user to access the exploit URL, and the exploit would spread virally. An more invasive and hidden exploit could harvest all the users personal photo's,  data and messages to a central server without any trace, and there is no reason why this wouldn't be happening already with both Facebook and MySpace data.</p> 

<p>News item featured in various publications:
<ul>
<li><a href="http://techcrunch.com/2009/11/05/massive-facebook-and-myspace-flash-vulnerability-exposes-user-data/" rel="nofollow">TechCrunch</a></li>
<li><a href="http://www.computerworld.com/s/article/9140388/Developer_finds_major_coding_errors_in_Facebook_MySpace" rel="nofollow">Computerworld</a></li>
<li><a href="http://www.net-security.org/secworld.php?id=8473" rel="nofollow">net-security</a></li>
<li><a href="http://www.infoworld.com/d/security-central/facebook-myspace-coding-errors-compromised-users-data-139" rel="nofollow">Infoworld</a></li>
<li><a href="http://tech.slashdot.org/story/09/11/05/1552204/Facebook-and-MySpace-Backdoors-Found-Fixed" rel="nofollow">Slashdot</a></li>
</ul>]]></content:encoded>
      <dc:subject>Images,</dc:subject>
      <dc:date>2009-11-04T16:23:23+00:00</dc:date>
    </item>

    <item>
      <title>In the near future everybody develops</title>
      <link>http://www.yvoschaap.com/weblog/in_the_near_future_everybody_develops</link>
      <content:encoded><![CDATA[<p>This week I  got my Android G1 phone in the mail. I already have the iPhone 3G and a Nokia  so it was not because I needed another phone; I got it because I had an urge to  develop a custom application for the Android! This urge was sparked from  looking at the wide variety of applications available for the Android and more  importantly; Android promised a nice developer <a href="http://code.google.com/android/documentation.html">framework</a> in JAVA  where an app can take advantage of the multimedia build into a phone like wifi,&nbsp; GPS, camera and more uniquely to the G1 a compass (bringing in semi-<a href="http://en.wikipedia.org/wiki/Augmented_reality">augmented reality</a>).</p>
<p>Things are  changing: where only a few years ago websites – another form of an application  a.k.a. <em>app</em> - were build by nerdy people in nightly hours, the current generation of nerds are at the core of  building billion dollar businesses like Google and Microsoft. Nerds rose from unsocial creatures to Hollywood movie heroes (e.g. Harry Potter, Peter Parker). Today you’re cool if you know how  to CSS hack your MySpace page. Nearly everybody has a online social network account. It has also become almost normal to talk about internet stuff on social occasions, something  you shouldn’t have attempted only 5 years ago.</p>
<p>In my opinion these are signs of a trend that will continue due to a need to gain full control over computers – in specific by programming them – becomes mainstream. With computer  devices from laptops to phones everywhere it make sense that an evolution will  go from using available applications to creating your own applications adjusted  to your specific demands. The basis of this is local and niche problems can bring local and niche solutions. For example I want to instantly share my French  homework with my classmates by making picture of it with my camera phone, transform the image-to-text, spell check it online with an <a href="http://babelfish.yahoo.com/">API</a>, push it automatically over Bluetooth to my classmates and have them pay 10cents for the homework copy; a strange app that  won’t be made by anyone any time soon, but why wouldn’t they create that app themselves?&nbsp; The boundaries that have prevented this from happening are disappearing fast:</p>
<ol>
&nbsp; <li><strong>Knowledge</strong>: developing applications has been a very specific quality. But with computer devices all around us the  ability to create a custom application for these devices makes programming a  more common need. Schools started educating on computer usage and have already included basic programming courses (pun intended). And to be honest programming is no rocket science;&nbsp; it’s actually very logical but just like being <em>good in math or not</em> some people might be better in other stuff.</li>
&nbsp; <li><strong>Costs</strong>: with developing came high costs due to the  highly trained personal. But quality guides on programming languages are freely  available online and the numbers of books on any programming language are in  the <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2Fs%3Fie%3DUTF8%26x%3D0%26ref%255F%3Dnb%255Fss%255Fgw%26y%3D0%26field-keywords%3Dprogramming%26url%3Dsearch-alias%253Daps&amp;tag=songlyrics0b-20&amp;linkCode=ur2&amp;camp=1789&amp;creativ">thousands</a>.&nbsp; Next to that; where previously websites were made in notepad, <a href="http://www.adobe.com/nl/products/dreamweaver/">WYSISYG</a> website editors  and SDK’s like <a href="http://www.eclipse.org/">Eclipse</a> (free!) provide  some very strong frameworks to work with and help novice developers to create  whatever they have in mind.</li>
&nbsp; <li><strong>Publish &amp; Spread</strong>: it is possible for anybody to develop a website and have it available online within seconds. There are no boundaries that prevend you from publishing an webapp online. The <a href="http://www.apple.com/iphone/appstore/">Apple app store</a> (15.000  apps) and Google <a href="http://www.android.com/market/">Android</a> market (~1000  apps) provide a platform to publish and spread your app to the world. These  apps are not made by <a href="http://gizmodo.com/5091606/adobe-says-flash-coming-to-the-g1-soon">big</a> companies, but mostly by people who had an idea (bad or <a href="http://www.mobilizy.com/">good</a>), developed it, and released it for others  to use.</li>
&nbsp; <li><strong>Money:</strong>&nbsp; previously it was hard to monetize your own developed app due to the lack of a (popular)&nbsp; platform that handled (micro) payments. For the web <a href="https://www.google.com/adsense/">Adsense</a> solved this for website  developers by providing advertising on any webpage. The last year or so mobile  app stores opened the possibilities to monetize on mobile application development.&nbsp; A thousand downloads of your 1$ application is a nice $1000 dollar, or if you  want more you could&#8217;ve entered this competition that gave away over 10 million  (25k to 225k each). </li>
</ol>
<p>One major hurdle - in specific for mobile development - are the numerous development  environments: JAVA, C++, Objective-C, .NET, J2ME. Don’t think you can make an iPhone app without having a  Macintosh, and also don’t think a Nokia 6500 can have the same app code as a Nokia N95. The only solution right now is to create your app for every language there is since everybody still has different phones: if you pick ten random people you get ten different phones types with 6 different development environments.</p>
<p>There is so  much more to say about development, but for this post I can summarize it to  this: In the near future programming knowledge is widely educated, most current boundaries are resolved and only creativity with some excess time will limit people to make great custom apps for the world to use.</p>]]></content:encoded>
      <dc:subject></dc:subject>
      <dc:date>2009-02-11T16:38:50+00:00</dc:date>
    </item>

    <item>
      <title>Website development</title>
      <link>http://www.yvoschaap.com/weblog/website_development</link>
      <content:encoded><![CDATA[<p><a href="http://www.yvoschaap.com/images/uploads/website-dev.png"><img src="http://www.yvoschaap.com/images/uploads/website-dev.png" border="0" alt="website knowledge map"  width="670"  /></a></p>

]]></content:encoded>
      <dc:subject></dc:subject>
      <dc:date>2009-01-21T16:18:17+00:00</dc:date>
    </item>

    <item>
      <title>8 PHP and MYSQL exploit security tips for lazy programmers</title>
      <link>http://www.yvoschaap.com/weblog/8_php_and_mysql_exploit_security_tips_for_lazy_programmers</link>
      <content:encoded><![CDATA[<p>I've gathered my personal best practices to secure my home-coded websites against  security exploits via <a href="http://ha.ckers.org/xss.html">XSS</a>, SQL injection, and <a href="http://ha.ckers.org/xss.html">CRSF</a>. I am not a security expert at all, and I'll probably never be because I am to lazy to sanitize every single variable coming in and out my websites. Even companies with millions to spend like <a href="http://xssed.com/news/80/New_highly_critical_Facebook_XSS_vulnerabilities_pose_serious_privacy_risks/">Facebook</a>, MySpace, <a href="http://xssed.com/news/79/Google_accounts_SSL_login_page_suffers_from_highly_critical_XSS/">Google</a> and other big names have/had exploits that exposed them against malware distribution, abuse of user accounts, data loss and other security issues. Even if you might not have sensitive information on your website, an exploit could target getting ownership of your domain or server: think of a fake cpanel login on your site by sending the webmaster to a exploited url. A good example to read and learn from is <a href="http://namb.la/popular/tech.html">this story</a> that describes how someone exploited myspace by easily circumventing basic security patches. While it's hard to close every security gap &#8211; some <a href="http://skeptikal.org/index.php?entry=entry081006-152832">hackers</a> go a long way &#8211; the tips below are an understandable introduction to programming security and the code examples will steer you in the right direction to fix them.</p>

<h2>PHP: Clean up all the user input</h2>
<p>One of the most common exploits are the result of unintended user input. User input by URL, forms and cookies has to get cleaned up from any  exploitable input before doing anything with it. Most importantly you want html characters (like &lt;,&gt;) to be encoded to their harmless html representative and ', &quot; escaped by a slash to exclude external code to be forced into your site. This script code below runs through the array $_GET, $_POST and $_COOKIE, and cleans up the values passed from the user. Please force integers on user input e.g. ID's by stripping out any other character. I'ts best to always also have <a href="#modsecurity">Mod security</a> installed.</p>
<textarea cols="60" rows="10" name="code" class="php">
function cleanArray($array){
	if(is_array($array)){
		foreach($array as $key=&gt;$value){

			$value = eregi_replace(&quot;script&quot;,&quot;scrip t&quot;,$value); //no easy javascript injection
			$value = eregi_replace(&quot;union&quot;,&quot;uni on&quot;,$value); //no easy common mysql temper

			$value = htmlentities($value, ENT_QUOTES); //encodes the string nicely
			$value = addslashes($value); //mysql_real_escape_string() //htmlentities

			if($key == &quot;UserID&quot; || $key == &quot;PageID&quot;){ //List variables that MUST be integers. Look at your mysql scheme and find every int(*) field.
				$value = filter_var($value, FILTER_SANITIZE_NUMBER_INT); //Forces an integer
			}elseif($key == &quot;CountryCode&quot; || $key == &quot;StateCode&quot;){
				$value = substr(trim($value),0,2); //Forces a max two character string
			}elseif($key == &quot;arrivalDate&quot; || $key == &quot;departureDate&quot;){
				$value = substr(trim($value),0,10); //Forces a max 10 character string. Could be also be tested by regular expression for a date value.
			}else{
				$value = substr($value,0,100);
				$value = trim(filter_var($value, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW)); //All weird chars will be stripped. I usually also limit the characters to (alpha)nummeric, spaces, and punctuation.
			}

			$array[$key] = $value;
	}else{
		return false;
	}

	return $array;
}
cleanArray($_GET);
cleanArray($_POST);
</textarea>
<p>These filters (<a href="http://nl2.php.net/manual/en/function.filter-var.php">filter_var</a>) only work in PHP5, but with a good regular expression it can be also run in other versions. It's also good to truncate a string to a maximum number of characters or else you could exposed to  <a href="http://www.suspekt.org/2008/08/18/mysql-and-sql-column-truncation-vulnerabilities/">this</a>. In this script the string allowed is limited to 100 characters this could break alot of systems (like long user comments) so be carefull with that.</p>
<h2>PHP: Working with forms</h2>
<p>Never put any settings in hidden form fields, and expect them to not be exploited. Easily exploitable is the example below where a form value  identifies the user by  UserID.</p>
<textarea cols="60" rows="1" name="code" class="html">&lt;input type=&quot;hidden&quot; name=&quot;UserID&quot; value=&quot;25&quot;&gt;</textarea>
<p> These hidden form fields can be set to any value. Look at this <a href="http://holisticinfosec.org/video/online_finance/usbank.html">example</a>  on a major bank website. Another tip is to add a  token to a form field that is based on the clients encrypted IP, session and/or cookie so the form is harder to temper with by CRSF exploits. More on tokens and why it's needed in my upcoming post.</p>
<p> Also dropdowns can best be setup like the example below to restrict unexpected values from the user in $dropdown.</p>
<textarea cols="60" rows="4" name="code" class="html">
&lt;select name=&quot;dropdown&quot;&gt; 
  &lt;option value=&quot;1&quot;&gt;Mercedes Benz&lt;/option&gt; 
  &lt;option value=&quot;2&quot;&gt;BMW&lt;/option&gt;
&lt;/select&gt;
</textarea>
<textarea cols="60" rows="10" name="code" class="php">
switch ($dropdown){
  case 1:
  $dropdown = &quot;Mercedes Benz&quot;;
  break;
case '2':
  $dropdown = &quot;BMW&quot;;
  break;
default:
  $dropdown = &quot;Unknown Car&quot;;
endswitch;
</textarea>
<h2>PHP: uploading files</h2>
<p>Never let people upload stuff to your server, unless you know what you are doing. Best way is to store the uploaded file in a folder unavailable via a url (e.g. next to your public_html folder) and have a file act as a proxy that grabs the uploaded file and forces a innocent extension like .jpg (only when it's an jpeg of course). </p>
<textarea cols="60" rows="2" name="code" class="php">
header(&quot;Content-type:image/jpeg&quot;);
echo file_get_contents(&quot;/uploads/id/randomfilename.jpg&quot;);
</textarea>
If you still want to host the uploaded file on your server available through a direct url make sure it doesn't make flash <a href="http://www.hardened-php.net/library/poking_new_holes_with_flash_crossdomain_policy_files.html">cross-domain</a> available or other content like text, html, or executable files that could compromise the whole server. Always wonder if you are ready to host anything that isn't yours?<br>
<h2>Javascript: don't echo/print user input in javascript</h2>
<p>A very common exploit like XSS is usably the fault of javascript code beeing run on the domain. Javascript can steal and forward user cookies, or make any (unintended) user actions like &quot;delete account&quot;. For example this javascript php combination:</p>
<textarea cols="60" rows="5" name="code" class="js">
&lt;script&gt;
&lt;!--
document.getElementByID('welcome').innerHTML = '&lt;? echo $_GET['username'] ?&gt;';
--&gt;
&lt;/script&gt;
</textarea>
<p name="code" class="js">Could easily be exploited by creating a url /?username=name'+alert(1);+foo+=+'bar. The cleanArray() function above helps some against these problems since it adds slashes, truncates the string and encodes characters.<br>
</p>
<h2>User management: don't store anything critical in a cookie</h2>
<p>It seems tempting to store certain values in a cookie, saving time to retrieve settings from a database for example. For example to give a user administration rights:</p>
<textarea cols="60" rows="1" name="code" class="php">
setcookie("admin", 1);
</textarea>
<p>Also saving $passwords, $usernames and $userID's (especially incremental $userID's. UserID = 1 having admin capabilities?) in a cookie is a bad idea, cookies are as easy to tamper with as changing a variable in a URL. Best way is to crypt or md5 settings to identify a user:</p>
<textarea cols="60" rows="2" name="code" class="php">
setcookie("usercredentials", md5($encryptkey.&quot;|&quot;.$_SERVER['REMOTE_ADDR'])); //
setcookie(&quot;useridentifier&quot;, $useridentifier); //user identifier is an unguessable string instead of a incremental ID or username that also matches with the user account
</textarea>
<p>When a user has a cookie, and you want to check it's credentials. From the cookie $useridentifier you generate the md5 by combining your encrypt key and user IP and match that with the users cookie set.</p>
<p>Another best practice is to set the cookie to <a href="http://nl3.php.net/setcookie">HTTPOnly</a>, to exclude javascript (AJAX) to read the cookie contents.</p>
<h2>PHP: Header forwards</h2>
<p>An not widely known behavior on a well known practice: A header forward, without a exit() or die() could continue to load the page if the browser (or an exploiter) continues to load the page.</p>
<textarea cols="60" rows="4" name="code" class="php">if($noaccess){
	header('Location: noaccess.php');
	exit();
}

echo &quot;Welcome in the admin section&quot;;</textarea>
<h2>Mysql: limit your updates and deletes</h2>
<p>When performing sql queries that contain dynamic variables always limit your query to 1 (of course unless you need to update or delete a bunch).</p>
<textarea cols="60" rows="1" name="code" class="js">UPDATE userdata SET password = '".$password."' where username = admin limit 1
</textarea>
<h2>Apache: Mod Security</h2>
<a name="modsecurity"></a>
<p>Install <a href="http://www.modsecurity.org/">mod security</a>. It has a nice black list of rules that block certain (common) exploit attempts from the external environment e.g. blocking exploits in the user agent string, bogus image uploads, injecting XSS, SQL injecting, commands, and url request string. In your .htaccess you set the mod_security to on on most apache installs:</p>
<textarea cols="60" rows="6" name="code" class="php">
&lt;IfModule mod_security.c&gt;
  SecFilterEngine On
  SecFilterScanPOST On
  SecFilter &quot;delete[[:space:]]+from&quot;
  SecFilter &quot;insert[[:space:]]+into&quot;
  SecFilter &quot;select.+from
&lt;/IfModule&gt;
</textarea>
<p>And last be very careful when installing external scripts like <a href="http://wordpress.org/">Wordpress</a>, <a href="http://gallery.menalto.com/">Gallery</a> or even <a href="http://www.cpanel.net/">Cpanel</a> (webbased server control panel) on your server. These scripts could have a security hole that can be exploited throughout your domain and even on the whole server. Always update to the latest version, and don't install in the standard directory so crawl bots won't find it easily.</p>]]></content:encoded>
      <dc:subject></dc:subject>
      <dc:date>2008-12-17T14:59:28+00:00</dc:date>
    </item>

    <item>
      <title>From SEO to owning 404</title>
      <link>http://www.yvoschaap.com/weblog/from_seo_to_owning_404</link>
      <content:encoded><![CDATA[<p>Search  Engine Optimization (SEO) has always been my prime pillar to build traffic to my websites. If search engines love your site, you’ll bump  competitors in the search results aside, and traffic that flows from the search  engines to your website will increase almost exponential with every jump to the  top. Finally at the top for your relevant search keywords, after weeks, months  or even years you relax… but I’ve learned that at that time, the fight just begun.  Being at the top isn’t the endpoint: </p>
<ul>
  <li>Competition  in the search engine listing is huge and always on your tail. With a very good reason:  real money is being earned from the traffic. Thousands of dollars a day could  be the difference between being #1 or #2. If you find a great way to out rank  your competitor, you can count on them imitating your strategy. And not much  stands in their way, because it’s hard to hide your SEO strategy with tools  like Yahoo! <a href="https://siteexplorer.search.yahoo.com/">SiteExplorer</a> or <a href="http://technorati.com/">Technorati</a> that reveal your (in-)linking  strategy. Or notepad that shows your complete page markup (HTML)  <img src="http://www.yvoschaap.com/images/smileys/wink.gif" width="19" height="19" alt="wink" style="border:0;" /> . While page markup  and content are important, my experience shows inlinks are the main ingredient  to success (note: that’s not a <a href="http://www.google.com/support/webmasters/bin/answer.py?answer=35769">secret</a>).  All these success factors can be revealed and adopted by the competition.</li>
  <li>Search  engines are always tweaking their ranking algorithms. Your strategy that got  you to the top, could as easily bring you back to the bottom again. If you are #1  yesterday, and #1 today, doesn’t mean you will be #1 tomorrow. I’ve learned  that the hard way by now…</li>
</ul>
<p>You end up  with a constant craze of tweaking your markup, adding content, revising changes  based on a possible relation between your edit and rankings, expand your site  with functions, restyle to minimalism, focusing on high traffic keywords, focusing  on niche keywords, link exchanges, no-<a href="http://www.google.com/support/webmasters/bin/answer.py?answer=96569&amp;query=nofollow&amp;topic=&amp;type=">following</a>,  etc. Whatever your personal fad is.<br />
  But in the  end, the search engines are a blackbox, and you can only hope that you’re lucky  enough to come out on top.<br />
  My thoughts  went out to search for another way to make money with online traffic without search  engines as middlemen who determine my online and offline faith. I don’t  want to invest in (ad-) campaigns, or do low margin <a href="http://search.yahoo.com/search?ei=UTF-8&amp;p=arbitrage">arbitrage</a> on  buying and selling traffic, nor do I want to game the system since that wouldn’t  be a long term strategy either. I need a strategy that is low maintenance,  fully automated, little competition, providing quality ad views/leads and  viable as a respectable long term business. It maybe sounds lazy, but that’s  not my intention, these qualities will make a scalable business with low  operating costs. <br />
  And there the  answer is: 404. File not found. Dead links. Expired domains. Misspellings.  Typos. Dead ends. All traffic that goes to waste and ends on a blank page.  I might be able to come up with a variation of what businesses are already doing with dead-end traffic:</p>
<ul>
  <li>Millions  of people mistype domains. Even a small percentage of 0.01%, could lead to  billions of pageviews on the wrong place. Instead of focusing on the first part  of a domain name (e.g. googgle.com) by buying all these misspellings (typo squatting  is a well known ‘business’ practice) for a few dollars each, <a href="http://money.cnn.com/magazines/business2/business2_archive/2007/06/01/100050989/index.htm">this</a> company made a deal with the country of Cameroon – owner of  the .cm extension – to handle all typos in the last three characters of the domain name: (“domain.cm”). This deal leads any domain + .cm to their ad page. </li>
  <li>Instead  of getting the standard <em>not found page</em>,  or <em>could not connect</em> from your  browser, internet provider Verisign hijacks the user and redirects them to a  related ad page instead. A nice traffic flow leading to a good revenue bonus  for an internet provider. But they are not unique: browser toolbars are also in  the game with a ‘service’ of fetching a dead link, and redirecting a search  results/ad page to the browser. Google, Adobe, Yahoo, Microsoft are all forwarding  dead end traffic to their businesses. Google’s new browser <em>chrome</em> has it started turned on.</li>
</ul>
<p>So my brain  brainstormed on my next possible project that didn’t need Google, or any other  search engine: <strong>Own 404</strong>!  Spider the internet in a smart way, get loads  of data from browsers and webpages. See how internet traffic moves from click  to click, and focusing on dead ends: a page that isn’t there anymore. When logged,  get control of the page (yes, legally), push to a relevant ad page. When no  owner of the dead end (domain) exists get the domain. Instead of the dead end  404 page, people get my ads! <br />
  With the internet getting older and bigger by the day, more dead ends pop up,  and I’ll be happy to take them over. No more high traffic website with content,  but a high traffic end-point with ads:<br />
  5 visitors per page/day, control 200,000 previously dead-end pages, gives 1 million  page views/day, CPM  3 dollar, $3000/day  * 365 = 1,095,000 a year.<br />
  While the  project might be viable… my current and upcoming projects are still bound by the search engines and their judgments and I’ll have to accept it... for now.</p>]]></content:encoded>
      <dc:subject></dc:subject>
      <dc:date>2008-12-01T16:49:08+00:00</dc:date>
    </item>

    
    </channel>
</rss>
