<?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>Aten Labs &#187; apache</title>
	<atom:link href="http://atenlabs.com/blog/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://atenlabs.com/blog</link>
	<description>San Diego&#039;s Premier IT Security Consultancy</description>
	<lastBuildDate>Wed, 29 Feb 2012 19:14:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>foursquare sending passwords in the clear</title>
		<link>http://atenlabs.com/blog/foursquare-sending-passwords-in-the-clear/</link>
		<comments>http://atenlabs.com/blog/foursquare-sending-passwords-in-the-clear/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 19:38:22 +0000</pubDate>
		<dc:creator>Dan Tentler</dc:creator>
				<category><![CDATA[insight]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[training]]></category>
		<category><![CDATA[4sq]]></category>
		<category><![CDATA[4square]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[auth]]></category>
		<category><![CDATA[basic]]></category>
		<category><![CDATA[foursquare]]></category>
		<category><![CDATA[g1]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[packet]]></category>
		<category><![CDATA[sniffing]]></category>
		<category><![CDATA[zipline]]></category>

		<guid isPermaLink="false">http://atenlabs.com/blog/?p=87</guid>
		<description><![CDATA[In this case, I&#8217;ll be arguing: The easier it gets to write code(scripting, really), the sloppier it gets and the more insecure it gets. We can see this because of the prevalence of sql injection, cross site scripting and error handling in the ever expanding catalog of new sites appearing on the internet. I cite [...]]]></description>
			<content:encoded><![CDATA[<p>In this case, I&#8217;ll be arguing:</p>
<blockquote><p><em>The easier it gets to write code(scripting, really), the sloppier it gets and the more insecure it gets.</em></p></blockquote>
<p>We can see this because of the prevalence of sql injection, cross site scripting and error handling in the ever expanding catalog of new sites appearing on the internet.</p>
<p>I cite this from personal experience. As of late people seem to care more and more for &#8216;how pretty it is&#8217; and less about what actually happens behind the scenes.  I&#8217;m reminded of the 90s when video games were stuck in 256 color 320&#215;240, with bleeps and bloops for sound &#8211; if you didn&#8217;t have a good story people wouldn&#8217;t buy your game. Now <a href="http://escapistmagazine.com/videos/view/zero-punctuation" target="_blank">things are different.</a> All people seem to care about are the graphics, and the story, music, and gameplay is all phoned-in.</p>
<p>These days I see new tools and applications online that in most cases make me shudder. A friend of mine, <a href="http://twitter.com/quine" target="_blank">@quine</a> noticed something &#8211; the android foursquare application communicates unencrypted, using apache&#8217;s &#8216;basic&#8217; authentication.</p>
<p><span id="more-87"></span>For those of you who aren&#8217;t sure what that means, here&#8217;s the breakdown:</p>
<p>The most basic form of authentication apache uses is called &#8216;basic auth&#8217;. All it does is take your credentials and encode them using base64 &#8211; the same encoding used for email attachments. Encoding is not encryption. You can decode this in seconds. There are even apps that will do it for you if they see a base64 encoded string.</p>
<p>@quine asked me to do a packetsniff on my phone, so I plugged my G1 into my notebook, fired up adb and got a shell on my phone. Tcpdump -s 65535 -A -l -nnnvvv  showed me this</p>
<blockquote>
<div id="_mcePaste">11:18:35.553924 IP (tos 0&#215;0, ttl 64, id 54010, offset 0, flags [DF], proto TCP (6), length 286) 25.97.11.256.39819 &gt; 174.129.33.12.80: P, cksum 0xc5e2 (correct), 1:247(246) ack 1 win 2920</div>
<div id="_mcePaste">E&#8230;??@.@.r..a.?.!&#8230;.PDH?.????P..h??..GET /v1/user?mayor=0&amp;badges=0&amp;geolat=31.123456&amp;geolong=-110.123456&amp;geohacc=5000.0 HTTP/1.1</div>
<div id="_mcePaste">User-Agent: com.joelapenna.foursquared 2010011401</div>
<div id="_mcePaste">Host: api.foursquare.com</div>
<div id="_mcePaste">Connection: Keep-Alive</div>
<div id="_mcePaste">Authorization: Basic T2hUaGlua1lvdXJlOkNsZXZlckRvbnRjaGEK</div>
</blockquote>
<p>UHHH.. that &#8216;Authorization: Basic&#8217; line there are my credentials. Right along there with my GPS coordinates! They&#8217;re sent with nearly every request. In the clear! Wow &#8211; I&#8217;m never using my phone on unencrypted wifi again.</p>
<p>To decode base64 one must merely copy/paste the encoded string into any one of a handful of different decoders. We used this command line on osx:</p>
<blockquote><p>echo &#8216;&lt;base64 string&gt;&#8217; | openssl enc -base64 -d</p></blockquote>
<p>There are applications that exist now, like dsniff, which will deobfuscate the credentials when they&#8217;re seen on the lan or over the air. This is pretty bad. There&#8217;s no other way to put it. Thanks to <a href="http://twitter.com/jennyjenjen" target="_blank">@jennyjenjen</a> for meeting up with me to test it on the iphone, which uses the same API, and is just as vulnerable.</p>
<p><strong>My suggestion: </strong>If you&#8217;re going to use foursquare on your mobile device, make sure you&#8217;re not using open coffeeshop wifi spots, and you&#8217;re using your carriers 3g/cdma/gsm/etc internet connection. This will protect you from the potential of people sniffing credentials on your lan. Or, have a look at <a href="http://atenlabs.com/zipline">zipline</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://atenlabs.com/blog/foursquare-sending-passwords-in-the-clear/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Log Auditing for fun and profit</title>
		<link>http://atenlabs.com/blog/log-auditing-for-fun-and-profit/</link>
		<comments>http://atenlabs.com/blog/log-auditing-for-fun-and-profit/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 01:35:08 +0000</pubDate>
		<dc:creator>Dan Tentler</dc:creator>
				<category><![CDATA[insight]]></category>
		<category><![CDATA[training]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[grepping]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[information]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[reporting]]></category>
		<category><![CDATA[reports]]></category>
		<category><![CDATA[visibility]]></category>

		<guid isPermaLink="false">http://atenlabs.com/blog/?p=14</guid>
		<description><![CDATA[Again I find myself in a postion where I am in need of full time work. I was able to sustain myself as a full time freelancer for 8 months (not too shabby!), but now it seems the market is drying up and while not for a lack of effort on my part to find [...]]]></description>
			<content:encoded><![CDATA[<p>Again I find myself in a postion where I am in need of full time work. I was able to sustain myself as a full time freelancer for 8 months (not too shabby!), but now it seems the market is drying up and while not for a lack of effort on my part to find sales people or to promote myself by basically bribing people with a 10% commission I&#8217;ve not been able to get enough business to sustain myself any longer. I&#8217;ll not go into any of the nasty business of clients who decided they didn&#8217;t feel like paying me, or clients that had me draw up proposals only to vanish into the ether &#8211; because this post is about fun stuff!</p>
<p>All that being said &#8211; I like to be clever. I like to use ingenuity to do basically what everyone else does but put a fancy little twist on it. Historically when someone is looking for a job, they will hit some job search sites like monster and dice and then send their resume to people &#8211; never knowing if it gets seen with human eyes, or ever gets any attention. Who knows? Does your resume even get read? If it does, how soon? Wouldnt it be nice to see the time correlation between when you sent your resume to someone and when they actually looked at it &#8211; or even if they looked at it at all?</p>
<p><span id="more-14"></span></p>
<p>I put my resumes in a public place &#8211; not publically linked, but I send the url to people directly &#8211; that way when someone goes to look at them I have records in my apache logs. For example, one quick grep command gives me these results: (notice I&#8217;m only grepping for December 8th and 9th)</p>
<p><strong>grep resumes atenlabs.com.access.log | egrep &#8217;08\/Dec|09\/Dec&#8217; | egrep -i &#8216;pdf|doc&#8217;</strong></p>
<blockquote>
<h6>75.212.202.71 &#8211; - [08/Dec/2008:15:32:51 -0800] &#8220;GET /resumes/dan-resume-2008.pdf HTTP/1.1&#8243; 200 112865 &#8220;http://www.atenlabs.com/resumes/&#8221; &#8220;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2; MS-RTC LM 8)&#8221;</h6>
<h6>75.212.202.71 &#8211; - [08/Dec/2008:15:33:42 -0800] &#8220;GET /resumes/dan-resume-2008b.pdf HTTP/1.1&#8243; 200 118460 &#8220;http://www.atenlabs.com/resumes/&#8221; &#8220;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2; MS-RTC LM 8)&#8221;</h6>
<h6>75.212.202.71 &#8211; - [08/Dec/2008:15:34:23 -0800] &#8220;GET /resumes/dan-resume-2008.pdf HTTP/1.1&#8243; 304 &#8211; &#8220;http://www.atenlabs.com/resumes/&#8221; &#8220;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2; MS-RTC LM 8)&#8221;</h6>
<h6>75.212.202.71 &#8211; - [08/Dec/2008:15:35:16 -0800] &#8220;GET /resumes/dan-resume-2008-msword.doc HTTP/1.1&#8243; 200 43008 &#8220;http://www.atenlabs.com/resumes/&#8221; &#8220;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2; MS-RTC LM 8)&#8221;</h6>
<h6>75.212.202.71 &#8211; - [08/Dec/2008:15:35:23 -0800] &#8220;HEAD /resumes/dan-resume-2008-msword.doc HTTP/1.1&#8243; 200 &#8211; &#8220;-&#8221; &#8220;Microsoft Office Existence Discovery&#8221;</h6>
<h6>75.212.202.71 &#8211; - [08/Dec/2008:15:36:54 -0800] &#8220;GET /resumes/dan-resume-2008b.doc HTTP/1.1&#8243; 200 31232 &#8220;http://www.atenlabs.com/resumes/&#8221; &#8220;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2; MS-RTC LM 8)&#8221;</h6>
<h6>75.212.202.71 &#8211; - [08/Dec/2008:15:36:58 -0800] &#8220;HEAD /resumes/dan-resume-2008b.doc HTTP/1.1&#8243; 200 &#8211; &#8220;-&#8221; &#8220;Microsoft Office Existence Discovery&#8221;</h6>
<h6>64.128.15.194 &#8211; - [08/Dec/2008:18:50:52 -0800] &#8220;GET /resumes/dan-resume-2008-msword.doc HTTP/1.1&#8243; 200 43008 &#8220;http://www.atenlabs.com/resumes/&#8221; &#8220;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13&#8243;</h6>
<h6>64.128.15.194 &#8211; - [08/Dec/2008:19:15:04 -0800] &#8220;GET /resumes/dan-resume-2008.pdf HTTP/1.1&#8243; 200 112865 &#8220;http://www.atenlabs.com/resumes/&#8221; &#8220;Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; InfoPath.1; .NET CLR 3.0.04506.648)&#8221;</h6>
<h6>70.179.4.41 &#8211; - [08/Dec/2008:23:24:37 -0800] &#8220;GET /resumes/dan-resume-2008.pdf HTTP/1.1&#8243; 200 112865 &#8220;http://www.atenlabs.com/resumes/&#8221; &#8220;Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)&#8221;</h6>
<h6>70.179.4.41 &#8211; - [09/Dec/2008:00:15:28 -0800] &#8220;GET /resumes/dan-resume-2008.pdf HTTP/1.1&#8243; 200 112865 &#8220;http://www.atenlabs.com/resumes/&#8221; &#8220;Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322)&#8221;</h6>
<h6>67.202.54.191 &#8211; - [09/Dec/2008:04:42:00 -0800] &#8220;GET /resumes/dan-resume-2008-business.pdf HTTP/1.0&#8243; 200 2330 &#8220;-&#8221; &#8220;ia_archiver (+http://www.alexa.com/site/help/webmasters; crawler@alexa.com)&#8221;</h6>
<h6>67.202.54.191 &#8211; - [09/Dec/2008:04:42:24 -0800] &#8220;GET /resumes/dan-resume-2008.pdf HTTP/1.0&#8243; 200 112865 &#8220;-&#8221; &#8220;ia_archiver (+http://www.alexa.com/site/help/webmasters; crawler@alexa.com)</h6>
</blockquote>
<p>Interesting &#8211; I can see the dates and times of when people clicked on things in the /resumes directory. I can see that my resumes are getting crawled &#8211; which may or may not be a good thing &#8211; and I can see that the same users are viewing both my business resume and my technical resume.</p>
<p>Lets take this a step further..</p>
<p><strong>grep resumes atenlabs.com.access.log | egrep &#8217;08\/Dec|09\/Dec&#8217; | cut -d&#8221; &#8221; -f1 | sort -u</strong></p>
<blockquote>
<h6>204.14.152.106<br />
64.128.15.194<br />
67.202.54.191<br />
70.179.4.41<br />
75.212.202.71<br />
97.113.157.234</h6>
</blockquote>
<p>Awesome, I can see unique IPs that viewed my resume in the last two days &#8211; but .. who are they? We can find this out too:</p>
<p><strong>for i in `grep resumes atenlabs.com.access.log | egrep &#8217;08\/Dec|09\/Dec&#8217; | cut -d&#8221; &#8221; -f1 | sort -u`; do host $i; done</strong></p>
<blockquote>
<h6>Host 106.152.14.204.in-addr.arpa. not found: 3(NXDOMAIN)<br />
194.15.128.64.in-addr.arpa domain name pointer corp1.referentia.com.<br />
191.54.202.67.in-addr.arpa domain name pointer ec2-67-202-54-191.compute-1.amazonaws.com.<br />
41.4.179.70.in-addr.arpa domain name pointer ip70-179-4-41.sd.sd.cox.net.<br />
71.202.212.75.in-addr.arpa domain name pointer 71.sub-75-212-202.myvzw.com.<br />
234.157.113.97.in-addr.arpa domain name pointer 97-113-157-234.tukw.qwest.net.</h6>
</blockquote>
<p>Even better! I can see that Referentia, a company that had a very attractive posting has viewed my resume. Good! I sent them my resume TODAY (the 9th) and they viewed it today &#8211; perhaps this is a clue that my cover page is doing its job nicely! I can also see that some &#8216;home&#8217; ip addresses have clicked on my resumes, qwest.net, which I don&#8217;t think exists in San Diego, and a myvzw address which is a verizon wireless connection (someone on a laptop, perhaps? Or tethered to a phone..). The ec2 amazon connection sort of worries me &#8211; why is an amazon ec2 instance touching my resume? Let&#8217;s find out some more info..</p>
<p><strong>grep 67.202.54.191 atenlabs.com.access.log</strong></p>
<blockquote>
<h6>67.202.54.191 &#8211; - [08/Dec/2008:04:18:24 -0800] &#8220;GET /robots.txt HTTP/1.0&#8243; 200 36 &#8220;-&#8221; &#8220;ia_archiver (+http://www.alexa.com/site/help/webmasters; crawler@alexa.com)&#8221;<br />
67.202.54.191 &#8211; - [08/Dec/2008:04:18:24 -0800] &#8220;GET /resumes/ HTTP/1.0&#8243; 200 1281 &#8220;-&#8221; &#8220;ia_archiver (+http://www.alexa.com/site/help/webmasters; crawler@alexa.com)&#8221;<br />
67.202.54.191 &#8211; - [08/Dec/2008:20:56:13 -0800] &#8220;GET /robots.txt HTTP/1.0&#8243; 200 36 &#8220;-&#8221; &#8220;ia_archiver (+http://www.alexa.com/site/help/webmasters; crawler@alexa.com)&#8221;<br />
67.202.54.191 &#8211; - [08/Dec/2008:20:56:14 -0800] &#8220;GET /resumes/?C=D;O=A HTTP/1.0&#8243; 200 1691 &#8220;-&#8221; &#8220;ia_archiver (+http://www.alexa.com/site/help/webmasters; crawler@alexa.com)&#8221;<br />
67.202.54.191 &#8211; - [08/Dec/2008:20:56:20 -0800] &#8220;GET /resumes/?C=M;O=A HTTP/1.0&#8243; 200 1691 &#8220;-&#8221; &#8220;ia_archiver (+http://www.alexa.com/site/help/webmasters; crawler@alexa.com)&#8221;<br />
67.202.54.191 &#8211; - [08/Dec/2008:20:56:26 -0800] &#8220;GET /resumes/?C=N;O=D HTTP/1.0&#8243; 200 1691 &#8220;-&#8221; &#8220;ia_archiver (+http://www.alexa.com/site/help/webmasters; crawler@alexa.com)&#8221;<br />
67.202.54.191 &#8211; - [08/Dec/2008:20:57:14 -0800] &#8220;GET /resumes/?C=S;O=A HTTP/1.0&#8243; 200 1691 &#8220;-&#8221; &#8220;ia_archiver (+http://www.alexa.com/site/help/webmasters; crawler@alexa.com)&#8221;<br />
67.202.54.191 &#8211; - [09/Dec/2008:04:42:00 -0800] &#8220;GET /resumes/dan-resume-2008-business.pdf HTTP/1.0&#8243; 200 2330 &#8220;-&#8221; &#8220;ia_archiver (+http://www.alexa.com/site/help/webmasters; crawler@alexa.com)&#8221;<br />
67.202.54.191 &#8211; - [09/Dec/2008:04:42:24 -0800] &#8220;GET /resumes/dan-resume-2008.pdf HTTP/1.0&#8243; 200 112865 &#8220;-&#8221; &#8220;ia_archiver (+http://www.alexa.com/site/help/webmasters; crawler@alexa.com)&#8221;</h6>
</blockquote>
<p>Well thats worrysome &#8211; I have personal information in those resumes and I don&#8217;t want them to be spidered and put into some search engine, so I&#8217;ve gone ahead and added &#8216;ia_archiver&#8217; to my robots.txt to disallow alexa from touching my resumes. This means that someone who I&#8217;ve given my link to has put it into some system. I&#8217;ll have to refine my practices more.</p>
<p>Using this methodology you can do things like create reports to see how many of the people you&#8217;ve sent your link out to have actually viewed your resume, how many people ignore it and other bits of information that you otherwise would never be able to see.</p>
<p>I plan on writing a little script that will report back how many unique ips have viewed my resume in &#8220;the last 5 minutes&#8221;, and how many total views there were total in the last five minute, then use that script to create a cacti graph &#8211; My current quandry is how to grep a log for &#8220;the last five minutes worth of hits&#8221;. Rest assured when I get my head wrapped around it, that graph will be added to <a href="http://home.thaumatocracy.com/work" target="_blank">http://home.thaumatocracy.com/work</a></p>
]]></content:encoded>
			<wfw:commentRss>http://atenlabs.com/blog/log-auditing-for-fun-and-profit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

