<?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>dougv.com « Doug Vanderweide &#187; hacking</title>
	<atom:link href="http://www.dougv.com/tag/hacking/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dougv.com</link>
	<description>ASP.NET, PHP, XML, JavaScript, Web geekery, Entrepreneurship</description>
	<lastBuildDate>Thu, 17 May 2012 22:33:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>The Basics Of Avoiding MySQL Injection Attacks In ASP.NET Web Forms</title>
		<link>https://www.dougv.com/2012/05/08/the-basics-of-avoiding-sql-injection-attacks-in-asp-net-web-forms/</link>
		<comments>https://www.dougv.com/2012/05/08/the-basics-of-avoiding-sql-injection-attacks-in-asp-net-web-forms/#comments</comments>
		<pubDate>Tue, 08 May 2012 22:16:45 +0000</pubDate>
		<dc:creator>Doug Vanderweide</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Stored Procedures]]></category>
		<category><![CDATA[Web Forms]]></category>
		<category><![CDATA[coding standards]]></category>
		<category><![CDATA[data types]]></category>
		<category><![CDATA[elegance]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[regular expression]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">https://www.dougv.com/?p=4805</guid>
		<description><![CDATA[Received in my email today: Hi say your blog and thought you might help. strsql = &#8220;SELECT StaffID, DesignationID, StaffName, Password, ShopID from staffT where StaffName =&#8221; &#038; UserName.Text &#038; &#8221; AND Password =&#8221; &#038; Password.Text &#038; &#8220;&#8221; from the string, the username.text and password.text are form controls. what is happening is there are passing [...]<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2011/12/25/parent-child-dropdownlist-controls-in-asp-net-web-forms-vb-net/" rel="bookmark">Parent-Child DropDownList Controls In ASP.NET Web Forms (VB.NET)</a> (25.1)</li>
				<li><a href="https://www.dougv.com/2011/04/24/automatically-hash-tagging-text-with-asp-net-web-forms-vb-net/" rel="bookmark">Automatically Hash Tagging Text With ASP.NET Web Forms (VB.NET)</a> (24.2)</li>
				<li><a href="https://www.dougv.com/2012/03/15/displaying-selected-youtube-data-api-thumbnails-on-a-web-page-via-asp-net-web-forms/" rel="bookmark">Displaying Selected YouTube Data API Thumbnails On A Web Page Via ASP.NET Web Forms</a> (24.2)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.
	</div>
]]></description>
			<content:encoded><![CDATA[<p>Received in my email today:</p>
<blockquote><p>
Hi</p>
<p>say your blog and thought you might help. </p>
<p>strsql = &#8220;SELECT StaffID, DesignationID, StaffName, Password, ShopID from staffT where StaffName =&#8221; &#038; UserName.Text &#038; &#8221; AND Password =&#8221; &#038; Password.Text &#038; &#8220;&#8221;</p>
<p>from the string, the username.text and password.text are form controls. what is happening is there are passing null values regardless of what you input in the text boxes resulting in a system error.</p>
<p>&#8220;System Error Object reference not set to an instance of an object&#8221;</p>
<p>Am using Mysql as the database.
</p></blockquote>
<p>I&#8217;m always glad to answer such questions, especially when the questioner is flirting with disaster, as much as this questioner is.</p>
<p>A trained eye can immediately spot the problem with the SQL statement above, aside from the problem of NULL values tossing errors. Namely, it&#8217;s wide-open to SQL injection. (And an even keener eye will note that the values for user name and password aren&#8217;t delimited with single-quotes.)</p>
<p>So here&#8217;s my reply email to the questioner:<br />
<span id="more-4805"></span><br />
Your SQL statement has three problems.</p>
<ol>
<li>It is wide open to injection attack. See <a href="http://www.unixwiz.net/techtips/sql-injection.html" target="_blank">http://www.unixwiz.net/techtips/sql-injection.html</a> for examples.</li>
<li>As you noted, when nulls are passed in, the expression fails.</li>
<li>It appears you have not delimited your text inputs with single quotes.</li>
</ol>
<p>Assuming you are using ASP.NET, and that your user names and passwords are only alphanumeric, the direct fix to your problem is this:</p>
<pre class="brush: vb; title: ; notranslate">
Dim strUser As String
If String.IsNullOrEmpty(UserName.Text) Then
	strUser = String.Empty
Else
	strUser = UserName.Text.Replace(&quot;'&quot;, &quot;''&quot;)
End If

Dim strPass As String
If String.IsNullOrEmpty(Password.Text) Then
	strPass = String.Empty
Else
	strPass = Password.Text.Replace(&quot;'&quot;, &quot;''&quot;)
End If

strsql = &quot;SELECT StaffID, DesignationID, StaffName, Password, ShopID from staffT where StaffName = '&quot; &amp; strUser &amp; &quot;' AND Password = '&quot; &amp; strPass &amp; &quot;'&quot;
</pre>
<p>That should get you going, but you should employ the following best practices fixes:</p>
<ol>
<li>Use <a href="http://dev.mysql.com/doc/refman/5.0/en/stored-routines.html" target="_blank">stored procedures</a> with paramerterized input values. This serves to automatically sanitize your queries for data type.</li>
<li>Use <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.requiredfieldvalidator.aspx" target="_blank">RequiredFieldValidators</a> and <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.regularexpressionvalidator.aspx" target="_blank">RegularExpressionValidators</a> to ensure that you receive some sort of input for each field, and that each does not contain an effort to inject your code with SQL.</li>
<li>Impose some sort of control that limits multiple login attempts.</li>
<li>Better yet, use the built-in <a href="http://msdn.microsoft.com/en-us/library/yh26yfzy.aspx" target="_blank">membership provider in ASP.NET</a>, which can be <a href="http://dev.mysql.com/doc/refman/5.1/en/connector-net-tutorials-asp-roles.html" target="_blank">used with MySQL</a>, and has already resolved many potential attack vectors.</li>
</ol>
<p>Hope this helps.</p>
<h3>Additional Thoughts And Clarification</h3>
<p>The guidance I gave the emailer, instructing him to escape single quotes, is a bare-minimum escaping sequence. As a practical matter, he should sanitize his inputs against additional MySQL sequences, such as double-dashes and semicolons, as well as reserved SQL statement words, such as DROP, ALTER, DELETE, etc. There&#8217;s an <a href="http://forums.asp.net/t/1254125.aspx" target="_blank">HTTPModule example over at the ASP.NET forums</a> that does this automatically for an application.</p>
<p>Using parameterized queries / stored procedures to combat SQL injection is a primary recommendation from both <a href="http://msdn.microsoft.com/en-us/library/ff648339.aspx" target="_blank">Microsoft</a> and <a href="http://dev.mysql.com/tech-resources/articles/guide-to-php-security-ch3.pdf" target="_blank">MySQL</a> (pdf). </p>
<p>In addition to securing data type, query parameters limit the ability of an attacker to inject SQL by fixing the form of the query implicitly. In other words, it&#8217;s harder for him to mangle a parameter than it is to mangle a string.</p>
<p>All links in this post on delicious: <a href="http://delicious.com/dougvdotcom/the-basics-of-avoiding-sql-injection-attacks-in-asp-net-web-forms" target="_blank">http://delicious.com/dougvdotcom/the-basics-of-avoiding-sql-injection-attacks-in-asp-net-web-forms</a></p>
<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2011/12/25/parent-child-dropdownlist-controls-in-asp-net-web-forms-vb-net/" rel="bookmark">Parent-Child DropDownList Controls In ASP.NET Web Forms (VB.NET)</a> (25.1)</li>
				<li><a href="https://www.dougv.com/2011/04/24/automatically-hash-tagging-text-with-asp-net-web-forms-vb-net/" rel="bookmark">Automatically Hash Tagging Text With ASP.NET Web Forms (VB.NET)</a> (24.2)</li>
				<li><a href="https://www.dougv.com/2012/03/15/displaying-selected-youtube-data-api-thumbnails-on-a-web-page-via-asp-net-web-forms/" rel="bookmark">Displaying Selected YouTube Data API Thumbnails On A Web Page Via ASP.NET Web Forms</a> (24.2)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.</p>
	</div>

	Tags: <a href="https://www.dougv.com/tag/coding-standards/" title="coding standards" rel="tag">coding standards</a>, <a href="https://www.dougv.com/tag/data-types/" title="data types" rel="tag">data types</a>, <a href="https://www.dougv.com/tag/elegance/" title="elegance" rel="tag">elegance</a>, <a href="https://www.dougv.com/tag/hacking/" title="hacking" rel="tag">hacking</a>, <a href="https://www.dougv.com/tag/regular-expression/" title="regular expression" rel="tag">regular expression</a>, <a href="https://www.dougv.com/tag/windows-server/" title="Windows Server" rel="tag">Windows Server</a><br />
]]></content:encoded>
			<wfw:commentRss>https://www.dougv.com/2012/05/08/the-basics-of-avoiding-sql-injection-attacks-in-asp-net-web-forms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tumblr Mangles Developer Relations</title>
		<link>https://www.dougv.com/2012/01/01/tumblr-mangles-developer-relations/</link>
		<comments>https://www.dougv.com/2012/01/01/tumblr-mangles-developer-relations/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 19:15:53 +0000</pubDate>
		<dc:creator>Doug Vanderweide</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Customer Relations]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[coding standards]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[MySpace]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[reputation]]></category>
		<category><![CDATA[Tumblr]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://www.dougv.com/?p=4060</guid>
		<description><![CDATA[Tumblr warns users against using missing e. That message is chilling to Tumblr API developers.<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2011/02/17/the-lessons-we-should-all-relearn-from-hbgary/" rel="bookmark">The Lessons We Should All Relearn From HBGary</a> (5)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.
	</div>
]]></description>
			<content:encoded><![CDATA[<p>Last week I logged on to <a href="http://www.tumblr.com" target="_blank">Tumblr</a> and was confronted with this abomination:</p>
<div id="attachment_4061" class="wp-caption alignnone" style="width: 673px"><img class="size-full wp-image-4061 " title="missing e notice from tumblr" src="http://www.dougv.com/wp-content/uploads/2012/01/Untitled1.jpg" alt="missing e notice from tumblr" width="663" height="672" /><p class="wp-caption-text">Missing e notice from tumblr. Way to encourage API development, guys.</p></div>
<p>Needless to say, this is pretty disturbing, and I wonder what Tumblr is thinking by posting this.</p>
<h3><span id="more-4060"></span>Background</h3>
<p>Some background: <a href="http://www.tumblr.com/about" target="_blank">Tumblr is a blogging site</a>, with <a href="http://www.tumblr.com/why-tumblr" target="_blank">social media overtones</a>. Basically, you can easily follow other bloggers&#8217; posts through a dashboard / search posts via tags, and it&#8217;s quite easy to repost material you find on other blogs.</p>
<p>Like most other major providers, <a href="http://www.tumblr.com/docs/en/api/v2" target="_blank">Tumblr maintains an API</a>. Until last year, it was mostly restricted to retrieving and submitting posts; it was recently expanded to allow some manipulation of blog settings and managing followers.</p>
<p>I like Tumblr a lot. I&#8217;ll go on a couple of times a day, and like most other Tumblr blogs, <a href="http://dougv.info/" target="_blank">my blog</a> is mostly reposts; it&#8217;s where I&#8217;ll dump links / reposts of things I see on the Web that I want to share.</p>
<p><a href="http://missinge.infraware.ca/" target="_blank">Missing e</a> has been around for a while. It&#8217;s a browser add-on for Webkit-enabled browsers; as its name implies, it leverages the API with some neat features that aren&#8217;t directly available through Tumblr itself.</p>
<p>For example, Tumblr has a lot of image posts. Missing e includes a magnifier feature that lets one see a full-sized image right from his dashboard, rather than having to engage in the several clicks it takes to see a full-sized image. Missing e also lets me more easily reblog items (including the automatic addition of tags to reblogged posts), manage my post queue, and otherwise make Tumblr easier to use.</p>
<p>I should note that I don&#8217;t know the developer of this plugin personally, nor have I spoken to him about this notice. (I have <a href="http://blog.missinge.infraware.ca/post/15090130182/tumblrs-support-problem-with-missing-e-repeated" target="_blank">read his response</a> to this outrage, however, and I find it remarkably calm, fair and responsible.) I don&#8217;t know if Tumblr has contacted him about its concerns or tried working with him on those issues (reading the developer&#8217;s responses, it sure sounds like they haven&#8217;t).</p>
<p>I also haven&#8217;t contacted Tumblr about this. I&#8217;m not interested in hearing whatever nonsense they intend to proffer as justification. I know what I read and I know how I feel about it as an API developer.</p>
<p>To Tumblr&#8217;s credit, they haven&#8217;t cut off API access to the plugin, which was certainly <a title="The Danger Of API Development: Making Something Too Good" href="http://www.dougv.com/2011/03/22/the-danger-of-api-development-making-something-too-good/" target="_blank">an option others might have pursued</a>. It wouldn&#8217;t surprise me if a number of Tumblr users can&#8217;t tell where Tumblr ends and missing e begins, and thus they are swamped with support requests they can&#8217;t do much about. And it does make sense to me that missing e uses a lot of resources to accomplish its tasks.</p>
<h3>A Completely Wrong-Headed Approach</h3>
<p>That&#8217;s where my empathy for Tumblr&#8217;s plight ends.</p>
<p>First, <a href="http://royal.pingdom.com/2011/12/15/the-most-reliable-and-unreliable-blogging-services-of-2011/" target="_blank">Tumblr&#8217;s reliability</a>, both in terms of its primary service and its API uptime, <a href="http://stats.pingdom.com/wx4vra365911/23773/history" target="_blank">rivals Twitter</a> for embarrassingly inadequate. (At least Twitter has the common sense to not blame third-party developers for their failure to stay up.)</p>
<p>That&#8217;s on Tumblr alone. It&#8217;s up to them to keep their service running.</p>
<p>I especially find odious the insinuations contained in this notice. While missing e is, in the base definition, a &#8220;hack&#8221; of Tumblr, the tone of this message suggests that the plugin isn&#8217;t well-written and may be up to no good.</p>
<p>Well, <a href="https://github.com/jcutler/Missing-E" target="_blank">you can go to GitHub and look at the code yourself</a>. Yes, it sends data to intermediary servers. Yes, it is technically possible for missing e to steal a user&#8217;s Tumblr credentials, to track Tumblr users&#8217; activities, to obtain personally identifiable information, etc.</p>
<p>Let me be clear: <a href="http://blog.hiramiya.me/post/15081113653" target="_blank">I agree with another user</a> that missing e in no way compromises user information right now. However, it could do so, by virtue of being a browser add-on; to that extent, the notice Tumblr posted is accurate, as they don&#8217;t directly accuse missing e of privacy violations, but do note it is possible for browser plugins to capture information a user never anticipated having captured.</p>
<p>Absent proof that there is an intention behind missing e to do that specifically, and to use such information for nefarious purposes &#8212; evidence Tumblr clearly could provide, if it existed &#8212; I find the tone of this note beyond insulting; it&#8217;s chilling.</p>
<p>My interpretation of this notice is, &#8220;We don&#8217;t like missing e. We&#8217;d just as soon ban it. But that&#8217;s not very Web 2.0 and it&#8217;s likely to generate PR static. So we&#8217;ll scare you, push you toward getting rid of it, then continue to serve those who want to use it.&#8221;</p>
<p>That&#8217;s being a dick. That&#8217;s being lazy. That&#8217;s being stupid.</p>
<h3><img class="alignright size-medium wp-image-4066" title="tumblr_logo" src="http://www.dougv.com/wp-content/uploads/2012/01/tumblr_logo-350x91.png" alt="" width="350" height="91" />A Proper Response</h3>
<p>Were I in charge at Tumblr, we&#8217;d be going about this in an entirely different way.</p>
<ul>
<li>The first thing we would have done is offered the guy who wrote missing e a job.</li>
<li>If not that, we would have offered to buy missing e outright.</li>
<li>And if that didn&#8217;t pan out, we&#8217;d ask missing e users to rate its features, then build those into our platform.</li>
</ul>
<p>Because what does Tumblr&#8217;s approach to this issue say? It says, &#8220;We aren&#8217;t interested in the reasons why missing e is a problem for us. We don&#8217;t care about our end users and why so many of them are using this plugin. It&#8217;s not that our product is inferior, and someone has made it better; it&#8217;s that we have what we have, and even though it can clearly be better, we&#8217;re more interested in the status quo.&#8221;</p>
<p>Or, as I&#8217;ll coin it, <a href="http://www.fool.com/investing/general/2011/07/03/this-is-what-really-killed-myspace.aspx" target="_blank">The MySpace Response</a>: &#8220;Do what you like, so long it fits in our picture of our service.&#8221;</p>
<p>You saw how well that worked out for them.</p>
<p>I don&#8217;t suspect this blog post will cause any change whatsoever in Tumblr&#8217;s approach. I simply want to lament what is an absurd and insulting response to a relatively minor problem by a company that I expected knew better than that.</p>
<p>If Google brought you here because you&#8217;re worried about that notice, suffice it to say that I looked at the missing e code and, as of this writing, I see nothing there to be concerned about.</p>
<p>I do, however, see a lot to be concerned about in Tumblr&#8217;s handling of this matter.</p>
<p>All links in this post on delicious: <a href="http://delicious.com/dougvdotcom/tumblr-mangles-developer-relations" target="_blank">http://delicious.com/dougvdotcom/tumblr-mangles-developer-relations</a></p>
<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2011/02/17/the-lessons-we-should-all-relearn-from-hbgary/" rel="bookmark">The Lessons We Should All Relearn From HBGary</a> (5)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.</p>
	</div>

	Tags: <a href="https://www.dougv.com/tag/blogging/" title="blogging" rel="tag">blogging</a>, <a href="https://www.dougv.com/tag/coding-standards/" title="coding standards" rel="tag">coding standards</a>, <a href="https://www.dougv.com/tag/google/" title="Google" rel="tag">Google</a>, <a href="https://www.dougv.com/tag/hacking/" title="hacking" rel="tag">hacking</a>, <a href="https://www.dougv.com/tag/myspace/" title="MySpace" rel="tag">MySpace</a>, <a href="https://www.dougv.com/tag/privacy/" title="privacy" rel="tag">privacy</a>, <a href="https://www.dougv.com/tag/reputation/" title="reputation" rel="tag">reputation</a>, <a href="https://www.dougv.com/tag/tumblr/" title="Tumblr" rel="tag">Tumblr</a>, <a href="https://www.dougv.com/tag/webkit/" title="WebKit" rel="tag">WebKit</a><br />
]]></content:encoded>
			<wfw:commentRss>https://www.dougv.com/2012/01/01/tumblr-mangles-developer-relations/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>News Of The World Wasn&#8217;t &#8216;Hacking&#8217; Voicemail, It Was Blagging</title>
		<link>https://www.dougv.com/2011/07/08/news-of-the-world-wasnt-hacking-voicemail-it-was-blagging/</link>
		<comments>https://www.dougv.com/2011/07/08/news-of-the-world-wasnt-hacking-voicemail-it-was-blagging/#comments</comments>
		<pubDate>Fri, 08 Jul 2011 22:09:42 +0000</pubDate>
		<dc:creator>Doug Vanderweide</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[ethics]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[journalism]]></category>
		<category><![CDATA[newspapers]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[social engineering]]></category>

		<guid isPermaLink="false">http://www.dougv.com/?p=3898</guid>
		<description><![CDATA[Hacking is intentionally changing something to work other than as designed. Blagging is exploiting someone's ignorance or inattention.<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/02/03/hacking-wp-plugins-used-to-remove-plugin-version-numbers/" rel="bookmark">Hacking WP-PluginsUsed To Remove Plugin Version Numbers</a> (14.6)</li>
				<li><a href="https://www.dougv.com/2007/03/12/displaying-the-correct-time-for-world-cities-with-ajax-javascript-dom/" rel="bookmark">Displaying The Correct Time For World Cities  With AJAX / JavaScript / DOM</a> (13.8)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.
	</div>
]]></description>
			<content:encoded><![CDATA[<div id="attachment_3900" class="wp-caption alignright" style="width: 310px"><a href="http://www.flickr.com/photos/compujeramey/168108824/in/photostream/"><img class="size-full wp-image-3900 " title="Cell Phones" src="http://www.dougv.com/wp-content/uploads/2011/07/168108824_8022e0b076.jpg" alt="Cell Phones" width="300" height="225" /></a><p class="wp-caption-text">flickr /compujeramey</p></div>
<p>This is nitpicky, and I certainly don&#8217;t mean to take lightly the seriousness of the matter. But I do want to clarify that the News of the World wasn&#8217;t technically &#8220;hacking&#8221; voicemail in its scandal. It was engaged in social engineering.</p>
<p>For those of you who missed the headlines (and for the benefit of posterity): News of the World was (until July 10, 2011) a Sunday tabloid; like most British tabs, it&#8217;s best known for printing racy pictures of women and sleazy stories.</p>
<p>News of the World  hired a private investigator to help it research stories. <a href="http://en.wikipedia.org/wiki/News_of_the_World_phone_hacking_affair" target="_blank">That contractor gained access to a number of voicemail accounts</a>, including those of a murdered 13-year-old girl, several soldiers killed in the Middle East conflicts, and royal family members.</p>
<p>All the shoes involved here haven&#8217;t yet dropped, but as of this writing the scandal has closed the paper after 168 years of publication; threatens to bring down Prime Minister David Cameron; has led to several arrests and may well result in additional restrictions on Great Britain&#8217;s press. (Even overwhelmingly reasonable pundits, such as <a href="http://www.economist.com/node/18928406" target="_blank">The Economist, are calling for a mucking out of British journalism&#8217;s stables</a>.)</p>
<p>The entire affair is loathsome, no question about that, even for the British press, nefarious for its &#8220;chew people up and spit them out&#8221; appetite. It&#8217;s also caused other world press outlets to term what News of the World did &#8220;phone hacking,&#8221; needlessly worrying people who have taken reasonable steps to secure their voicemail that they, too, might be targeted.</p>
<p>So I want to clear things up. If you&#8217;ve changed your voicemail password (PIN), you almost certainly can&#8217;t be violated in the way News of the World violated its victims.</p>
<p><span id="more-3898"></span><strong>Hacking</strong> means &#8220;to alter a system to perform differently than intended.&#8221; Hacking isn&#8217;t necessarily a malicious act. In fact, it&#8217;s often a good thing. I am 100 percent in favor of hacking, provided the thing you are hacking is yours or you have permission to hack it.</p>
<p><strong>Cracking</strong> means &#8220;to compromise the security of a system.&#8221; While there are legitimate reasons to crack, it&#8217;s never an appropriate thing to do with property that doesn&#8217;t belong to you.</p>
<p>(I realize this is only one interpretation of &#8220;hacker,&#8221; and that <a href="http://en.wikipedia.org/wiki/Hacker_definition_controversy#Hacker_definition_controversy" target="_blank">other definitions exist</a>, which also encompass what I term separately as &#8220;cracking.&#8221; I reject definitions of hacking that assume malice or nefarious intent. Hackers don&#8217;t aim to cause harm to, or violate the rights of, others; crackers do. Period.)</p>
<p><a href="http://www.symantec.com/connect/articles/social-engineering-fundamentals-part-i-hacker-tactics" target="_blank"><strong>Social engineering</strong></a> (also called &#8220;blagging&#8221;) is the act of exploiting human behavior to achieve an end, usually without the tacit understanding of the people targeted that they are being exploited.</p>
<p>That&#8217;s what News of the World was up to: Exploiting people who were ignorant of, or indifferent to, basic voicemail features and security.</p>
<p><a href="http://nakedsecurity.sophos.com/2011/07/08/how-phone-hacking-worked/" target="_blank">As explained at this excellent article at sophos.com</a>, a lot of people don&#8217;t change the default password for their voicemail. Additionally, most users don&#8217;t understand that the convenience of being able to access voicemail from a different phone is a security risk that should at least be managed, if not disabled. (Admittedly, a number of phone providers don&#8217;t give you the option to disable remote access to voicemail.)</p>
<p>Simply put, News of the World&#8217;s private investigator gambled that the victims of his snooping didn&#8217;t bother to change their voicemail passwords from default values, and didn&#8217;t disable (if they even could disable) remote voicemail access.</p>
<p>Again, I am not suggesting what News of the World did was OK. That people don&#8217;t protect themselves from being violated does not make it OK to violate them.</p>
<p>My point is that what News of the World did is not hacking; at no point did anything not perform as designed. It also isn&#8217;t cracking; at no point was any procedure undertaken to circumvent the built-in security of the voicemail systems in question. The victims&#8217; misunderstandings and inaction were exploited. That&#8217;s social engineering.</p>
<p>All links in this post on delicious: <a href="http://www.delicious.com/dougvdotcom/news-of-the-world-wasnt-hacking-voicemail-it-was-blagging" target="_blank">http://www.delicious.com/dougvdotcom/news-of-the-world-wasnt-hacking-voicemail-it-was-blagging</a></p>
<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/02/03/hacking-wp-plugins-used-to-remove-plugin-version-numbers/" rel="bookmark">Hacking WP-PluginsUsed To Remove Plugin Version Numbers</a> (14.6)</li>
				<li><a href="https://www.dougv.com/2007/03/12/displaying-the-correct-time-for-world-cities-with-ajax-javascript-dom/" rel="bookmark">Displaying The Correct Time For World Cities  With AJAX / JavaScript / DOM</a> (13.8)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.</p>
	</div>

	Tags: <a href="https://www.dougv.com/tag/ethics/" title="ethics" rel="tag">ethics</a>, <a href="https://www.dougv.com/tag/hacking/" title="hacking" rel="tag">hacking</a>, <a href="https://www.dougv.com/tag/journalism/" title="journalism" rel="tag">journalism</a>, <a href="https://www.dougv.com/tag/newspapers/" title="newspapers" rel="tag">newspapers</a>, <a href="https://www.dougv.com/tag/privacy/" title="privacy" rel="tag">privacy</a>, <a href="https://www.dougv.com/tag/social-engineering/" title="social engineering" rel="tag">social engineering</a><br />
]]></content:encoded>
			<wfw:commentRss>https://www.dougv.com/2011/07/08/news-of-the-world-wasnt-hacking-voicemail-it-was-blagging/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Automatically Hash Tagging Text With PHP And MySQL</title>
		<link>https://www.dougv.com/2011/04/11/automatically-hash-tagging-text-with-php-and-mysql/</link>
		<comments>https://www.dougv.com/2011/04/11/automatically-hash-tagging-text-with-php-and-mysql/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 02:12:18 +0000</pubDate>
		<dc:creator>Doug Vanderweide</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[arrays]]></category>
		<category><![CDATA[elegance]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Reader]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[hashtags]]></category>
		<category><![CDATA[regular expression]]></category>

		<guid isPermaLink="false">http://www.dougv.com/?p=3794</guid>
		<description><![CDATA[Use PHP to extract terms from a MySQL database table and automatically tag an input string with those terms.<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2009/06/13/sorting-your-mysql-results-set-in-php-using-jquery-and-a-more-traditional-approach/" rel="bookmark">Sorting Your MySQL Results Set In PHP Using jQuery (And A More Traditional Approach)</a> (17.4)</li>
				<li><a href="https://www.dougv.com/2008/12/09/a-simple-page-click-count-system-using-php-and-mysql/" rel="bookmark">A Simple Page Click Count System Using PHP And MySQL</a> (17.2)</li>
				<li><a href="https://www.dougv.com/2007/11/15/multilingual-web-pages-via-php-arrays-and-mysql/" rel="bookmark">Multilingual Web Pages Via PHP, Arrays And MySQL</a> (16.4)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.
	</div>
]]></description>
			<content:encoded><![CDATA[<p>My <a href="http://www.dougv.com/2011/01/03/update-to-the-yourls-twitter-google-reader-script/">recent work on the Google Reader to Twitter interface</a> led me to recognize a serious shortcoming of such a basic system: A lack of support for hash tags.</p>
<p>For those unfamiliar with Twitter, <a href="http://en.wikipedia.org/wiki/Tag_%28metadata%29">hashtags</a> are basically words proceeded by a hash mark (#). When a word is &#8220;tagged&#8221;, it becomes a hyperlink to content also containing that term.  </p>
<p>Tagging isn&#8217;t unique to Twitter. It&#8217;s integral to WordPress, Tumblr and many other blogging platforms; Google uses tags (which they call &#8220;labels&#8221;) in most of their major applications, including GMail and Google Documents.</p>
<p>The reason is simple: People tend to organize information in terms of categories, so interrelating content by linking items that belong to the same categories to one another makes it easier on us to find and process that information.</p>
<p>So here&#8217;s a quick and easy script that lets you take keywords / tags / labels / categories / what have you from a MySQL table, run those terms over a string / subject text, and automatically tag that string  with those terms.</p>
<p>(In a later tutorial, I will describe how to add new terms to the database.)</p>
<p><span id="more-3794"></span>
<div class="aside"><strong>An aside on what constitutes a &#8220;term&#8221;:</strong> The one thing that became readily apparent during this project was that there are a lot of different trade-offs required in determining what constitutes a &#8220;term,&#8221; and in how easy it is to select simple derivatives of a given term in a subject string.</p>
<p>For example, <em>hack</em>. We probably want to be able to tag the similar terms <em>hacks, hacker, hackers, hacking and hacked, </em>as well as more complex derivatives, such as <em>h4x0r. </em>Needless to say, it&#8217;s difficult to convert <em>hack </em>into <em>h4x0r</em>, but it&#8217;s also difficult to simply append common endings to the root word. (More on this when we cover, in an upcoming post, adding terms from a subject string to the database.)</p>
<p>It&#8217;s also hard to know when <em>hack </em>is actually in a context we want to hash tag. For example, <em>hacker </em>is probably always going to be a term we want to tag. But words such as <em>hackle, hackberrry </em>and <em>hacksaw </em>are not ones we&#8217;re likely to want to tag, if the context in which we&#8217;re using <em>hack </em>is that of &#8220;altering a system to perform differently than intended.&#8221;</p>
<p>The compromise I am using is not the most elegant, but it is simple and direct: A <em>term </em>is as an exact match of a word contained in the database. Therefore, if I want to tag <em>hack, hacker, hacking </em>and <em>hacked</em>, all four of those words must appear in the database.</p>
<p>Terms are case-insensitive. In other words, if I have <em>hack </em>in the database, it matches <em>hack, Hack, hAck </em>and <em>HACK </em>in the subject string.</div>
<h4>An HTML Form To Input A Subject String</h4>
<p>We need a simple way to get our subject string (that is, the text we want to have tagged). Here&#8217;s a form to do that; you could, of course, alter this script to open up a file, or retrieve data from some other store, as your subject text.</p>
<p>I am also including an echo statement, just before the form, that will show the autotagged text once the form has been submitted.</p>
<pre class="brush: xml; title: ; notranslate">&lt;p class=&quot;notice&quot;&gt;&lt;?php echo $content; ?&gt;&lt;/p&gt;
&lt;form id=&quot;tform&quot; name=&quot;tform&quot; action=&quot;&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;&quot; method=&quot;post&quot;&gt;
	&lt;textarea id=&quot;ttext&quot; name=&quot;ttext&quot; cols=&quot;50&quot; rows=&quot;3&quot;&gt;&lt;?php echo $_POST['ttext']; ?&gt;&lt;/textarea&gt;
	&lt;br /&gt;
	&lt;input type=&quot;submit&quot; name=&quot;submit&quot; id=&quot;submit&quot; value=&quot;Submit&quot; /&gt;
&lt;/form&gt;</pre>
<h4>A MySQL Table To Contain Terms</h4>
<p>We need to have some sort of data store to hold the terms. Eventually, we&#8217;re going to put these terms into an array, so you could simply hard-code your terms as a PHP array. Also, you could use an XML file, JSON, a CSV or other text file, etc. to hold your terms.</p>
<p>In my case, I am storing terms in a MySQL table. Here&#8217;s the code for my table:</p>
<pre class="brush: sql; title: ; notranslate">CREATE TABLE IF NOT EXISTS `php_auto_hashtag` (
  `term_text` varchar(255) NOT NULL,
  UNIQUE KEY `term_text` (`term_text`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

INSERT INTO `php_auto_hashtag` (`term_text`) VALUES
('adsense'),('amazon'),('android'),('aol'),('api'),('apple'),
('bing'),('canvas'),('cbs'),('chrome'),('cloud'),('comcast'),
('darpa'),('eff'),('facebook'),('firefox'),('google'),
('hacker'),('hackers'),('hacking'),('html'),('html5'),
('http'),('https'),('ie9'),('ietf'),('intel'),('internet'),
('ios'),('ipad'),('ipv6'),('javascript'),('kinect'),('malware'),
('microsoft'),('mozilla'),('mvc'),('nokia'),('pentagon'),('php'),
('ps3'),('rackspace'),('safari'),('silverlight'),('sony'),
('stuxnet'),('symbian'),('tablets'),('twitter'),('vb'),
('verizon'),('virus'),('windows'),('xml'),('youtube');</pre>
<p>Note that we don&#8217;t have a primary key. That&#8217;s because we have a unique key. We don&#8217;t want the same term in the database twice, and that&#8217;s what a unique key does: prevent duplicate entries. As a result, a primary key isn&#8217;t necessary for tuning / optimization if we have a unique key, since their purposes in indexing are similar.</p>
<h4>A PHP Function To Retrieve Terms From The Database</h4>
<p>To get the terms out of the database and into a PHP array, I&#8217;ll make a function. The reason why I am doing it this way will be noted shortly. The function returns false on an error, an array on success.</p>
<p>The function assumes the database table contains at least one term, but if it doesn&#8217;t, it&#8217;s not a fatal error (but will show a warning to the end user).</p>
<p>Finally, you&#8217;ll note I am using <a href="http://php.net/manual/en/function.define.php">globally defined constants</a> for taking in database credentials. This isn&#8217;t really elegant, but I want I want this script to work out-of-the-box for those who have limited programming skills; by defining DB variables globally, an end user can simply plug in the right values and use this script out of the box.</p>
<pre class="brush: php; title: ; notranslate">//your database server variables
define('MYSQL_HOST', 'localhost');
define('MYSQL_USER', 'db_user');
define('MYSQL_PASS', 'db_password');
define('MYSQL_DB', 'db_name');
define('MYSQL_QUERY', 'SELECT term_text FROM php_auto_hashtag');

function at_get_terms() {
	//retrieve terms from database
	//returns Boolean false on failure, array of terms on success

	if(!$link = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS)) {
		trigger_error('function at_get_terms: Cannot connect to database server. Please check your host name and credentials', E_USER_WARNING);
		return false;
	}

	if(!mysql_select_db(MYSQL_DB)) {
		trigger_error('function at_get_terms: Cannot select the database. Please check your database name', E_USER_WARNING);
		return false;
	}

	if(!$rs = mysql_query(MYSQL_QUERY)) {
		trigger_error('function at_get_terms: Error parsing query. MySQL error: ' . mysql_error(), E_USER_WARNING);
		return false;
	}

	if(mysql_num_rows($rs) == 0) {
		trigger_error('function at_get_terms: No terms found in database', E_USER_NOTICE);
		return false;
	}

	$out = array();
	while($row = mysql_fetch_array($rs)) {
		$out[] = $row[0];
	}
	return $out;
}</pre>
<h4>A PHP Function To Autotag The Subject</h4>
<p>We can now create a function that does the autotagging. It takes as arguments the subject text and the array of terms we want tagged; it returns false on an error and the tagged subject string on success.</p>
<p>In this case, we&#8217;re using <a href="http://us2.php.net/manual/en/function.preg-replace.php">preg_replace</a> to do the tagging. There&#8217;s a lot of argument as to whether <a href="http://us2.php.net/manual/en/function.str-replace.php">str_replace</a> or <a href="http://us2.php.net/manual/en/function.ereg-replace.php">ereg_replace</a> is faster / better than preg_replace, but I find such arguments to be counting angels dancing on the head of a pin. I use preg_replace because it works quickly enough, regular expressions are an elegant way to find text, and <a href="http://us2.php.net/manual/en/intro.pcre.php">PCRE is PHP&#8217;s preferred regular expression processing extension</a>.</p>
<pre class="brush: php; title: ; notranslate">function autotag($input, $terms) {
	//tags $input with $terms
	//returns false on error, tagged string on success

	if(strlen(trim($input)) &lt; 1) {
		trigger_error('function autotag: string to be tagged is empty', E_USER_WARNING);
		return false;
	}
	if(!is_array($terms)) {
		trigger_error('function autotag: terms is not an array', E_USER_WARNING);
		return false;
	}

	$tmp = array();
	foreach($terms as $term){
		//matches will be terms exactly as in database,
		//followed by space or newline
		$tmp[] = &quot;/($term)(\s|$)/i&quot;;
	}
	$out = preg_replace($tmp, '#$0', $input);
	return $out;
}</pre>
<p>Note the second argument in the preg_replace call, above. # is just the hash mark, which in the case of Twitter will be turned automatically into an tag link. $0 means, in regular expressions, the entire part of the subject text (the third argument) that matched the pattern (the first part of the argument). </p>
<p>So, if you wanted to use hyperlinks instead of hashtags, and use the found terms as querystring variables to a page named term.php, your preg_replace statement would be something like this:</p>
<pre class="brush: php; title: ; notranslate">
	$out = preg_replace($tmp, '&lt;a href=&quot;term.php?term=$0&quot;&gt;$0&lt;/a&gt;', $input);
</pre>
<p>(<strong>Always sanitize your querystring variables before using them in your PHP code.</strong> You have been warned. Don&#8217;t come crying to me or pointing fingers in my direction if you fall victim to an <a href="http://en.wikipedia.org/wiki/Cross-site_scripting">XSS</a> or <a href="http://en.wikipedia.org/wiki/Code_injection">injection</a> attack. <strong>Sanitize your variables.</strong>)</p>
<h4>Get The Terms And Tag The Target String</h4>
<p>We now have everything we need to autotag the target string. It&#8217;s as simple as a single-command if statement:</p>
<pre class="brush: php; title: ; notranslate">
$content = &quot;Enter text in the textarea below, then click Submit. The text will be automatically tagged with terms contained in the database. &quot;;

if(isset($_POST['submit'])) {
	$content = &quot;&lt;strong&gt;Hashtagged string:&lt;/strong&gt; &quot; . autotag(htmlspecialchars($_POST['ttext']), at_get_terms());
}
</pre>
<p>And that&#8217;s all there is to it. You can see a working demo here: <a href="http://www.dougv.com/demo/php_auto_hashtag/">http://www.dougv.com/demo/php_auto_hashtag/</a></p>
<p><a href="http://www.dougv.com/wp-content/uploads/2011/04/php_auto_hashtag.zip">You can also download the source code</a>. I distribute this code under the GNU GPL version 3.</p>
<p>All links in this post on delicious: <a href="http://www.delicious.com/dougvdotcom/automatically-hash-tagging-text-with-php-and-mysql">http://www.delicious.com/dougvdotcom/automatically-hash-tagging-text-with-php-and-mysql</a></p>
<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2009/06/13/sorting-your-mysql-results-set-in-php-using-jquery-and-a-more-traditional-approach/" rel="bookmark">Sorting Your MySQL Results Set In PHP Using jQuery (And A More Traditional Approach)</a> (17.4)</li>
				<li><a href="https://www.dougv.com/2008/12/09/a-simple-page-click-count-system-using-php-and-mysql/" rel="bookmark">A Simple Page Click Count System Using PHP And MySQL</a> (17.2)</li>
				<li><a href="https://www.dougv.com/2007/11/15/multilingual-web-pages-via-php-arrays-and-mysql/" rel="bookmark">Multilingual Web Pages Via PHP, Arrays And MySQL</a> (16.4)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.</p>
	</div>

	Tags: <a href="https://www.dougv.com/tag/arrays/" title="arrays" rel="tag">arrays</a>, <a href="https://www.dougv.com/tag/elegance/" title="elegance" rel="tag">elegance</a>, <a href="https://www.dougv.com/tag/google/" title="Google" rel="tag">Google</a>, <a href="https://www.dougv.com/tag/google-reader/" title="Google Reader" rel="tag">Google Reader</a>, <a href="https://www.dougv.com/tag/hacking/" title="hacking" rel="tag">hacking</a>, <a href="https://www.dougv.com/tag/hashtags/" title="hashtags" rel="tag">hashtags</a>, <a href="https://www.dougv.com/tag/regular-expression/" title="regular expression" rel="tag">regular expression</a><br />
]]></content:encoded>
			<wfw:commentRss>https://www.dougv.com/2011/04/11/automatically-hash-tagging-text-with-php-and-mysql/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Lessons We Should All Relearn From HBGary</title>
		<link>https://www.dougv.com/2011/02/17/the-lessons-we-should-all-relearn-from-hbgary/</link>
		<comments>https://www.dougv.com/2011/02/17/the-lessons-we-should-all-relearn-from-hbgary/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 23:21:04 +0000</pubDate>
		<dc:creator>Doug Vanderweide</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Anonymous]]></category>
		<category><![CDATA[ars technica]]></category>
		<category><![CDATA[coding standards]]></category>
		<category><![CDATA[elegance]]></category>
		<category><![CDATA[ethics]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[identity theft]]></category>
		<category><![CDATA[reputation]]></category>
		<category><![CDATA[social engineering]]></category>

		<guid isPermaLink="false">http://dougv.com/?p=3600</guid>
		<description><![CDATA[HB Gary made a number of simple mistakes that led to a major hack. Those mistakes are all too common, in every organization.<div class="yarpp">
	<h5>Related Posts</h5>
		
No related posts.
	</div>
]]></description>
			<content:encoded><![CDATA[<p>Ars technica published a long (by Web standards) story yesterday about <a href="http://arstechnica.com/tech-policy/news/2011/02/anonymous-speaks-the-inside-story-of-the-hbgary-hack.ars/" target="_blank">the hacking of <strong>HBGary</strong> by Anonymous</a>. It is absolutely, positively, must-read information for all beginner Web developers &#8212; for that matter, for experienced Web developers, too.</p>
<p>For those unfamiliar with the story, HBGary is an information systems security consultancy. It&#8217;s not huge, but it&#8217;s been successful getting work with the federal government and several other companies.</p>
<p>But HBGary wanted to get bigger; to exploit the headlines and prove itself worthy of major government and corporate contracts.  So HBGary hatched a couple of schemes.</p>
<p>One was to help Bank of America discredit WikiLeaks with <a href="http://www.thetechherald.com/article.php/201106/6798/Data-intelligence-firms-proposed-a-systematic-attack-against-WikiLeaks" target="_blank">a disinformation campaign and character assassinations</a>. The other was to &#8220;unmask&#8221; the Anonymous hackers who set off several DDoS attacks against Visa, Bank of America, and others perceived as having harmed WikiLeaks.</p>
<p>Unfortunately, HBGary boss <strong>Aaron Barr </strong>decided to go public with his <a href="http://www.v3.co.uk/v3/news/2274613/anonymous-hbgary-federal-ft" target="_blank">plans to expose the alleged hackers</a>. So Anonymous decided to attack HBGary, and the rest are our lessons for the day.</p>
<p><span id="more-3600"></span>
<div class="aside"><strong>An aside on Anonymous:</strong> Ars technica does a nice job of explaining how Anonymous works, but I want to be even clearer.</p>
<p>The press, and people like Barr, often speak about Anonymous as though it is a fixed group of specific people, led in a traditional, top-down manner. In fact, Anonymous is the exact opposite of such a structure.</p>
<p><em>Anonymous</em> is a convenient term to apply to online <a href="http://en.wikipedia.org/wiki/Flash_mob" target="_blank">flash mobs</a> that serve <a href="http://en.wikipedia.org/wiki/Grassroots">grassroots</a> efforts, the way <em>tsunami</em> is a convenient way to label a series of big waves caused by seismic events.</p>
<p>No two tsunamis are caused by the same event; none maintain a constant state as they are created, travel and make landfall; and none are exactly like one before. The same is true of Anonymous: Who is in any given Anonymous undertaking and who is leading that effort is almost never the same for any two events, and usually is constantly changing during any one undertaking.</p>
<p>An Anonymous effort is never dictated; the surest way to disinterest Anonymous is by asking for a <a href="http://www.urbandictionary.com/define.php?term=NYPA&amp;defid=5032806" target="_blank">personal army</a>. Anonymous lives by <a href="http://en.wikipedia.org/wiki/Swarm_intelligence" target="_blank">hive mind</a>, not by imposed structure. Whatever Anonymous does and however effective that effort proves is entirely subject to the whim of the moment keeping a sufficient number of individuals interested in its outcome.</p>
<p>So any time you hear someone talking about &#8220;Anonymous&#8221; as though it was a fixed group of purposeful people, that&#8217;s someone who doesn&#8217;t understand Anonymous at all.</p></div>
<h4>Lesson 1: Protect Against SQL Injection</h4>
<p>HBGary&#8217;s subsidiary Web side, <a href="http://hbgaryfederal.com/" target="_blank">hbgaryfederal.com</a>, used a custom content management system. The authors of that system failed to property sanitize navigation query string variables, allowing for a <a href="http://unixwiz.net/techtips/sql-injection.html" target="_blank">SQL injection attack</a>.</p>
<blockquote><p>Specifically, the attackers grabbed the user database from the CMS—the  list of usernames, e-mail addresses, and password hashes for the HBGary  employees authorized to make changes to the CMS.</p></blockquote>
<p>Clearly, as ars technica notes, there was no unit testing of this Web site. </p>
<p>Even the most remedial system that involves a database should employ some sort of input sanitation.  It&#8217;s doubly unforgivable in this case because the query string variables that were exploited &#8212; http://www.hbgaryfederal.com/pages.php?pageNav=2&amp;page=27 &#8212; clearly were supposed to always be integers.  </p>
<p>As my colleague <a href="http://twitter.com/#!/ghowe16" target="_blank">Greg Howe</a> says, it&#8217;s important to learn how to protect your code against SQL injection. The best advice I&#8217;ve found about armoring against SQL attacks is in the <a href="http://www.php.net/manual/en/security.database.sql-injection.php" target="_blank">PHP documentation&#8217;s overview of SQL injection</a>, under &#8220;Avoiding techniques.&#8221;</p>
<p>I especially expound the very first point: <em>Always connect to the database server with a bare minimum of permissions necessary.</em> Make read-only and read-write only DB users and employ only the ones you need. Better yet, create stored procedures to handle your DB tasks, and limit access to specific users. If your Web host only lets you have one DB user, find a better Web host. Period.</p>
<h4>Lesson 2: Don&#8217;t Recycle Passwords</h4>
<p>A while back I reposted <a href="http://dougv.com/2010/09/13/xkcd-nails-the-real-security-threat/">a great xkcd cartoon</a> that notes the real issue in password security isn&#8217;t entropy (e.g., the password getting stale), it&#8217;s reuse (e.g., the same password being used for everything). HBGary found that out the hard way.</p>
<blockquote><p>Neither Aaron nor Ted  followed best practices. Instead, they used the same password in a whole  bunch of different places, including e-mail, Twitter accounts, and  LinkedIn. For both men, the passwords allowed retrieval of e-mail.  However, that was not all they revealed.</p></blockquote>
<p>Like everyone else, I was this kind of lazy, too, until <a href="http://lastpass.com/" target="_blank">LastPass</a> came along, which I now use for everything. I also like the color-coded <a href="http://www.passwordcard.org/en" target="_blank">PasswordCard</a> <a href="http://www.lifehacker.com.au/2010/04/passwordcard-hides-mentally-encrypted-passwords-in-your-wallet/" target="_blank">noted at lifehacker</a>, if you don&#8217;t trust LastPass.</p>
<h4>Lesson 3: Use Complex Password Encryption Patterns</h4>
<p>The reason Anonymous got those passwords was because the CMS developers simply applied an MD5 hash to the passwords it stored, without salting them, requiring complexity or using a multiple-step algorithm.</p>
<blockquote><p>The result was that the downloaded passwords were highly susceptible to  rainbow table-based attacks, performed using a rainbow table-based  password cracking website. And so this is precisely what the attackers  did; they used a rainbow table cracking tool to crack the  hbgaryfederal.com CMS passwords.</p></blockquote>
<p>An MD5 hash alone is nearly as useless as storing passwords in clear text; there are enough <a href="http://en.wikipedia.org/wiki/Rainbow_table" target="_blank">rainbow tables</a> out there, and enough basic computational power available in the average desktop, to pretty much render a single hash pointless.  </p>
<p><em>You have to at least <a href="http://en.wikipedia.org/wiki/Salt_%28cryptography%29" target="_blank">salt</a> a one-time MD5 hash.</em> Better yet, use stronger crypto.</p>
<p>Ars technica is in love with using <a href="http://en.wikipedia.org/wiki/Secure_Shell" target="_blank">ssh</a> to control access to *nix boxes, and in this case that seems like a workable solution. I can see where going &#8220;passwordless&#8221; seems like a great idea, but again, if one simply obfuscates a password a little bit and doesn&#8217;t use it in the same place twice, that should be more than sufficient.</p>
<h4>Lesson 4: Keep Your Systems Patched</h4>
<p>You can&#8217;t install a CMS and then ignore it, or never upgrade your <a href="http://www.devshed.com/c/a/PHP/PHP3-Introduction/" target="_blank">PHP3</a> code. <em>Patch your systems and fix your code when you know it&#8217;s not safe.</em></p>
<blockquote><p>The only way they [hackers] can have some fun is to elevate privileges through exploiting a privilege escalation vulnerability. &#8230; By a stroke of luck, the HBGary system was vulnerable to just such a flaw. The error was published in October last year, conveniently with a full, working exploit. By November, most distributions had patches available, and there was no good reason to be running the exploitable code in February 2011.</p>
<p>Exploitation of this flaw gave the Anonymous attackers full access to HBGary&#8217;s system. It was then that they discovered many gigabytes of backups and research data, which they duly purged from the system.</p></blockquote>
<p>Yes, there&#8217;s always a chance things will break if you install a patch or close a security hole. That is why God made <a href="http://en.wikipedia.org/wiki/Sandbox_%28computer_security%29"  target="_blank">sandbox</a> servers: So you can test before deploying.</p>
<h4>Lesson 5: Have Clear Security Procedures</h4>
<p>Much of what Anonymous could accomplish was as a result of tricking Nokia employee <strong>Jussi Jaakonaho</strong>, who had access to HBGary&#8217;s systems, into opening up SSH access to a remote server, as well as &#8220;reminding&#8221; a person masquerading as <strong>Greg Hoglund</strong>, another HBGary executive.</p>
<blockquote><p>To be fair to Jussi, the fake Greg appeared to know the root password  and, well, the e-mails were coming from Greg&#8217;s own e-mail address. But  over the course of a few e-mails it was clear that &#8220;Greg&#8221; had forgotten  both his username <em>and</em> his password. And Jussi handed them to him on a platter.</p></blockquote>
<p>I&#8217;m not suggesting that one turn every request for help into the <a href="http://en.wikipedia.org/wiki/Spanish_Inquisition" target="_blank">Spanish Inquisition</a>. Believe me, I&#8217;ve endured enough uptight network admins having conniptions over a simple request for a password reminder or temporary, elevated privileges to last me a lifetime.</p>
<p>I am saying, have a clear and sensible protocol for requesting new passwords, unusual access and the like, and make sure everyone understands and follows that policy.</p>
<h4>Lesson 6: Nothing Is Private</h4>
<p>If you write it down, photograph or otherwise record it, assume it will eventually be known to everyone, everywhere. </p>
<p>There are 50,000 e-mails in the pile that Anonymous seized, and some of the handful that have been sifted are quite damning. </p>
<p>Take, as example, <a href="http://www.dailykos.com/story/2011/02/16/945768/-UPDATED:-The-HB-Gary-Email-That-Should-Concern-Us-All" target="_blank">a message the Daily Kos dredged up</a>, revealing a sockpuppet management system:</p>
<blockquote><p>(F)or a defense contractor with ties to the federal government, Hunton &#038; Williams, DOD, NSA, and the CIA &#8211;  whose enemies are labor unions, progressive organizations,  journalists, and progressive bloggers,  a persona apparently goes far beyond creating a mere sockpuppet.</p>
<p>According to an embedded MS Word document found in one of the HB Gary emails, it involves creating an army of sockpuppets, with sophisticated &#8220;persona management&#8221; software that allows a small team of only a few people to appear to be many, while keeping the personas from accidentally cross-contaminating each other. Then, to top it off, the team can actually automate some functions so one persona can appear to be an entire Brooks Brothers riot online.</p></blockquote>
<p>Who knows what dark trade secrets are yet to be revealed?</p>
<h4>Lesson 7: It&#8217;s Not That They Are Smart, It&#8217;s That You Are Sloppy</h4>
<blockquote><p>The Anonymous hack was not exceptional: the hackers used standard, widely known techniques to break into systems, find as much information as possible, and use that information to compromise further systems. They didn&#8217;t have to, for example, use any non-public vulnerabilities or perform any carefully targeted social engineering. And because of their desire to cause significant public disruption, they did not have to go to any great lengths to hide their activity.</p></blockquote>
<p>Enough said.</p>
<div class="yarpp">
	<h5>Related Posts</h5>
		<p>No related posts.</p>
	</div>

	Tags: <a href="https://www.dougv.com/tag/anonymous/" title="Anonymous" rel="tag">Anonymous</a>, <a href="https://www.dougv.com/tag/ars-technica/" title="ars technica" rel="tag">ars technica</a>, <a href="https://www.dougv.com/tag/coding-standards/" title="coding standards" rel="tag">coding standards</a>, <a href="https://www.dougv.com/tag/elegance/" title="elegance" rel="tag">elegance</a>, <a href="https://www.dougv.com/tag/ethics/" title="ethics" rel="tag">ethics</a>, <a href="https://www.dougv.com/tag/hacking/" title="hacking" rel="tag">hacking</a>, <a href="https://www.dougv.com/tag/identity-theft/" title="identity theft" rel="tag">identity theft</a>, <a href="https://www.dougv.com/tag/reputation/" title="reputation" rel="tag">reputation</a>, <a href="https://www.dougv.com/tag/social-engineering/" title="social engineering" rel="tag">social engineering</a><br />
]]></content:encoded>
			<wfw:commentRss>https://www.dougv.com/2011/02/17/the-lessons-we-should-all-relearn-from-hbgary/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>&#8216;Behind Every Great Fortune Is A Great Crime&#8217;</title>
		<link>https://www.dougv.com/2010/12/07/behind-every-great-fortune-is-a-great-crime/</link>
		<comments>https://www.dougv.com/2010/12/07/behind-every-great-fortune-is-a-great-crime/#comments</comments>
		<pubDate>Tue, 07 Dec 2010 04:27:56 +0000</pubDate>
		<dc:creator>Doug Vanderweide</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Customer Relations]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[ethics]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[journalism]]></category>
		<category><![CDATA[reputation]]></category>
		<category><![CDATA[social engineering]]></category>

		<guid isPermaLink="false">http://www.dougv.com/blog/?p=3437</guid>
		<description><![CDATA[The headline to this post is via Chris Rock, who repeats that line during his &#8220;Never Scared&#8221; comedy special (link very NSFW!), speaking about the difference between being rich and being wealthy. It means that significant, lasting wealth is often created by exploiting something new, or using some means to circumvent the kind of behavior [...]<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/07/10/lastpass-a-great-way-to-protect-your-actual-internet-privacy/" rel="bookmark">LastPass: A Great Way To Protect Your Actual Internet Privacy</a> (18.6)</li>
				<li><a href="https://www.dougv.com/2010/06/16/new-england-givecamp-2010-what-a-great-experience/" rel="bookmark">New England GiveCamp 2010: What A Great Experience</a> (17.4)</li>
				<li><a href="https://www.dougv.com/2010/11/28/google-search-results-encourage-new-wave-of-negative-customer-service/" rel="bookmark">Google Search Results Encourage New Wave Of Negative Customer Service</a> (9.4)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.
	</div>
]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignleft" style="width: 400px"><a href="http://www.nytimes.com/2010/12/07/business/07borker.html"><img class=" " title="Federal postal authorities with Vitaly Borker after they arrested him on Monday at his home in Brooklyn. " src="http://graphics8.nytimes.com/images/2010/12/07/business/Borker1/Borker1-popup.jpg" alt="Federal postal authorities with Vitaly Borker after they arrested him on Monday at his home in Brooklyn. " width="390" height="219" /></a><p class="wp-caption-text">Federal postal authorities with Vitaly Borker after they arrested him on Monday at his home in Brooklyn. Robert Stolarik for The New York Times</p></div>
<p>The headline to this post is via Chris Rock, who <a href="http://www.youtube.com/watch?v=n8BtHZWGB8c&amp;t=04m13s" target="_blank">repeats that line during his &#8220;Never Scared&#8221; comedy special</a> (link <em>very </em>NSFW!), speaking about the difference between being rich and being wealthy.</p>
<p>It means that significant, lasting wealth is often created by exploiting something new, or using some means to circumvent the kind of behavior most people would consider fair or reasonable. The patron of the exhaulted Kennedy clan made his fortune from <a href="http://en.wikipedia.org/wiki/Joseph_Kennedy#Business_career" target="_blank">bootlegging and insider trading</a> before the 1929 stock market crash. Rockerfeller, Vanderbilt and Morgan were the great <a href="http://en.wikipedia.org/wiki/Robber_baron_%28industrialist%29" target="_self">robber barons</a> of the U.S. industrial revolution.</p>
<p>I mention this because <strong>Vitaly Borker</strong>, proprietor of decormyeyes, was arrested today on federal charges of &#8220;<a href="http://www.nytimes.com/2010/12/07/business/07borker.html?_r=1" target="_blank">mail fraud, wire fraud, making interstate threats and cyberstalking</a>.&#8221;</p>
<p>Borker, <a href="http://www.dougv.com/2010/11/28/google-search-results-encourage-new-wave-of-negative-customer-service/" target="_blank">as you will remember from this blog</a>, discovered some time ago that Google&#8217;s PageRank algorithm didn&#8217;t consider whether the mentioning of an online store was positive or negative. (Google claims <a href="http://googleblog.blogspot.com/2010/12/being-bad-to-your-customers-is-bad-for.html" target="_blank">this is no longer the case</a>.) Therefore, Borker took a extremely combative approach to customer complaints, intentionally stoking animosity, so that his online store would appear in multiple online complaints, often at very reputable, PageRank-enhancing Web sites, such as <a href="http://getsatisfaction.com/" target="_blank">Get Satisfaction</a>.</p>
<p>It seemed to work well, and I admired the ingenuity behind it, if not the tactic itself. Seems now, however, that Borker will be a test case as to whether anti-service, and preying upon the gullible / lazy, is at an end. (I might also note that this is further proof that for all the caterwauling, good journalism isn&#8217;t dead; if anything, it&#8217;s more valuable than ever.)</p>
<p>All links in this post on delicious: <a href="http://www.delicious.com/dougvdotcom/behind-every-great-fortune-is-a-great-crime" target="_blank">http://www.delicious.com/dougvdotcom/behind-every-great-fortune-is-a-great-crime</a></p>
<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/07/10/lastpass-a-great-way-to-protect-your-actual-internet-privacy/" rel="bookmark">LastPass: A Great Way To Protect Your Actual Internet Privacy</a> (18.6)</li>
				<li><a href="https://www.dougv.com/2010/06/16/new-england-givecamp-2010-what-a-great-experience/" rel="bookmark">New England GiveCamp 2010: What A Great Experience</a> (17.4)</li>
				<li><a href="https://www.dougv.com/2010/11/28/google-search-results-encourage-new-wave-of-negative-customer-service/" rel="bookmark">Google Search Results Encourage New Wave Of Negative Customer Service</a> (9.4)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.</p>
	</div>

	Tags: <a href="https://www.dougv.com/tag/ethics/" title="ethics" rel="tag">ethics</a>, <a href="https://www.dougv.com/tag/google/" title="Google" rel="tag">Google</a>, <a href="https://www.dougv.com/tag/hacking/" title="hacking" rel="tag">hacking</a>, <a href="https://www.dougv.com/tag/journalism/" title="journalism" rel="tag">journalism</a>, <a href="https://www.dougv.com/tag/reputation/" title="reputation" rel="tag">reputation</a>, <a href="https://www.dougv.com/tag/social-engineering/" title="social engineering" rel="tag">social engineering</a><br />
]]></content:encoded>
			<wfw:commentRss>https://www.dougv.com/2010/12/07/behind-every-great-fortune-is-a-great-crime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Search Results Encourage New Wave Of Negative Customer Service</title>
		<link>https://www.dougv.com/2010/11/28/google-search-results-encourage-new-wave-of-negative-customer-service/</link>
		<comments>https://www.dougv.com/2010/11/28/google-search-results-encourage-new-wave-of-negative-customer-service/#comments</comments>
		<pubDate>Mon, 29 Nov 2010 03:00:48 +0000</pubDate>
		<dc:creator>Doug Vanderweide</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[ethics]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[reputation]]></category>

		<guid isPermaLink="false">http://www.dougv.com/blog/?p=3417</guid>
		<description><![CDATA[A fascinating article in today&#8217;s New York Times examines the case of DecorMyEyes, an online eyeglasses retailer who&#8217;s found an interesting exploit in Google&#8217;s search rankings. Noting that Google&#8217;s PageRank algorithm doesn&#8217;t determine if a linkback to a Web site is positive or negative, store owner Vitoly Borker games that system simply: He fights every [...]<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/04/28/googles-web-browser-has-its-problems-too/" rel="bookmark">Google&#8217;s Web Browser Has Its Problems, Too</a> (13.7)</li>
				<li><a href="https://www.dougv.com/2010/06/10/its-all-chinese-to-me-reader-has-google-translate-built-in/" rel="bookmark">It&#8217;s All Chinese To Me: Reader Has Google Translate Built-In</a> (13.5)</li>
				<li><a href="https://www.dougv.com/2010/07/10/lastpass-a-great-way-to-protect-your-actual-internet-privacy/" rel="bookmark">LastPass: A Great Way To Protect Your Actual Internet Privacy</a> (5)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.
	</div>
]]></description>
			<content:encoded><![CDATA[<p>A fascinating article in today&#8217;s <a href="http://www.nytimes.com/2010/11/28/business/28borker.html?_r=2" target="_blank">New York Times examines the case of DecorMyEyes</a>, an online eyeglasses retailer who&#8217;s found an interesting exploit in Google&#8217;s search rankings.</p>
<p>Noting that <a href="http://www.google.com/corporate/tech.html" target="_blank">Google&#8217;s PageRank algorithm</a> doesn&#8217;t determine if a linkback to a Web site is positive or negative, store owner Vitoly Borker games that system simply: He fights every customer complaint bitterly, with verbal abuse, counter-complaints, and what some construe as overt threats of violence.</p>
<div class="aside"><strong>Update, Dec. 2, 2010:</strong> Google has <a href="http://googleblog.blogspot.com/2010/12/being-bad-to-your-customers-is-bad-for.html" target="_self">changed its PageRank algorithm</a> to weigh the negativity of comments.</div>
<p>This aggressive, seemingly destructive behavior is so over-the-top, it leads disgruntled customers to complain everyplace they can online, including at such massive entities as <a href="http://getsatisfaction.com/" target="_blank">Get Satisfaction</a>.</p>
<p>The long and short: Lots of mentions and links to his Web site, plus lots of mentions of the brands he sells, all in context, often on high-traffic Web sites, means searching for a specific pair of eyeglasses often leads to Borker&#8217;s Web site being listed first in a Google search.</p>
<p>Borker effectively preys on the inexperienced online shopper. &#8220;If you’re the type of person who reads consumer reviews,&#8221; says the Times, &#8220;Mr. Borker would rather you shop elsewhere.&#8221;</p>
<p>He gets away with it via a combination of apathy and obeying the letter of the law.</p>
<p>His previous hosting company and eBay (from where he buys glasses for resale)  ignored scores of complaints until the Times inquired about his accounts. The confusion law enforcement has over Web-based commerce crime, including the <a href="http://www.ic3.gov/default.aspx" target="_blank">IC3</a>, means police have largely been absent, even in the face of obvious violations of the law.</p>
<p>Borker carefully monitors Visa and MasterCard complaints, making sure he doesn&#8217;t go past the monthly complaint limits. After MasterCard closed one of his merchant accounts, he opened another:</p>
<blockquote><p>&#8220;There is no such thing as shutting someone down on the Internet,” he  said during our initial telephone interview. “It isn’t possible. If Visa and MasterCard ever shut me down, I’d use the name of a friend of mine. Give him 1 percent.&#8221;</p></blockquote>
<p>Most interesting, Borker sells on <a href="http://www.amazon.com/gp/help/customer/display.html?nodeId=537796" target="_blank">Amazon.com&#8217;s Marketplace</a>, and doesn&#8217;t employ any nastiness there, because Amazon has a very low tolerance for customer complaints, according to the Times.<br />
<span id="more-3417"></span></p>
<h3>The Genius Of Borker</h3>
<p>Let me be clear, right up front: What Borker is doing is awful. No decent human being can endorse any of it. But one cannot deny the genius behind it, especially using arrogance to game arrogance.</p>
<p>Anyone experienced with a large Web host knows, they generally have no interest or incentive to discontinue any but the most odious of Web sites. Unless a site is getting a host thrown into a <a href="http://en.wikipedia.org/wiki/DNSBL" target="_blank">black hole list</a>; is generating actual lawsuits, warrants or court orders; or is generating loads of negative publicity, most Web hosting providers ignore complaints.</p>
<p>Usually, that&#8217;s a good thing; not liking a Web site&#8217;s message is seldom reason to have it removed, and admittedly, anyone who puts in any due diligence would never buy from DecorMyEyes. That said, there&#8217;s a very good point about being a good corporate citizen, and there&#8217;s no question that what Borker is doing is exploitation at its worst.</p>
<p>Anyone who&#8217;s been on eBay for any period of time also knows how arbitrary both its rules and its rules enforcement prove. Simply put, only repeated and egregious violations get one in trouble.</p>
<p>There&#8217;s really only three ways to get kicked off of eBay: never pay for anything, never ship anything you&#8217;ve sold, or don&#8217;t pay your eBay fees. Even then, one can simply sign up with a new e-mail address / under someone else&#8217;s name.</p>
<p>Anyone who&#8217;s had the misfortune of dealing with local law enforcement knows how little most police understand the Internet, and how most don&#8217;t care to prosecute such crimes because of jurisdictional questions.</p>
<p>I have had two occasions to deal with Internet harassment over the years. In one case, it took several overt threats from an e-mailer to get the police to contact the person involved and tell him to stop. In the other, it took scores of spam messages and extensive evidence that it was all coming from a specific, out-of-state IP address in the same neighborhood as someone with whom I had an eBay dispute to get police in his home state to issue him a warning.</p>
<p>Similarly, there is zero incentive for Visa and MasterCard to intervene with vendors who ship defective or fraudulent merchandise. Some percentage of victims won&#8217;t complain at all. Another percentage won&#8217;t fight a refusal to reverse charges. Practically none will sue. In the end, it&#8217;s more profitable to look the other way on occasional fraud.</p>
<p>And again, their incentive is in having more sellers, not fewer, so there&#8217;s little reason for them to strongly vet new applications, to ensure those who ultimately profit weren&#8217;t previously banned.</p>
<p>So yes, what Borker is doing is loathesome. But it&#8217;s a product of the compromises we&#8217;ve made to keep the Internet an open and free place to operate.</p>
<p>Ultimately, I believe that those who have done business with him only have themselves to blame, given that the ease of finding his store is equivalent to the ease of discovering what a shady operator he is. It&#8217;s not only <em>caveat emptor</em>, it&#8217;s &#8220;freedom isn&#8217;t free.&#8221; Protect yourself at all times in the ring.</p>
<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/04/28/googles-web-browser-has-its-problems-too/" rel="bookmark">Google&#8217;s Web Browser Has Its Problems, Too</a> (13.7)</li>
				<li><a href="https://www.dougv.com/2010/06/10/its-all-chinese-to-me-reader-has-google-translate-built-in/" rel="bookmark">It&#8217;s All Chinese To Me: Reader Has Google Translate Built-In</a> (13.5)</li>
				<li><a href="https://www.dougv.com/2010/07/10/lastpass-a-great-way-to-protect-your-actual-internet-privacy/" rel="bookmark">LastPass: A Great Way To Protect Your Actual Internet Privacy</a> (5)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.</p>
	</div>

	Tags: <a href="https://www.dougv.com/tag/amazon/" title="Amazon" rel="tag">Amazon</a>, <a href="https://www.dougv.com/tag/ethics/" title="ethics" rel="tag">ethics</a>, <a href="https://www.dougv.com/tag/google/" title="Google" rel="tag">Google</a>, <a href="https://www.dougv.com/tag/hacking/" title="hacking" rel="tag">hacking</a>, <a href="https://www.dougv.com/tag/privacy/" title="privacy" rel="tag">privacy</a>, <a href="https://www.dougv.com/tag/reputation/" title="reputation" rel="tag">reputation</a><br />
]]></content:encoded>
			<wfw:commentRss>https://www.dougv.com/2010/11/28/google-search-results-encourage-new-wave-of-negative-customer-service/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ASP.NET Crypto Exploit Patch Now Available Through Windows Update</title>
		<link>https://www.dougv.com/2010/10/01/asp-net-crypto-exploit-patch-now-available-through-windows-update/</link>
		<comments>https://www.dougv.com/2010/10/01/asp-net-crypto-exploit-patch-now-available-through-windows-update/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 13:05:39 +0000</pubDate>
		<dc:creator>Doug Vanderweide</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Scott Guthrie]]></category>
		<category><![CDATA[web server]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://www.dougv.com/blog/?p=3342</guid>
		<description><![CDATA[Scott Guthrie announced yesterday that the hotfix for the ASP.NET cryptographic padding oracle exploit is now available on Windows Update / Windows Server Update Services. Points of note: Persistent authentication cookies will need to be reset after applying the patch. In other words, if your site uses Forms Authentication, all your users will need to [...]<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/09/27/asp-net-crypto-exploit-patch-ships-tuesday-sept-28/" rel="bookmark">ASP.NET Crypto Exploit Patch Ships Tuesday, Sept. 28</a> (58.8)</li>
				<li><a href="https://www.dougv.com/2010/09/24/microsoft-urges-urlscan-implementation-to-combat-crypto-vulnerability/" rel="bookmark">Microsoft Urges URLScan Implementation To Combat Crypto Vulnerability</a> (21.1)</li>
				<li><a href="https://www.dougv.com/2010/09/21/faq-released-for-microsoft-asp-net-cryptographicexception-attack/" rel="bookmark">FAQ Released For Microsoft ASP.NET CryptographicException Attack</a> (19.1)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.
	</div>
]]></description>
			<content:encoded><![CDATA[<p>Scott Guthrie <a href="http://weblogs.asp.net/scottgu/archive/2010/09/30/asp-net-security-fix-now-on-windows-update.aspx" target="_blank">announced yesterday</a> that the hotfix for the <a href="http://www.microsoft.com/technet/security/advisory/2416728.mspx">ASP.NET cryptographic padding oracle exploit</a> is now available on Windows Update / Windows Server Update Services.</p>
<p>Points of note:</p>
<ul>
<li><strong>Persistent authentication cookies will need to be reset after applying the patch.</strong> In other words, if your site uses Forms Authentication, all your users will need to log in again after you apply this patch.</li>
<li><strong>You will still be able to persist Forms Authentications sessions across versions of ASP.NET.</strong> In other words, if you have multiple applications, running multiple versions of ASP.NET, on a given domain, one Forms Authentication login will work for them all, provided they share the same data store for authentication.</li>
<li><strong>If you run a web farm, all versions of ASP.NET must be the same in that farm, and the patch needs to be applied to all machines.</strong></li>
</ul>
<p>All links in this post on delicious: <a href="http://www.delicious.com/dougvdotcom/asp-net-crypto-exploit-patch-now-available-through-windows-update" target="_blank">http://www.delicious.com/dougvdotcom/asp-net-crypto-exploit-patch-now-available-through-windows-update</a></p>
<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/09/27/asp-net-crypto-exploit-patch-ships-tuesday-sept-28/" rel="bookmark">ASP.NET Crypto Exploit Patch Ships Tuesday, Sept. 28</a> (58.8)</li>
				<li><a href="https://www.dougv.com/2010/09/24/microsoft-urges-urlscan-implementation-to-combat-crypto-vulnerability/" rel="bookmark">Microsoft Urges URLScan Implementation To Combat Crypto Vulnerability</a> (21.1)</li>
				<li><a href="https://www.dougv.com/2010/09/21/faq-released-for-microsoft-asp-net-cryptographicexception-attack/" rel="bookmark">FAQ Released For Microsoft ASP.NET CryptographicException Attack</a> (19.1)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.</p>
	</div>

	Tags: <a href="https://www.dougv.com/tag/hacking/" title="hacking" rel="tag">hacking</a>, <a href="https://www.dougv.com/tag/microsoft/" title="Microsoft" rel="tag">Microsoft</a>, <a href="https://www.dougv.com/tag/scott-guthrie/" title="Scott Guthrie" rel="tag">Scott Guthrie</a>, <a href="https://www.dougv.com/tag/web-server/" title="web server" rel="tag">web server</a>, <a href="https://www.dougv.com/tag/windows-server/" title="Windows Server" rel="tag">Windows Server</a><br />
]]></content:encoded>
			<wfw:commentRss>https://www.dougv.com/2010/10/01/asp-net-crypto-exploit-patch-now-available-through-windows-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET Crypto Exploit Patch Ships Tuesday, Sept. 28</title>
		<link>https://www.dougv.com/2010/09/27/asp-net-crypto-exploit-patch-ships-tuesday-sept-28/</link>
		<comments>https://www.dougv.com/2010/09/27/asp-net-crypto-exploit-patch-ships-tuesday-sept-28/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 01:23:48 +0000</pubDate>
		<dc:creator>Doug Vanderweide</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Scott Guthrie]]></category>
		<category><![CDATA[web server]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://www.dougv.com/blog/?p=3338</guid>
		<description><![CDATA[Scott Guthrie noted on his blog that Microsoft will ship, on Tuesday, a hotfix for the ASP.NET cryptographic padding oracle exploit. It is to be released at 10 a.m. PDT; that&#8217;s 1 p.m. EDT / 17:00 GMT. Guthrie says the patch has been fully tested and, once installed, removes the need for the previously published [...]<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/09/24/microsoft-urges-urlscan-implementation-to-combat-crypto-vulnerability/" rel="bookmark">Microsoft Urges URLScan Implementation To Combat Crypto Vulnerability</a> (27.4)</li>
				<li><a href="https://www.dougv.com/2010/09/21/faq-released-for-microsoft-asp-net-cryptographicexception-attack/" rel="bookmark">FAQ Released For Microsoft ASP.NET CryptographicException Attack</a> (24.2)</li>
				<li><a href="https://www.dougv.com/2010/09/18/major-security-hole-in-asp-net-requires-error-redirect-workaround/" rel="bookmark">Major Security Hole In ASP.NET Requires Error Redirect Workaround</a> (22.6)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.
	</div>
]]></description>
			<content:encoded><![CDATA[<p>Scott Guthrie <a href="http://weblogs.asp.net/scottgu/archive/2010/09/27/asp-net-security-update-shipping-tuesday-sept-28th.aspx" target="_blank">noted on his blog</a> that Microsoft will ship, on Tuesday, a <a href="http://www.microsoft.com/technet/security/bulletin/ms10-sep.mspx" target="_blank">hotfix for the ASP.NET cryptographic padding oracle exploit</a>. It is to be released at 10 a.m. PDT; that&#8217;s 1 p.m. EDT / 17:00 GMT.</p>
<p>Guthrie says the patch has been fully tested and, once installed, removes the need for the previously published workarounds. As in, after you install this patch, you can turn off custom errors or use custom error files for specific errors.</p>
<p>Glad Microsoft worked this out so quickly. Don&#8217;t fail to get and apply this patch.</p>
<p>All links in this post on delicious: <a href="http://www.delicious.com/dougvdotcom/asp-net-crypto-exploit-patch-ships-tuesday-sept-28" target="_blank">http://www.delicious.com/dougvdotcom/asp-net-crypto-exploit-patch-ships-tuesday-sept-28</a></p>
<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/09/24/microsoft-urges-urlscan-implementation-to-combat-crypto-vulnerability/" rel="bookmark">Microsoft Urges URLScan Implementation To Combat Crypto Vulnerability</a> (27.4)</li>
				<li><a href="https://www.dougv.com/2010/09/21/faq-released-for-microsoft-asp-net-cryptographicexception-attack/" rel="bookmark">FAQ Released For Microsoft ASP.NET CryptographicException Attack</a> (24.2)</li>
				<li><a href="https://www.dougv.com/2010/09/18/major-security-hole-in-asp-net-requires-error-redirect-workaround/" rel="bookmark">Major Security Hole In ASP.NET Requires Error Redirect Workaround</a> (22.6)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.</p>
	</div>

	Tags: <a href="https://www.dougv.com/tag/hacking/" title="hacking" rel="tag">hacking</a>, <a href="https://www.dougv.com/tag/iis/" title="IIS" rel="tag">IIS</a>, <a href="https://www.dougv.com/tag/microsoft/" title="Microsoft" rel="tag">Microsoft</a>, <a href="https://www.dougv.com/tag/scott-guthrie/" title="Scott Guthrie" rel="tag">Scott Guthrie</a>, <a href="https://www.dougv.com/tag/web-server/" title="web server" rel="tag">web server</a>, <a href="https://www.dougv.com/tag/windows-server/" title="Windows Server" rel="tag">Windows Server</a><br />
]]></content:encoded>
			<wfw:commentRss>https://www.dougv.com/2010/09/27/asp-net-crypto-exploit-patch-ships-tuesday-sept-28/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft Urges URLScan Implementation To Combat Crypto Vulnerability</title>
		<link>https://www.dougv.com/2010/09/24/microsoft-urges-urlscan-implementation-to-combat-crypto-vulnerability/</link>
		<comments>https://www.dougv.com/2010/09/24/microsoft-urges-urlscan-implementation-to-combat-crypto-vulnerability/#comments</comments>
		<pubDate>Sat, 25 Sep 2010 00:22:39 +0000</pubDate>
		<dc:creator>Doug Vanderweide</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Scott Guthrie]]></category>
		<category><![CDATA[web server]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://www.dougv.com/blog/?p=3333</guid>
		<description><![CDATA[In a further update on how to combat the ASP.NET CryptographicException hack, Microsoft is now urging webmasters to use the URLScan utility to further thwart oracle attempts. In a blog post on Friday, Scott Guthrie, corporate vice president of .NET at Microsoft, said the step &#8212; which removes aspxerrorpath as an allowed querystring variable &#8212; [...]<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/09/21/faq-released-for-microsoft-asp-net-cryptographicexception-attack/" rel="bookmark">FAQ Released For Microsoft ASP.NET CryptographicException Attack</a> (24.4)</li>
				<li><a href="https://www.dougv.com/2010/04/29/live-from-the-microsoft-launch-2010-event-in-boston/" rel="bookmark">Live From The Microsoft Launch 2010 Event In Boston</a> (17)</li>
				<li><a href="https://www.dougv.com/2010/09/18/major-security-hole-in-asp-net-requires-error-redirect-workaround/" rel="bookmark">Major Security Hole In ASP.NET Requires Error Redirect Workaround</a> (11)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.
	</div>
]]></description>
			<content:encoded><![CDATA[<p>In a further update on how to combat <a href="microsoft-urges-urlscan-implementation-to-combat-crypto-vulnerability" target="_blank">the ASP.NET CryptographicException hack</a>, Microsoft is now urging webmasters to use the <a href="http://www.iis.net/download/UrlScan" target="_blank">URLScan utility</a> to further thwart oracle attempts.</p>
<p>In <a href="http://weblogs.asp.net/scottgu/archive/2010/09/24/update-on-asp-net-vulnerability.aspx">a blog post on Friday</a>, Scott Guthrie, corporate vice president of .NET at Microsoft, said the step &#8212; which removes <em>aspxerrorpath</em> as an allowed querystring variable &#8212; &#8220;prevents attackers from distinguishing  between the different types of errors occurring on a server – which  helps block attacks using this vulnerability.&#8221;</p>
<p>URLScan is an Internet Information Server (IIS) extension. If you manage your own IIS server, you should follow the instructions at Guthrie&#8217;s blog post to download, install and configure the workaround.</p>
<p>If you are on shared or managed hosting, check with your Web host&#8217;s tech support department to see if they have implemented, or will implement, this step for you.</p>
<p>Again, this is a serious threat that is fully scripted, meaning any malcontent &#8212; including one with no practical programming skill &#8212; can exploit a site with widely available tools.</p>
<p>All links in this post on delicious: <a href="http://www.delicious.com/dougvdotcom/microsoft-urges-urlscan-implementation-to-combat-crypto-vulnerability" target="_blank">http://www.delicious.com/dougvdotcom/microsoft-urges-urlscan-implementation-to-combat-crypto-vulnerability</a></p>
<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/09/21/faq-released-for-microsoft-asp-net-cryptographicexception-attack/" rel="bookmark">FAQ Released For Microsoft ASP.NET CryptographicException Attack</a> (24.4)</li>
				<li><a href="https://www.dougv.com/2010/04/29/live-from-the-microsoft-launch-2010-event-in-boston/" rel="bookmark">Live From The Microsoft Launch 2010 Event In Boston</a> (17)</li>
				<li><a href="https://www.dougv.com/2010/09/18/major-security-hole-in-asp-net-requires-error-redirect-workaround/" rel="bookmark">Major Security Hole In ASP.NET Requires Error Redirect Workaround</a> (11)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.</p>
	</div>

	Tags: <a href="https://www.dougv.com/tag/hacking/" title="hacking" rel="tag">hacking</a>, <a href="https://www.dougv.com/tag/iis/" title="IIS" rel="tag">IIS</a>, <a href="https://www.dougv.com/tag/microsoft/" title="Microsoft" rel="tag">Microsoft</a>, <a href="https://www.dougv.com/tag/scott-guthrie/" title="Scott Guthrie" rel="tag">Scott Guthrie</a>, <a href="https://www.dougv.com/tag/web-server/" title="web server" rel="tag">web server</a>, <a href="https://www.dougv.com/tag/windows-server/" title="Windows Server" rel="tag">Windows Server</a><br />
]]></content:encoded>
			<wfw:commentRss>https://www.dougv.com/2010/09/24/microsoft-urges-urlscan-implementation-to-combat-crypto-vulnerability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

