<?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>Adam Gotterer &#187; Hacking</title>
	<atom:link href="http://www.adamgotterer.com/category/hacking/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.adamgotterer.com</link>
	<description>Find the secrets to infinite income, and automate it!</description>
	<lastBuildDate>Wed, 21 Jul 2010 02:44:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Facebook Invite Bookmarklet</title>
		<link>http://www.adamgotterer.com/2009/02/04/facebook-invite-bookmarklet/</link>
		<comments>http://www.adamgotterer.com/2009/02/04/facebook-invite-bookmarklet/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 04:05:30 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.adamgotterer.com/2009/02/04/facebook-invite-bookmarklet/</guid>
		<description><![CDATA[One of the best Facebook features is the ability to invite friends to events. The most annoying part about this system is the inability to invite more then 100 friends at a time (Facebook: wheres the invite all!?). In the past I have clicked one by one and sent invites in blocks of 100. Today [...]]]></description>
			<content:encoded><![CDATA[<p>One of the best Facebook features is the ability to invite friends to events. The most annoying part about this system is the inability to invite more then 100 friends at a time (Facebook: wheres the invite all!?). In the past I have clicked one by one and sent invites in blocks of 100. Today was the day that I had enough! I made a bookmarklet to automate the bulk of the process. Unfortunately it can’t do all the work for you, but it will automatically adds users to the invite in blocks of 100 with a single click. Heres how it works&#8230;</p>
<p>Step 1) Log in to Facebook and browse to the event &#8220;Invite people to come&#8221; page.</p>
<p>2) Setup a new bookmarklet with this code (or optionally paste in the address bar on that page):</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">javascript<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">var</span> e<span style="color: #339933;">=</span>document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'script'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>e.<span style="color: #660066;">setAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'type'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'text/javascript'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>e.<span style="color: #660066;">setAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'src'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/prototype.js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>setTimeout<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><span style="color: #003366; font-weight: bold;">var</span> friends <span style="color: #339933;">=</span> $$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#friends_list span input'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #003366; font-weight: bold;">var</span> offset <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">&#40;</span><span style="color: #000066;">prompt</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Please enter an offset'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>offset <span style="color: #339933;">&gt;</span> friends.<span style="color: #660066;">length</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'All done!'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> x <span style="color: #339933;">=</span> offset<span style="color: #339933;">;</span> x <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;=</span> offset <span style="color: #339933;">+</span> <span style="color: #CC0000;">100</span><span style="color: #339933;">;</span> x<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>friends<span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">onclick</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> 3000<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>void<span style="color: #009900;">&#40;</span>0<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>3) Click the bookmarklet and enter 0 when prompted. (0 represents your current offset, you will need to keep track of this.)</p>
<p>4) Click invite</p>
<p>5) Repeat and increase the offset by 100 until all friends have been sent invites</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamgotterer.com/2009/02/04/facebook-invite-bookmarklet/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Hacking the .SVN directory</title>
		<link>http://www.adamgotterer.com/2009/01/26/hacking-the-svn-directory/</link>
		<comments>http://www.adamgotterer.com/2009/01/26/hacking-the-svn-directory/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 02:38:35 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.adamgotterer.com/2009/01/26/hacking-the-svn-directory/</guid>
		<description><![CDATA[The other day on College Humor and Bustedtees we discovered a fairly serious security vulnerability. Fortunately because of the layout of our code nothing malicious could be exploited (more in another post). We thought our “push” script was skipping .svn folders, it turned out to not be operating correctly.
The hack is simple, documented and easily [...]]]></description>
			<content:encoded><![CDATA[<p>The other day on College Humor and Bustedtees we discovered a fairly serious security vulnerability. Fortunately because of the layout of our code nothing malicious could be exploited (more in another post). We thought our “push” script was skipping .svn folders, it turned out to not be operating correctly.</p>
<p>The hack is simple, documented and easily overlooked. Once the vulnerability was found, I did my best to exploit the shit out of it. I did so very successfully. I even tried it on some other popular websites and was able to access files I should have never been able to. In one instance I gained limited access to a sites admin. I emailed all of these sites to notify them of the security vulnerability. They were most gracious, once company even sent me a gift card!</p>
<p>The hack obviously starts in .svn directory, specifically at the entries file. You can access this file by browsing to:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">http://www.somedomain.com/.svn/entires?</div></div>
<p>This document contains all of the files and folders svn manages in that directory. In some instances you can locate admin directories and the same thing applies…</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">http://www.somedomain.com/admin/.svn/entries?</div></div>
<p>So at this point all you have are a bunch of file names. Sometimes you can get some fun information and access to files that were meant to be hidden. Security by obscurity is not a solution, protect files you don’t want the public to access!</p>
<p>Now this is where things get interesting… Any file that has been checked in I can now execute. Either directly or through an svn folder that holds file revisions. Pick any file in the list and browse to:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">http://www.somedomain.com/.svn/text-base/filename.php.svn-base</div></div>
<p>In this example the PHP file will be put through the PHP parser and executed. The results really depend on the layout of the code. Depending on the way the coder uses includes/requires decides on how much access and what kind of output you get. If a file is included using a relative path, the includes won’t be included since your working directory is the text-base dir. If they are using absolute paths, includes will continue through the execution. In one of the sites I poked around in, I found their admin wrapped through some kind of lite template/framework. I was able to bypass the system and go directly to the file without a using password. From there I had limited additional actions, but I still gained access to where I wasn’t welcome.</p>
<p>To do some additional testing I setup a test site to play with other file types. I found that files without a PHP extension, for example .inc files were NOT parsed and instead the contents were spit out to the page. In this test case the .inc file contained passwords and locations to databases. The possible additional damage I could cause from here is endless…</p>
<p>I’m not the first one to discover this hack, although a quick search only revealed obvious prevention methods. Protecting your site is really simple. Add this to your htacces file:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">RewriteRule (\.svn)/(.*?) - [F,L]</div></div>
<p>Another option is blocking .svn folders through your web server config file for all sites.</p>
<p><strong>Update</strong><br />
A number of people have mentioned a better prevention technique&#8230; They recommend doing an SVN export instead of a checkout or rsync. This was something I thought about after discovering the exploit. But I am by no means a system admin or the person who deals with that stuff at work. I&#8217;m glad these people were able to confirm that idea. Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamgotterer.com/2009/01/26/hacking-the-svn-directory/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
