<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title><![CDATA[[SecurityRatty] tag: thread]]></title>
    <link>http://securityratty.com/tag/thread</link>
    <description></description>
    <pubDate>Wed, 30 Jul 2008 09:46:00 +0000</pubDate>
    <generator>iRatty Engine</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <item>
      <title><![CDATA[Learning From Sarah Palins Yahoo Mail Compromise]]></title>
      <link>http://securityratty.com/article/e9950fb79770bdb2ef7e55345529ce18</link>
      <guid>http://securityratty.com/article/e9950fb79770bdb2ef7e55345529ce18</guid>
      <description><![CDATA[The password reset functionality of any online service is a major source of risk . They are especially problematic when they use only a secret question concerning personal information only and dont...]]></description>
      <content:encoded><![CDATA[<p><strong>The password reset functionality of any online service is a major source of risk</strong>.  They are especially problematic when they use only a &#8220;secret question&#8221; concerning personal information only and don&#8217;t tie back to another email account or a text message.  Another account or cell phone number is something &#8220;out of band&#8221; from a direct transaction with the online service.  It becomes 2-factor authentication.</p>
<p>When an alternate email account or cell phone number is not tied to an account, online services often use personal information, supposedly only known by the account holder, to verify identity and reset a password. The risk here is the personal information is often known to other individuals and if the account holder is a public figure then the information may be easily researched.  <strong>Birthdays, names of pets, locations of homes, schools, and events can often be discovered online or guessed.</strong> </p>
<p><a href="http://www.theregister.co.uk/2005/02/21/paris_hacked/">Paris Hilton&#8217;s T-Mobile account</a>, and thus all her Sidekick cell phone contents which were mirrored online, was compromised when someone &#8220;guessed&#8221; the answer to her secret question.  The secret questions was, &#8220;What is your pet&#8217;s name.&#8221; The answer of course was, &#8220;Tinkerbell&#8221;.  Something easily researched.  Many people would not have their pet&#8217;s name online but friends, family members, or perhaps an ex would know the answer.  Using a pet&#8217;s name is a very bad security practice.</p>
<p>Now we have Sarah Palin, another public figure, having her online account compromised because someone <a href="http://michellemalkin.com/2008/09/17/the-story-behind-the-palin-e-mail-hacking/">used the password reset functionality and guessed the answer to Sarah Palin&#8217;s secret question</a>. This is how the attacker says he found out her personal information and guessed the answer to her secret question. He details this on 4chan.org:</p>
<blockquote><p>rubico 09/17/08(Wed)12:57:22 No.85782652</p>
<p>Hello, /b/ as many of you might already know, last night sarah palin’s yahoo was “hacked” and caps were posted on /b/, i am the lurker who did it, and i would like to tell the story.</p>
<p>In the past couple days news had come to light about palin using a yahoo mail account, it was in news stories and such, a thread was started full of newfags trying to do something that would not get this off the ground, for the next 2 hours the acct was locked from password recovery presumably from all this bullshit spamming.</p>
<p>after the password recovery was reenabled, it took seriously 45 mins on wikipedia and google to find the info, Birthday? 15 seconds on wikipedia, zip code? well she had always been from wasilla, and it only has 2 zip codes (thanks online postal service!)</p>
<p>the second was somewhat harder, the question was “where did you meet your spouse?” did some research, and apparently she had eloped with mister palin after college, if youll look on some of the screenshits that I took and other fellow anon have so graciously put on photobucket you will see the google search for “palin eloped” or some such in one of the tabs.</p>
<p>I found out later though more research that they met at high school, so I did variations of that, high, high school, eventually hit on “Wasilla high” I promptly changed the password to popcorn and took a cold shower…</p></blockquote>
<p><strong>Best practices for setting up the password reset functionality of any online service:</strong></p>
<ol>
<li>Tie an account to another email account or cell phone number if that is an option. This will cause the service to send an out of band message and in essence make the password reset a 2-factor authentication.</li>
<li>Do not use any personal information that can be guessed as the answers to secret questions. Treat these answers like passwords. Don&#8217;t use dictionary words. Add some numbers or symbols to the answer. For example is Sarah Palin had used &#8220;Wasilla high 1964&#8243; or &#8220;!Wasilla high!&#8221; it is far less likely it would be guessed.  Pick a scheme to modify your secret answers so they aren&#8217;t guessable.</li>
<li>Try resetting your password.  See if there are downgrade attacks which make it easier to reset the password.  Yahoo for instance will allow you to specify that you don&#8217;t have access to the email address tied to your account and thus not send a password reset email.  Since an attacker can do this the safety of using another account is eliminated thus making the answers to the secret question all that more important.</li>
<p>
</ol>
]]></content:encoded>
      <pubDate>Thu, 18 Sep 2008 09:31:56 +0000</pubDate>
      <category domain="http://securityratty.com/tag/password reset email">password reset email</category>
      <category domain="http://securityratty.com/tag/reset">reset</category>
      <category domain="http://securityratty.com/tag/password reset functionality">password reset functionality</category>
      <category domain="http://securityratty.com/tag/service">service</category>
      <category domain="http://securityratty.com/tag/online postal service">online postal service</category>
      <category domain="http://securityratty.com/tag/password reset">password reset</category>
      <category domain="http://securityratty.com/tag/online">online</category>
      <category domain="http://securityratty.com/tag/online service">online service</category>
      <category domain="http://securityratty.com/tag/password">password</category>
      <source url="http://www.veracode.com/blog/2008/09/learning-from-sarah-palin-yahoo-email-compromise/">Learning From Sarah Palins Yahoo Mail Compromise</source>
    </item>
    <item>
      <title><![CDATA[The opt-out from hell]]></title>
      <link>http://securityratty.com/article/e2ac86231138c2d34a97b7acfc4cd2ec</link>
      <guid>http://securityratty.com/article/e2ac86231138c2d34a97b7acfc4cd2ec</guid>
      <description><![CDATA[One problem with making your email address available (which I will continue to do, don't worry) is that folks with something to sell assume you're interested in their stuff. To wit, let's consider an...]]></description>
      <content:encoded><![CDATA[<p>One problem with making your email address available (which I will continue to do, don't worry) is that folks with something to sell assume you're interested in their stuff. To wit, let's consider an email I received today (copied, headers and all, after my griping).</p>  <p>Note that if I want to opt out of further communications, I have to do <em>two separate things</em> -- which actually becomes three things.</p>  <ul>   <li>First I have to click the last link to opt out of future TechTarget spam. (Yes, I deleted the actual links. But certainly none of <em>my</em> trustworthy readers would attempt to re-subscribe me, right...? &lt;g&gt; </li>    <li>But that isn't enough -- I <em>also</em> have to separately opt out of future Avaya spam! (Why does the no-more-from-Avaya link live on a techtargetmail.com server? Whatever.) Clicking on that link eventually does land me on an avaya.com page, where I have to confirm my email address and indicate they don't have my permission to send me spam. Hmm, too difficult to embed my email in that link, when the other techtargetmail.com link <em>did</em> embed my email? </li>    <li>Then after submitting it, another page pops up telling me that I'll soon receive an email with <em>additional</em> instructions! In this email there's a link -- to avaya.com with my email address embedded -- that I must click, I guess to double plus confirm that yes, I really really really do wish never to hear from you again. Clicking that link takes me to a page that promises my &quot;permissions have successfully been set. Thank you.&quot; </li> </ul>  <p>A pox on both your houses, TechTarget and Avaya. I never asked for your stuff. Go away.</p>  <p>Spam, my friends, is only going to <a href="http://www.washingtonpost.com/wp-dyn/content/article/2008/09/12/AR2008091201211.html?hpid=topnews" target="_blank">get</a> <a href="http://voices.washingtonpost.com/securityfix/2008/09/virginia_anti-spam_law_overtur.html?hpid=news-col-blogs" target="_blank">worse</a>. It was so easy to <a href="http://en.wikipedia.org/wiki/Junk_fax" target="_blank">ban junk faxes</a> in 1991. But even those regulations were <a href="http://en.wikipedia.org/wiki/Junk_Fax_Prevention_Act_of_2005" target="_blank">weakened in 2005</a>. So do you really think we'll see anything even remotely logical for outlawing spam? I doubt it, unless we the citizens foment a revolt. Let's get cracking! </p>  <p>&#160;</p>  <hr />  <p><font face="Courier New" size="2">Received: from SVC-EXGWY-E801.partners.extranet.microsoft.com (10.251.24.242)      <br />by tk5-exhub-c102.redmond.corp.microsoft.com (157.54.18.53) with Microsoft       <br />SMTP Server (TLS) id 8.1.291.1; Tue, 16 Sep 2008 11:27:56 -0700       <br />Received: from mail139-wa4-R.bigfish.com (216.32.181.113) by       <br />mail04.microsoft.com (10.253.160.184) with Microsoft SMTP Server (TLS) id       <br />8.1.291.1; Tue, 16 Sep 2008 11:27:55 -0700       <br />Received: from mail139-wa4 (localhost.localdomain [127.0.0.1])&#160;&#160;&#160; by       <br />mail139-wa4-R.bigfish.com (Postfix) with ESMTP id 018C11184C2&#160;&#160;&#160; for       <br />&lt;steriley@microsoft.com&gt;; Tue, 16 Sep 2008 18:27:50 +0000 (UTC)       <br />X-BigFish: ps16(zz18c1K1936K2b7wcak69jzzzz2af1jz2fh6bh5eh65h)       <br />X-Spam-TCS-SCL: 4:0       <br />Received: by mail139-wa4 (MessageSwitch) id 1221589667478982_28100; Tue, 16       <br />Sep 2008 18:27:47 +0000 (UCT)       <br />Received: from pp.techtargetmail.com (pp.techtargetmail.com [65.211.80.227])       <br />&#160;&#160;&#160; by mail139-wa4.bigfish.com (Postfix) with SMTP id 46566978071&#160;&#160;&#160; for       <br />&lt;steriley@microsoft.com&gt;; Tue, 16 Sep 2008 18:27:47 +0000 (UTC)       <br />DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=pp.techtargetmail.com; b=iOmibOrM91/1Ugy2gj3QbWo74T2m3GuhmwxZCXJQpFT+nwRES8QKg+4vjt48SNp7WWJExG61Ge+DtnKD3KVI3KwqTKzkPRVrEBF0DCHhYot6VAG/EyEr5vb5RhBz+91yvNhbIqITzGnuQ+uBDJzyc6gU0FHfBl0Fa3S/phcPELM=;       <br />Message-ID: &lt;a818b044.724694.236c8ee748f7dd97.1.n.4.2971370188@pp.techtargetmail.com&gt;       <br />Date: Tue, 16 Sep 2008 14:27:47 -0400       <br />thread-index: a818b044.724694.236c8ee748f7dd97.1.n.4       <br />Reply-To: Avaya &lt;a818b044.724694.236c8ee748f7dd97.1.n.4@pp.techtargetmail.com&gt;       <br />From: Avaya &lt;Avaya@pp.techtargetmail.com&gt;       <br />To: Steve Riley &lt;steriley@microsoft.com&gt;       <br />Subject: 7 Tips to Ensure Readiness for UC Deployment       <br />MIME-Version: 1.0       <br />Content-Type: text/plain       <br />Content-Transfer-Encoding: 7bit       <br />Content-Class: urn:content-classes:message       <br />Importance: normal       <br />Priority: normal       <br />X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4133       <br />Return-Path: a818b044.724694.236c8ee748f7dd97.1.n.4@pp.techtargetmail.com       <br />X-MS-Exchange-Organization-PRD: pp.techtargetmail.com       <br />Received-SPF: Pass (SVC-EXGWY-E801.partners.extranet.microsoft.com: domain       <br />of Avaya@pp.techtargetmail.com designates 65.211.80.227 as permitted sender)       <br />receiver=SVC-EXGWY-E801.partners.extranet.microsoft.com;       <br />client-ip=65.211.80.227; helo=mail139-wa4-R.bigfish.com;       <br />X-MS-Exchange-Organization-PCL: 2       <br />X-MS-Exchange-Organization-Antispam-Report: DV:3.3.6916.600;SV:3.3.6916.813;SID:SenderIDStatus Pass;OrigIP:65.211.80.227       <br />X-MS-Exchange-Organization-SCL: 2       <br />X-MS-Exchange-Organization-SenderIdResult: PASS</font></p>  <p><font face="Courier New" size="2">The following message was sent to you as a subscriber to third party offers from a TechTarget property, including our network of Search sites, Bitpipe.com, CIO Decisions Magazine, Information Security Magazine, Storage Magazine, KnowledgeStorm, TheServerSide.com and/or TheServerSide.NET. To unsubscribe, see below.      <br />____________________________________________________________ </font></p>  <p><font face="Courier New" size="2">How should you evaluate the move to unified communications (UC)? Who within which parts of an organization will benefit? Will UC reduce the time to market? Read this E-Guide for answers to these questions and a better look at how the value of UC will, at first, be less of a financial issue and more of a productivity improvement issue that translates into financial benefits. Download this white paper now: </font><a href="http://pp.techtargetmail.com/c.asp?724694&amp;236c8ee748f7dd97&amp;1"><font face="Courier New" size="2">http://pp.techtargetmail.com/c.asp?724694&amp;236c8ee748f7dd97&amp;1</font></a></p>  <p><font face="Courier New" size="2">When implementing unified communications, there are a number of important issues to think about and questions to ask. This E-Guide analyzes seven phases to ensure you reap the full benefits of UC in each. If you're ready to take the plunge but you're not sure your business or your infrastructure is - download this E-Guide now. </font></p>  <p><font face="Courier New" size="2">Click here to learn more: </font><a href="http://pp.techtargetmail.com/c.asp?724694&amp;236c8ee748f7dd97&amp;1"><font face="Courier New" size="2">http://pp.techtargetmail.com/c.asp?724694&amp;236c8ee748f7dd97&amp;1</font></a></p>  <p><font face="Courier New" size="2">&quot;If you do not wish to receive future promotions directly from Avaya please forward this e-mail to <u>{link removed}</u> ; please note that there is a separate opt-out procedure below to be removed from the list from which this email originated.&quot;       <br />____________________________________________________________ </font></p>  <p><font face="Courier New" size="2">Please do not reply to this email.&#160; To unsubscribe from all future third party offers from all TechTarget properties, simply click here: <u>{link removed}</u></font></a></p>  <p><font face="Courier New" size="2">TechTarget | 117 Kendrick Street, Suite 800 | Needham, MA 02494</font> </p>  <hr /><img src="http://blogs.technet.com/aggbug.aspx?PostID=3124873" width="1" height="1">]]></content:encoded>
      <pubDate>Tue, 16 Sep 2008 15:22:03 +0000</pubDate>
      <category domain="http://securityratty.com/tag/smtp server">smtp server</category>
      <category domain="http://securityratty.com/tag/server">server</category>
      <category domain="http://securityratty.com/tag/smtp">smtp</category>
      <category domain="http://securityratty.com/tag/x-spam-tcs-scl">x-spam-tcs-scl</category>
      <category domain="http://securityratty.com/tag/spam">spam</category>
      <category domain="http://securityratty.com/tag/future avaya spam">future avaya spam</category>
      <category domain="http://securityratty.com/tag/email">email</category>
      <category domain="http://securityratty.com/tag/microsoft smtp server">microsoft smtp server</category>
      <category domain="http://securityratty.com/tag/avaya">avaya</category>
      <source url="http://blogs.technet.com/steriley/archive/2008/09/16/the-opt-out-from-hell.aspx">The opt-out from hell</source>
    </item>
    <item>
      <title><![CDATA[A Costly Crush]]></title>
      <link>http://securityratty.com/article/cafa2263c602a0dce807786d68e28098</link>
      <guid>http://securityratty.com/article/cafa2263c602a0dce807786d68e28098</guid>
      <description><![CDATA[I've seen a few blog posts over the last couple of days, with people complaining about an application on Facebook charging them crazy amounts of money. Certainly, there's a lot of angry Facebook users...]]></description>
      <content:encoded><![CDATA[
        I've seen a few <a href="http://www.sokhodom.com/2008-09-02-bad-facebook-application-lead-to-heavy-phone-bill/">blog posts</a> over the last couple of days, with people complaining about an application on Facebook charging them crazy amounts of money. Certainly, there's a lot of angry Facebook users out there:<br /><br /><br /><div align="center"><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://blog.spywareguide.com/images/crushtracker01.html" onclick="window.open('http://blog.spywareguide.com/images/crushtracker01.html','popup','width=387,height=448,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://blog.spywareguide.com/images/crushtracker0-thumb-287x332.gif" alt="crushtracker0.gif" class="mt-image-none" style="" height="332" width="287" /></a></span>
<br />Click to Enlarge<br /></div><br />Some more complaints? Sure, I can do that:<br /><br /><div align="center"><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="hugecrush1.gif" src="http://blog.spywareguide.com/images/hugecrush1.gif" class="mt-image-none" style="" height="347" width="309" /></span></div><br /><br /><div align="left">There are many, many more like the above comments out there. One slight problem with all of this is that the complaints are scattered across a whole range of different Crush application forums - in short, they're <i>all</i> being blamed, but they can't <i>all</i> be doing this, can they? What's the alternative, though?<br /><br />A short while ago, I wrote about <a href="http://blog.spywareguide.com/2008/07/interesting-advert-placements.html">deceptive advert placements</a> with regards another facebook application. It seems we have a similar situation here, where an "enterprising" Ad network is placing Facebook-style buttons onto installer pages and hoping people will be fooled. As it turns out, it seems to be working. While attempting to install one randomly selected Crush application, I noticed the following advert at the top of the installer splash (highlighted in red):<br /><br /><div align="center"><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://blog.spywareguide.com/images/hugecrush3.html" onclick="window.open('http://blog.spywareguide.com/images/hugecrush3.html','popup','width=660,height=320,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://blog.spywareguide.com/images/hugecrush3-thumb-360x174.gif" alt="hugecrush3.gif" class="mt-image-none" style="" height="174" width="360" /></a></span><br />Click to Enlarge<br /></div><br />It's easy to imagine a regular Facebook user thinking this is part of the application install and clicking "Ok". Do that, and you're taken to a site called Amazingchat(dot)net that throws up a fake message regarding you having "7 New Crush Messages" (and uses geolocational technology to point a targeted message your way). If you look like you're in the UK, you'll see this:<br /><br /><div align="center"><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://blog.spywareguide.com/images/hugecrush41.html" onclick="window.open('http://blog.spywareguide.com/images/hugecrush41.html','popup','width=662,height=404,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://blog.spywareguide.com/images/hugecrush4-thumb-362x220.gif" alt="hugecrush4.gif" class="mt-image-none" style="" height="220" width="362" /></a></span><br />Click to Enlarge<br /></div><br />Wow, FOUR of my (fake and non-existent) messages are from Sheffield! How about if I look like I'm in the States? You've guessed it....<br /><br /><div align="center"><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="hugecrush5.gif" src="http://blog.spywareguide.com/images/hugecrush5.gif" class="mt-image-none" style="" height="42" width="318" /></span></div>
<br /><br />Windy City, here I come!<br /><br />Not. It's looking promising so far, though. If we can just go to the next screen and see something utterly useless advertised in exchange for lots of money....<br /><br /><div align="center"><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://blog.spywareguide.com/images/hugecrush666.html" onclick="window.open('http://blog.spywareguide.com/images/hugecrush666.html','popup','width=552,height=371,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://blog.spywareguide.com/images/hugecrush666-thumb-352x236.gif" alt="hugecrush666.gif" class="mt-image-none" style="" height="236" width="352" /></a></span><br />Click to Enlarge<br /></div><br />Horoscopes for only ?9 / $15 a week? WOW!<br /><br />Also, there go your savings.<br /><br />Could this be the site at the heart of so many complaints? Well, let's quickly check who runs it...<br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="hugecrush7.gif" src="http://blog.spywareguide.com/images/hugecrush7.gif" class="mt-image-none" style="" height="140" width="587" /></span><br /><br />"Sms-helpdesk", eh? I do believe I've seen a <a href="http://www.facebook.com/topic.php?uid=4874299673&amp;topic=3908">long thread</a> concerning people having issues with large bills for phone messages. Indeed, a rep from sms-helpdesk actually appears to be posting there:<br /><br /><div align="center"><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="hugecrush8.gif" src="http://blog.spywareguide.com/images/hugecrush8.gif" class="mt-image-none" style="" height="479" width="370" /></span></div><br /><br />Shame it seems some people can't even get through to the supposed helpline. Perhaps "Denise" would be better off tackling the deceptive placement of adverts made to look like installer buttons, not to mention non-existent crush messages based around geolocational targeting?<br /><br />Just a thought...<br /></div>
        
    ]]></content:encoded>
      <pubDate>Tue, 02 Sep 2008 11:24:54 +0000</pubDate>
      <category domain="http://securityratty.com/tag/application">application</category>
      <category domain="http://securityratty.com/tag/facebook application">facebook application</category>
      <category domain="http://securityratty.com/tag/crush application">crush application</category>
      <category domain="http://securityratty.com/tag/facebook">facebook</category>
      <category domain="http://securityratty.com/tag/application install">application install</category>
      <category domain="http://securityratty.com/tag/regular facebook user">regular facebook user</category>
      <category domain="http://securityratty.com/tag/crush application forums">crush application forums</category>
      <category domain="http://securityratty.com/tag/angry facebook users">angry facebook users</category>
      <category domain="http://securityratty.com/tag/crush messages">crush messages</category>
      <source url="http://blog.spywareguide.com/2008/09/a-costly-crush.html">A Costly Crush</source>
    </item>
    <item>
      <title><![CDATA[The Bot Hunter: An Event Processing Challenge]]></title>
      <link>http://securityratty.com/article/ad344d30f5d4c2ad499d08baf386a23b</link>
      <guid>http://securityratty.com/article/ad344d30f5d4c2ad499d08baf386a23b</guid>
      <description><![CDATA[Recently we penned The Attack of the Spiders from the Clouds where we mentioned how cloud computing infrastructures can be used to stage malicous or accidential network attacks
Today I challenge our...]]></description>
      <content:encoded><![CDATA[<p>Recently we penned <a href="http://www.thecepblog.com/2008/07/31/the-attack-of-the-spiders-from-the-clouds/" target="_blank">The Attack of the Spiders from the Clouds</a> where we mentioned how cloud computing infrastructures can be used to stage malicous or accidential network attacks.</p>
<p>Today I challenge our CEP/ESP/EP vendors (or SIs) to create the following solution to detect and block rogue bots on Apache web sites.   I will install and test each submitted solution on <a href="http://www.unix.com" target="_blank">The UNIX Forums</a> and post the results here.</p>
<p>Here are some basic requirements:</p>
<ol>
<li>Your solution must run on Linux and be installable and configurable remotely with SSH or HTTP.  There will be no physical access to the server. No exceptions.</li>
<li>Preferrably, the configuration can be done with a Web-Based Interface (WBI) - a browser.</li>
<li>Your solution will listen to continuous updates to the Apache2 access log, exact location configurable in your solution, and identify robots ( bots), also known as spiders, from the log.</li>
<li>Your solution will provide a confidence metric, key indicator (KI), for each bot detected, from 0 to 10, where 10 indicates &#8220;absolutely a bot,&#8221; 0 is &#8220;absolutely not a bot.&#8221;</li>
<li>Your solution will update the IP address of each bot and KI you identify in a file/table called, for example, ./bot_scorecard.txt where each line is an IP address of a bot, followed by a semicolon (or other delimiter of your choice) and the confidence factor, for example,  10.0.0.1;10 means that 10.0.0.1 is a bot, 100% sure.</li>
<li>Your solution must compare bots detected to a file/table called, for example, ./bots_allowed.txt and ./bots_denied.txt that are in the format IP address/mask, for example 10.0.0.1/24, or 10.0.0.1/32.</li>
<li>If the KI &#8220;confidence factor&#8221; of the IP address of your detected bot is higher than the tunable &#8220;is a bot&#8221; KI, then your solution should update the tables/files and then call iptables and block the bot.</li>
<li>It should send an email to one or more email addresses with a message, for example:  &#8220;New Bot Detected - Confidence 8&#8243; with IP address, etc. in the message.  Another example would be an email, &#8220;Bot Blocked&#8221; - with details, etc.</li>
<li>You cannot automatically block any traffic that is not a bot.  Blocking one &#8220;non-bot&#8221; results in failure, no exceptions.</li>
<li>The Prize:  The winner will get their logo (w/link) on this site in a block called &#8220;Bot Hunter Winner&#8221; (or something like that.)</li>
</ol>
<p>These are some basic requirements; I don&#8217;t want to restrict your thinking or solution, so be creative!  Feel free to ask any questions in the comment section of this thread.</p>
<p>Remember, sometimes you may have to manage the state of IP addresses for days, or hours, before you can accurately deterimine if it is a bot based on behavior alone.   So, you will need to work with both long and short time windows.  Latency is not important. Detection accurate is importance.</p>
<p>Anyone care to submit a solution for testing?</p>
]]></content:encoded>
      <pubDate>Fri, 15 Aug 2008 05:35:00 +0000</pubDate>
      <category domain="http://securityratty.com/tag/bot">bot</category>
      <category domain="http://securityratty.com/tag/winner">winner</category>
      <category domain="http://securityratty.com/tag/bot hunter winner">bot hunter winner</category>
      <category domain="http://securityratty.com/tag/bot based">bot based</category>
      <category domain="http://securityratty.com/tag/non-bot results">non-bot results</category>
      <category domain="http://securityratty.com/tag/results">results</category>
      <category domain="http://securityratty.com/tag/bot scorecard">bot scorecard</category>
      <category domain="http://securityratty.com/tag/solution">solution</category>
      <category domain="http://securityratty.com/tag/block rogue bots">block rogue bots</category>
      <source url="http://www.thecepblog.com/2008/08/15/the-bot-hunter-an-event-processing-challenge/">The Bot Hunter: An Event Processing Challenge</source>
    </item>
    <item>
      <title><![CDATA[BlackHat Recap]]></title>
      <link>http://securityratty.com/article/bec2ea65daab94e0e7001ef1ba7b1b9a</link>
      <guid>http://securityratty.com/article/bec2ea65daab94e0e7001ef1ba7b1b9a</guid>
      <description><![CDATA[Another BlackHat has come and gone. As usual, it was a very busy week juggling customer meetings, recruiting, conference planning, vendor parties, and, oh yes, the actual BlackHat presentations. I had...]]></description>
      <content:encoded><![CDATA[<p>Another BlackHat has come and gone.  As usual, it was a very busy week juggling customer meetings, recruiting, conference planning, vendor parties, and, oh yes, the actual BlackHat presentations.  I had a fantastic time catching up with old friends and finally getting the opportunity to meet more of the <a href="http://n0where.org/security-twits/">Security Twits</a> and others in the security community.  I didn&#8217;t submit a talk this year, but nevertheless, fake Dan Kaminsky was still excited to see me.</p>
<p><a href="http://www.veracode.com/blog/wp-content/uploads/2008/08/chris_2742966251_1b47297b33_b.jpg"><center><img src="http://www.veracode.com/blog/wp-content/uploads/2008/08/chris_2742966251_1b47297b33_b-300x225.jpg" alt="" title="chris_2742966251_1b47297b33_b" width="300" height="225" class="aligncenter size-medium wp-image-215 photoborder" /></center></a></p>
<p>My favorite talk, as expected, was the Sotirov/Dowd talk on <a href="http://taossa.com/archive/bh08sotirovdowd.pdf">How To Impress Girls With Browser Memory Protection Bypasses</a>.  The attack is a conceptually simple, yet completely reliable technique for exploiting vulnerabilities in web browsers.  Of course, the media has <a href="http://searchsecurity.techtarget.com/news/article/0,289142,sid14_gci1324395,00.html">sensationalized </a> the impact of their findings, but ultimately, this is still significant as far as browser-based exploits are concerned.  It&#8217;s worth mentioning that part of the technique allowing them to load a .NET DLL at an arbitrary location under Vista was reliant on an implementation bug wherein the OS disables ASLR if the version in the .NET COR header was below a certain value.  However, the address space spraying and stack spraying techniques are likely to be extended to other platforms utilizing similar memory protection mechanisms.  </p>
<p>As for the girls?  I can report first-hand that the ladies at TAO on Wednesday night were hanging on <a href="http://twitter.com/alexsotirov">Alex</a>&#8217;s every word.  They were particularly impressed when he whipped out the laptop for a live demo.  Unfortunately, none of the dozen iPhone owners in the immediate vicinity thought to snap a picture (too busy Twittering).  Oh well.  </p>
<p>I also enjoyed Hovav Shacham&#8217;s talk on return-oriented programming.  Simply put, he described a generalization of the return-to-libc shellcode approach with the intent to demonstrate that one could achieve Turing-complete computation using &#8220;found code&#8221; in process images.  By chaining together series of mini-computations ending in return (RET) instructions, it was possible to build higher-level programming constructs such as branches and loops.  The nature of the x86 instruction set provides some flexibility because instructions are interpreted differently depending on how you align the instruction pointer (i.e. the old shellcode trick of searching the process image for any JMP EBX instruction and using that as your EIP).  In RISC architectures such as SPARC, however, you don&#8217;t have that luxury; if your %pc isn&#8217;t aligned properly you get a bus error.  So it was quite interesting to see that they were able to extend the concept to RISC.  The practicality of the attack technique is limited by the fact that the shellcode is tuned to a particular binary image &#8212; if the shellcode was built using instructions extrapolated from glibc 2.3.5, it won&#8217;t work for a system running glibc 2.4.  </p>
<p>I thought Scott Stender&#8217;s talk on <a href="http://isecpartners.com/files/iSEC%20Partners%20-%20Concurrency%20Attacks%20in%20Web%20Applications.pdf">Concurrency Attacks in Web Applications</a> was interesting as well.  In a nutshell, spewing thousands of simultaneous requests at web application transactions that are not thread-safe can create interesting problems.  In the presentation, Scott ran his demo against a VM running on the attack machine.  I found myself wondering how effective the same attack would be over the Internet &#8212; would it be significantly less reliable (or not at all)?  Race conditions are generally easier to exploit locally than remotely due to more predictable execution conditions.  Certainly this is an under-tested vulnerability class though.</p>
<p>One presentation I wasn&#8217;t able to attend but want to follow up on is <a href="http://twitter.com/nate_mcfeters">Nate McFeters</a>, John Heasman, and Rob Carter&#8217;s talk which discussed the GIFAR attack I&#8217;ve been hearing so much about lately.  The gist is that you can create a file that is both a valid GIF and a valid JAR, then use some Java applet tricks to initiate HTTP requests on behalf of the victim.  </p>
<p>Finally, the <a href="http://pwnie-awards.org/2008/">Pwnie Awards</a> didn&#8217;t fail to disappoint.  Drama ensued over the Most Overhyped award, but at least this year some of the winners showed up to claim their awards!  <a href="http://twitter.com/halvarflake">Halvar</a> rapping Symantec lyrics was also quite memorable.</p>
<p>All in all, a fun and informative week, but as usual, I was relieved to get the hell out of Vegas and head home on Friday morning. </p>
<p>P.S. For a much more entertaining BlackHat/Defcon Recap, read <a href="http://securityuncorked.net/2008/08/anecdotes-blackhat-defcon/">Jennifer Jabbusch&#8217;s account</a> of the week&#8217;s events.  It&#8217;s my favorite one so far!</p>
]]></content:encoded>
      <pubDate>Tue, 12 Aug 2008 18:43:18 +0000</pubDate>
      <category domain="http://securityratty.com/tag/favorite">favorite</category>
      <category domain="http://securityratty.com/tag/favorite talk">favorite talk</category>
      <category domain="http://securityratty.com/tag/talk">talk</category>
      <category domain="http://securityratty.com/tag/sotirovdowd talk">sotirovdowd talk</category>
      <category domain="http://securityratty.com/tag/scott stenders talk">scott stenders talk</category>
      <category domain="http://securityratty.com/tag/completely reliable technique">completely reliable technique</category>
      <category domain="http://securityratty.com/tag/reliable">reliable</category>
      <category domain="http://securityratty.com/tag/attack">attack</category>
      <category domain="http://securityratty.com/tag/technique">technique</category>
      <source url="http://www.veracode.com/blog/?p=202">BlackHat Recap</source>
    </item>
    <item>
      <title><![CDATA[BlackHat Recap]]></title>
      <link>http://securityratty.com/article/6b779e65a6ad790dd8e631057208ff77</link>
      <guid>http://securityratty.com/article/6b779e65a6ad790dd8e631057208ff77</guid>
      <description><![CDATA[Another BlackHat has come and gone. As usual, it was a very busy week juggling customer meetings, recruiting, conference planning, vendor parties, and, oh yes, the actual BlackHat presentations. I had...]]></description>
      <content:encoded><![CDATA[<p>Another BlackHat has come and gone.  As usual, it was a very busy week juggling customer meetings, recruiting, conference planning, vendor parties, and, oh yes, the actual BlackHat presentations.  I had a fantastic time catching up with old friends and finally getting the opportunity to meet more of the <a href="http://n0where.org/security-twits/">Security Twits</a> and others in the security community.  I didn&#8217;t submit a talk this year, but nevertheless, <a href="http://flickr.com/photos/fakedankaminsky/">fake Dan Kaminsky</a> was still excited to see me.</p>
<p><a href="http://www.veracode.com/blog/wp-content/uploads/2008/08/chris_2742966251_1b47297b33_b.jpg"><center><img src="http://www.veracode.com/blog/wp-content/uploads/2008/08/chris_2742966251_1b47297b33_b-300x225.jpg" alt="" title="chris_2742966251_1b47297b33_b" width="300" height="225" class="aligncenter size-medium wp-image-215 photoborder" /></center></a></p>
<p>My favorite talk, as expected, was the Sotirov/Dowd talk on <a href="http://taossa.com/archive/bh08sotirovdowd.pdf">How To Impress Girls With Browser Memory Protection Bypasses</a>.  The attack is a conceptually simple, yet completely reliable technique for exploiting vulnerabilities in web browsers.  Of course, the media has <a href="http://searchsecurity.techtarget.com/news/article/0,289142,sid14_gci1324395,00.html">sensationalized</a> the impact of their findings, but ultimately, this is still significant as far as browser-based exploits are concerned (here is a <a href="http://blogs.zdnet.com/Bott/?p=513">more accurate report</a>).  It&#8217;s worth mentioning that part of the technique allowing them to load a .NET DLL at an arbitrary location under Vista was reliant on an implementation bug wherein the OS disables ASLR if the version in the .NET COR header was below a certain value.  However, the address space spraying and stack spraying techniques are likely to be extended to other platforms utilizing similar memory protection mechanisms.  </p>
<p>As for the girls?  I can report first-hand that the ladies at TAO on Wednesday night were hanging on <a href="http://twitter.com/alexsotirov">Alex</a>&#8217;s every word.  They were particularly impressed when he whipped out the laptop for a live demo.  Unfortunately, none of the dozen iPhone owners in the immediate vicinity thought to snap a picture (too busy Twittering).  Oh well.  </p>
<p>I also enjoyed Hovav Shacham&#8217;s talk on return-oriented programming.  Simply put, he described a generalization of the return-to-libc shellcode approach with the intent to demonstrate that one could achieve Turing-complete computation using &#8220;found code&#8221; in process images.  By chaining together series of mini-computations ending in return (RET) instructions, it was possible to build higher-level programming constructs such as branches and loops.  The nature of the x86 instruction set provides some flexibility because instructions are interpreted differently depending on how you align the instruction pointer (i.e. the old shellcode trick of searching the process image for any JMP EBX instruction and using that as your EIP).  In RISC architectures such as SPARC, however, you don&#8217;t have that luxury; if your %pc isn&#8217;t aligned properly you get a bus error.  So it was quite interesting to see that they were able to extend the concept to RISC.  The practicality of the attack technique is limited by the fact that the shellcode is tuned to a particular binary image &#8212; if the shellcode was built using instructions extrapolated from glibc 2.3.5, it won&#8217;t work for a system running glibc 2.4.  </p>
<p>I thought Scott Stender&#8217;s talk on <a href="http://isecpartners.com/files/iSEC%20Partners%20-%20Concurrency%20Attacks%20in%20Web%20Applications.pdf">Concurrency Attacks in Web Applications</a> was interesting as well.  In a nutshell, spewing thousands of simultaneous requests at web application transactions that are not thread-safe can create interesting problems.  In the presentation, Scott ran his demo against a VM running on the attack machine.  I found myself wondering how effective the same attack would be over the Internet &#8212; would it be significantly less reliable (or not at all)?  Race conditions are generally easier to exploit locally than remotely due to more predictable execution conditions.  Certainly this is an under-tested vulnerability class though.</p>
<p>One presentation I wasn&#8217;t able to attend but want to follow up on is <a href="http://twitter.com/nate_mcfeters">Nate McFeters</a>, John Heasman, and Rob Carter&#8217;s talk which discussed the GIFAR attack I&#8217;ve been hearing so much about lately.  The gist is that you can create a file that is both a valid GIF and a valid JAR, then use some Java applet tricks to initiate HTTP requests on behalf of the victim.  </p>
<p>Finally, the <a href="http://pwnie-awards.org/2008/">Pwnie Awards</a> didn&#8217;t fail to disappoint.  Drama ensued over the Most Overhyped award, but at least this year some of the winners showed up to claim their awards!  <a href="http://twitter.com/halvarflake">Halvar</a> rapping Symantec lyrics was also quite memorable.</p>
<p>All in all, a fun and informative week, but as usual, I was relieved to get the hell out of Vegas and head home on Friday morning. </p>
<p>P.S. For a much more entertaining BlackHat/Defcon Recap, read <a href="http://securityuncorked.net/2008/08/anecdotes-blackhat-defcon/">Jennifer Jabbusch&#8217;s account</a> of the week&#8217;s events.  It&#8217;s my favorite one so far!</p>
]]></content:encoded>
      <pubDate>Tue, 12 Aug 2008 18:43:18 +0000</pubDate>
      <category domain="http://securityratty.com/tag/favorite">favorite</category>
      <category domain="http://securityratty.com/tag/favorite talk">favorite talk</category>
      <category domain="http://securityratty.com/tag/talk">talk</category>
      <category domain="http://securityratty.com/tag/sotirovdowd talk">sotirovdowd talk</category>
      <category domain="http://securityratty.com/tag/scott stenders talk">scott stenders talk</category>
      <category domain="http://securityratty.com/tag/completely reliable technique">completely reliable technique</category>
      <category domain="http://securityratty.com/tag/reliable">reliable</category>
      <category domain="http://securityratty.com/tag/attack">attack</category>
      <category domain="http://securityratty.com/tag/technique">technique</category>
      <source url="http://www.veracode.com/blog/2008/08/blackhat-recap/">BlackHat Recap</source>
    </item>
    <item>
      <title><![CDATA[Fun Reading on Security - 6]]></title>
      <link>http://securityratty.com/article/9a84eccd9e65597ca9f13e1a6c56c52f</link>
      <guid>http://securityratty.com/article/9a84eccd9e65597ca9f13e1a6c56c52f</guid>
      <description><![CDATA[Instead of my usual &quot;blogging frenzy&quot; machine gun blast of short posts, I will just combine them into my new blog series &quot; Fun Reading on Security .&quot; Here is an issue #6, dated August 7th, 2008
DNS +...]]></description>
      <content:encoded><![CDATA[<p>Instead of my usual &quot;blogging frenzy&quot; machine gun blast of short posts, I will just combine them into my new blog series &quot;<a href="http://chuvakin.blogspot.com/search/label/reading">Fun Reading on Security</a>.&quot; Here is an issue #6, dated August 7th, 2008.</p>  <ol>   <li><a href="http://andyitguy.blogspot.com/2008/07/for-everything-else-there-karma.html">DNS + Karma = Boom!</a> Enuf said. Also, hear Pete Linstrom <a href="http://spiresecurity.typepad.com/spire_security_viewpoint/2008/07/dan-kaminsky-wants-the-worlds-gratitude---should-we-give-it-to-him.html">squeal</a>.</li>    <li><a href="http://www.riskbloggers.com/jimreavis/2008/07/party-like-its-1993/">Fun essay</a> on &quot;blocking&quot; and risk. Is it our job to stop'em from using Facebook?</li>    <li><a href="http://blogs.technet.com/ecostrat/archive/2008/08/05/predicting-the-future-microsoft-launches-an-exploitability-index.aspx">MS Exploitability Index</a>. Smart ... or misguidedly focused on &quot;vulnerability release&quot; (and not creation)</li>    <li><a href="http://pcianswers.com/2008/07/30/pci-survey/">Chip-n-PIN, a PCI killer?</a> I don't think so!</li>    <li>Mike R revisits &quot;good enough security&quot; - <a href="http://securityincite.com/blog/mike-rothman/revisiting-big-is-the-new-small">read it</a>, then review your IR plans (...for you will be 0wned)</li>    <li>Very fun RSA survey <a href="http://www.net-security.org/secworld.php?id=6380">here</a>; data leakage beats malware again, people still not report incidents (to whom???) </li>    <li>More and more and more people point at <a href="http://lists.immunitysec.com/pipermail/dailydave/2008-August/005251.html">idiocies of academic security research</a>... Read the whole <a href="http://lists.immunitysec.com/pipermail/dailydave/2008-August/thread.html">w00t 08 thread here</a>. Weep. Laugh.</li>    <li><a href="http://www.rsa.com/blog/blog_entry.aspx?id=1314">Neosploit has a bad quarter</a>... breaks support &quot;contracts&quot; ... shuts down? Ah, the economy :-)</li>    <li>Awesome stuff from&#160; Richard Bejtlich: <a href="http://taosecurity.blogspot.com/2008/07/security-operations-do-you-caer.html">CAER.</a></li>    <li><a href="http://1raindrop.typepad.com/1_raindrop/2008/07/the-network-firewall-is-a-consensual-hallucination.html">&quot;The Network Firewall is a Consensual Hallucination&quot;</a> :-)</li>    <li>More GRC-ball-kicking: <a href="http://bgidps.typepad.com/bgidps/2008/07/chasing-the-mag.html">here</a>, <a href="http://blogs.forrester.com/srm/2008/06/it-grc-who-is-a.html">here</a> (&quot;IT-GRC &quot;vendors&quot; are not IT-GRC vendors&quot;) - both are pretty insightful for GRC-lovers and GRC-haters)</li>    <li>More SIEM-ball-kicking: <a href="http://securityincite.com/TDI-2008-07-03#TSN1">here</a> (&quot;underwhelming&quot;,&quot;ridiculous&quot;, &quot;missing the point&quot;), <a href="http://blogs.splunk.com/raffy/2008/07/18/sim-is-dead-unless/">here</a> (&quot;dead ...unless&quot;,&quot;cripple&quot;)</li>    <li>Fun DLP <a href="http://www.dlpindepth.org/index.php">portal launches.</a></li>    <li>Final word (?) on TerryChilds-gate <a href="http://weblog.infoworld.com/venezia/archives/017989.html">here</a>. &quot;When management starts controlling the actions of admins, things start to fall apart.&quot; Huh? When management loses control of the business, it dies. Folks, IT vs IT security gap IS real. I never quite believed it, but this taught me a lesson. <a href="http://blog.isc2.org/isc2_blog/2008/07/the-cautionary.html">Some</a> common security sense for a change (also <a href="http://securityincite.com/TDI-2008-07-25#TBP2">here</a>).</li> </ol>  <p>Enjoy.</p>  <div class="blogger-post-footer">About me: http://www.chuvakin.org</div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/AntonChuvakinPersonalBlog?a=5lLnfK"><img src="http://feeds.feedburner.com/~f/AntonChuvakinPersonalBlog?i=5lLnfK" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/AntonChuvakinPersonalBlog?a=PWbrFK"><img src="http://feeds.feedburner.com/~f/AntonChuvakinPersonalBlog?i=PWbrFK" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/AntonChuvakinPersonalBlog?a=NEVgkK"><img src="http://feeds.feedburner.com/~f/AntonChuvakinPersonalBlog?i=NEVgkK" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AntonChuvakinPersonalBlog/~4/358954457" height="1" width="1"/>]]></content:encoded>
      <pubDate>Thu, 07 Aug 2008 14:01:00 +0000</pubDate>
      <category domain="http://securityratty.com/tag/security">security</category>
      <category domain="http://securityratty.com/tag/fun">fun</category>
      <category domain="http://securityratty.com/tag/academic security research">academic security research</category>
      <category domain="http://securityratty.com/tag/security gap">security gap</category>
      <category domain="http://securityratty.com/tag/fun essay">fun essay</category>
      <category domain="http://securityratty.com/tag/common security sense">common security sense</category>
      <category domain="http://securityratty.com/tag/fun rsa survey">fun rsa survey</category>
      <category domain="http://securityratty.com/tag/it-grc">it-grc</category>
      <category domain="http://securityratty.com/tag/it-grc vendors">it-grc vendors</category>
      <source url="http://feeds.feedburner.com/~r/AntonChuvakinPersonalBlog/~3/358954457/fun-reading-on-security-6.html">Fun Reading on Security - 6</source>
    </item>
    <item>
      <title><![CDATA[Better exception reporting in ASP.NET part 2]]></title>
      <link>http://securityratty.com/article/b878f7921917b371086606df6d043229</link>
      <guid>http://securityratty.com/article/b878f7921917b371086606df6d043229</guid>
      <description><![CDATA[This is the third post in a series
The first post described the problem: ASP.NET wasn't reporting inner exception stack traces
The second post described my solution
This post shows the code I used to...]]></description>
      <content:encoded><![CDATA[<p>This is the third post in a series.</p> <p>The <a href="http://www.pluralsight.com/community/blogs/keith/archive/2008/08/01/asp-net-health-monitoring-doesn-t-log-inner-exception-stack-trace.aspx" target="_blank">first post</a> described the problem: ASP.NET wasn&#39;t reporting inner exception stack traces.</p> <p>The <a href="http://www.pluralsight.com/community/blogs/keith/archive/2008/08/01/better-exception-reporting-in-asp-net.aspx" target="_blank">second post</a> described my solution.</p> <p>This post shows the code I used to solve the problem: a custom email provider for the Health Monitoring system in ASP.NET. Enjoy!</p> <p>Here&#39;s the provider. Note that I opted *not* to build a buffering provider to keep things simple:</p><pre class="csharpcode"><span class="kwrd">public</span> <span class="kwrd">class</span> MyMailWebEventProvider : WebEventProvider
{
    <span class="kwrd">string</span> to;
    <span class="kwrd">string</span> from;
    <span class="kwrd">string</span> subjectPrefix;

    <span class="kwrd">public</span> <span class="kwrd">override</span> <span class="kwrd">void</span> Initialize(<span class="kwrd">string</span> name,
        NameValueCollection config)
    {
        <span class="kwrd">base</span>.Initialize(name, config);

        to = GetAndRemoveStringAttribute(config, <span class="str">&quot;to&quot;</span>, <span class="kwrd">true</span>);
        from = GetAndRemoveStringAttribute(config, <span class="str">&quot;from&quot;</span>, <span class="kwrd">true</span>);
        subjectPrefix = GetAndRemoveStringAttribute(config,
            <span class="str">&quot;subjectPrefix&quot;</span>, <span class="kwrd">false</span>);
    }
    <span class="kwrd">public</span> <span class="kwrd">override</span> <span class="kwrd">void</span> ProcessEvent(WebBaseEvent raisedEvent)
    {
        SendMail(raisedEvent);
    }

    <span class="kwrd">private</span> <span class="kwrd">void</span> SendMail(WebBaseEvent raisedEvent)
    {
        <span class="kwrd">string</span> subject = ComputeEmailSubject(raisedEvent);
        <span class="kwrd">string</span> body = ComputeEmailBody(raisedEvent);

        MailMessage msg = <span class="kwrd">new</span> MailMessage(from, to, subject, body);
        <span class="kwrd">new</span> SmtpClient().Send(msg);
    }

    <span class="kwrd">private</span> <span class="kwrd">string</span> ComputeEmailBody(WebBaseEvent raisedEvent)
    {
        WebRequestErrorEvent errorEvent =
            raisedEvent <span class="kwrd">as</span> WebRequestErrorEvent;
        <span class="kwrd">if</span> (<span class="kwrd">null</span> != errorEvent)
            <span class="kwrd">return</span> ErrorEventFormattingHelper.FormatRequestErrorEvent(errorEvent);
        <span class="kwrd">else</span> <span class="kwrd">return</span> raisedEvent.ToString();
    }

    <span class="kwrd">private</span> <span class="kwrd">string</span> ComputeEmailSubject(WebBaseEvent raisedEvent)
    {
        StringBuilder subjectBuilder = <span class="kwrd">new</span> StringBuilder();

        <span class="rem">// surface some details in subject about error events</span>
        WebBaseErrorEvent errorEvent = raisedEvent <span class="kwrd">as</span> WebBaseErrorEvent;
        <span class="kwrd">if</span> (<span class="kwrd">null</span> != errorEvent)
        {
            Exception unhandledException = errorEvent.ErrorException;

            <span class="rem">// drill through reflection exceptions to show the root cause</span>
            TargetInvocationException invocationException =
                unhandledException <span class="kwrd">as</span> TargetInvocationException;
            <span class="kwrd">if</span> (<span class="kwrd">null</span> != invocationException)
            {
                Exception innerException =
                    DrillIntoTargetInvocationException(invocationException);
                subjectBuilder.AppendFormat(<span class="str">&quot;{0}&quot;</span>,
                    (innerException ?? invocationException).GetType().Name);
                <span class="kwrd">if</span> (<span class="kwrd">null</span> != innerException)
                    subjectBuilder.Append(<span class="str">&quot; (via reflection)&quot;</span>);
            }
            <span class="kwrd">else</span> subjectBuilder.Append(unhandledException.GetType().Name);
        }

        <span class="rem">// if we&#39;ve not got anything better</span>
        <span class="rem">// just show the event type in the subject</span>
        <span class="kwrd">if</span> (0 == subjectBuilder.Length)
            subjectBuilder.AppendFormat(<span class="str">&quot;Event type: {0}&quot;</span>,
                raisedEvent.GetType().Name);

        <span class="kwrd">if</span> (!<span class="kwrd">string</span>.IsNullOrEmpty(subjectPrefix)) {
            subjectBuilder.Insert(0, <span class="str">&#39; &#39;</span>);
            subjectBuilder.Insert(0, subjectPrefix);
        }
        <span class="kwrd">return</span> subjectBuilder.ToString();
    }

    <span class="rem">/// &lt;summary&gt;</span>
    <span class="rem">/// Reflection often hides exception details, so we try to drill down</span>
    <span class="rem">/// through the plumbing exceptions to find a likely cause</span>
    <span class="rem">/// &lt;/summary&gt;</span>
    <span class="kwrd">private</span> Exception DrillIntoTargetInvocationException(
        TargetInvocationException outerException)
    {
        Exception innerException = outerException.InnerException;
        TargetInvocationException innerInvocationException =
            innerException <span class="kwrd">as</span> TargetInvocationException;
        <span class="kwrd">if</span> (<span class="kwrd">null</span> != innerInvocationException)
            <span class="kwrd">return</span> DrillIntoTargetInvocationException(innerInvocationException);
        <span class="kwrd">else</span> <span class="kwrd">if</span> (<span class="kwrd">null</span> != innerException)
            <span class="kwrd">return</span> innerException;
        <span class="kwrd">else</span> <span class="kwrd">return</span> <span class="kwrd">null</span>;
    }

    <span class="kwrd">private</span> <span class="kwrd">static</span> <span class="kwrd">string</span> GetAndRemoveStringAttribute(NameValueCollection config,
        <span class="kwrd">string</span> attributeName, <span class="kwrd">bool</span> required)
    {
        <span class="kwrd">string</span> <span class="kwrd">value</span> = config.Get(attributeName);
        <span class="kwrd">if</span> (required &amp;&amp; <span class="kwrd">string</span>.IsNullOrEmpty(<span class="kwrd">value</span>))
            <span class="kwrd">throw</span> <span class="kwrd">new</span> ConfigurationErrorsException(<span class="kwrd">string</span>.Format(
                <span class="str">&quot;Expected attribute {0}, which is missing or empty.&quot;</span>,
                attributeName));
        config.Remove(attributeName);
        <span class="kwrd">return</span> <span class="kwrd">value</span>;
    }

    <span class="kwrd">public</span> <span class="kwrd">override</span> <span class="kwrd">void</span> Flush()
    {
        <span class="rem">// nothing to do - this is not a buffering provider</span>
    }

    <span class="kwrd">public</span> <span class="kwrd">override</span> <span class="kwrd">void</span> Shutdown()
    {
        <span class="rem">// nothing to do here either</span>
    }
}</pre>
<p>Here&#39;s a helper class that formats the error messages the way I want to see them. Note that I&#39;ve omitted some fields that I personally didn&#39;t care about, and I&#39;ve reordered things a bit, so you might want to tweak this if you&#39;re going to use it in your own system.</p><pre class="csharpcode"><span class="kwrd">internal</span> <span class="kwrd">static</span> <span class="kwrd">class</span> ErrorEventFormattingHelper
{
    <span class="kwrd">internal</span> <span class="kwrd">static</span> <span class="kwrd">string</span> FormatRequestErrorEvent(
        WebRequestErrorEvent errorEvent)
    {
        CustomEventFormatter formatter = 
            <span class="kwrd">new</span> CustomEventFormatter();

        formatter.AppendLine(<span class="kwrd">string</span>.Format(
            <span class="str">&quot;Unhandled Exception in {0}:&quot;</span>,
            WebBaseEvent.ApplicationInformation
            .ApplicationVirtualPath));
        formatter.Indent();
        EmitExceptionAtAGlance(formatter, 
            errorEvent.ErrorException);
        formatter.RevertIndent();

        formatter.AppendLine();
        formatter.AppendLine(<span class="str">&quot;Exception stack trace(s):&quot;</span>);
        EmitExceptionStackTrace(formatter, 
            errorEvent.ErrorException);

        formatter.AppendLine();
        formatter.AppendLine(<span class="str">&quot;Event information:&quot;</span>);
        formatter.Indent();
        EmitEventInfo(formatter, errorEvent);
        formatter.RevertIndent();

        formatter.AppendLine();
        formatter.AppendLine(<span class="str">&quot;Application information:&quot;</span>);
        formatter.Indent();
        EmitApplicationInfo(formatter, 
            WebBaseEvent.ApplicationInformation);
        formatter.RevertIndent();

        formatter.AppendLine();
        formatter.AppendLine(<span class="str">&quot;Process/thread information:&quot;</span>);
        formatter.Indent();
        EmitProcessInfo(formatter, 
            errorEvent.ProcessInformation);
        formatter.RevertIndent();

        formatter.AppendLine();
        formatter.AppendLine(<span class="str">&quot;Request information:&quot;</span>);
        formatter.Indent();
        EmitRequestInfo(formatter, 
            errorEvent.RequestInformation);
        formatter.RevertIndent();

        <span class="kwrd">return</span> formatter.ToString();
    }

    <span class="kwrd">private</span> <span class="kwrd">static</span> <span class="kwrd">void</span> EmitEventInfo(
        CustomEventFormatter formatter,
        WebBaseEvent theEvent)
    {
        formatter.AppendLine(<span class="kwrd">string</span>.Format(
            <span class="str">&quot;Event code: {0}&quot;</span>,
            theEvent.EventCode.ToString(
            CultureInfo.InvariantCulture)));
        formatter.AppendLine(<span class="kwrd">string</span>.Format(
            <span class="str">&quot;Event message: {0}&quot;</span>, 
            theEvent.Message));
        formatter.AppendLine(<span class="kwrd">string</span>.Format(
            <span class="str">&quot;Event time: {0}&quot;</span>, 
            theEvent.EventTime.ToString(
            CultureInfo.InvariantCulture)));
        formatter.AppendLine(<span class="kwrd">string</span>.Format(
            <span class="str">&quot;Event ID: {0}&quot;</span>, 
            theEvent.EventID.ToString(<span class="str">&quot;N&quot;</span>, 
            CultureInfo.InvariantCulture)));
    }

    <span class="kwrd">private</span> <span class="kwrd">static</span> <span class="kwrd">void</span> EmitApplicationInfo(
        CustomEventFormatter formatter, 
        WebApplicationInformation appInfo)
    {
        formatter.AppendLine(<span class="kwrd">string</span>.Format(
            <span class="str">&quot;Application domain: {0}&quot;</span>, 
            appInfo.ApplicationDomain));
        formatter.AppendLine(<span class="kwrd">string</span>.Format(
            <span class="str">&quot;Application Virtual Path: {0}&quot;</span>, 
            appInfo.ApplicationVirtualPath));
        formatter.AppendLine(<span class="kwrd">string</span>.Format(
            <span class="str">&quot;Application Physical Path: {0}&quot;</span>, 
            appInfo.ApplicationPath));
    }

    <span class="kwrd">private</span> <span class="kwrd">static</span> <span class="kwrd">void</span> EmitProcessInfo(
        CustomEventFormatter formatter, 
        WebProcessInformation webProcessInfo)
    {
        formatter.AppendLine(<span class="kwrd">string</span>.Format(
            <span class="str">&quot;Process ID: {0}&quot;</span>, 
            webProcessInfo.ProcessID.ToString(
            CultureInfo.InvariantCulture)));
        formatter.AppendLine(<span class="kwrd">string</span>.Format(
            <span class="str">&quot;Process name: {0}&quot;</span>, 
            webProcessInfo.ProcessName));
        formatter.AppendLine(<span class="kwrd">string</span>.Format(
            <span class="str">&quot;Account name: {0}&quot;</span>, 
            webProcessInfo.AccountName));
    }

    <span class="kwrd">private</span> <span class="kwrd">static</span> <span class="kwrd">void</span> EmitRequestInfo(
        CustomEventFormatter formatter, 
        WebRequestInformation webRequestInfo)
    {
        <span class="kwrd">string</span> name = <span class="kwrd">null</span>;
        <span class="kwrd">if</span> (webRequestInfo.Principal != <span class="kwrd">null</span>)
            name = webRequestInfo.Principal.Identity.Name;

        formatter.AppendLine(<span class="kwrd">string</span>.Format(
            <span class="str">&quot;Request URL: {0}&quot;</span>, 
            webRequestInfo.RequestUrl));
        formatter.AppendLine(<span class="kwrd">string</span>.Format(
            <span class="str">&quot;Request path: {0}&quot;</span>, 
            webRequestInfo.RequestPath));
        formatter.AppendLine(<span class="kwrd">string</span>.Format(
            <span class="str">&quot;User name: {0}&quot;</span>, 
            name ?? <span class="str">&quot;[ANONYMOUS]&quot;</span>));
        formatter.AppendLine(<span class="kwrd">string</span>.Format(
            <span class="str">&quot;User host address: {0}&quot;</span>, 
            webRequestInfo.UserHostAddress));
    }

    <span class="kwrd">private</span> <span class="kwrd">static</span> <span class="kwrd">void</span> EmitExceptionAtAGlance(
        CustomEventFormatter formatter, 
        Exception exception)
    {
        formatter.AppendLine(<span class="kwrd">string</span>.Format(
            <span class="str">&quot;Type: {0}&quot;</span>, 
            exception.GetType().Name));
        formatter.AppendLine(<span class="kwrd">string</span>.Format(
            <span class="str">&quot;Message: {0}&quot;</span>, 
            exception.Message));
        <span class="kwrd">if</span> (<span class="kwrd">null</span> != exception.InnerException)
        {
            formatter.Indent();
            formatter.AppendLine(<span class="str">&quot;--&gt;Inner Exception&quot;</span>);
            EmitExceptionAtAGlance(formatter, 
                exception.InnerException);
            formatter.RevertIndent();
        }
    }

    <span class="kwrd">private</span> <span class="kwrd">static</span> <span class="kwrd">void</span> EmitExceptionStackTrace(
        CustomEventFormatter formatter, Exception exception)
    {
        formatter.AppendLine(exception.StackTrace);

        <span class="kwrd">if</span> (<span class="kwrd">null</span> != exception.InnerException)
        {
            <span class="rem">// no point indenting</span>
            <span class="rem">// since stack traces typically wrap like crazy</span>
            formatter.AppendLine();
            formatter.AppendLine(<span class="str">&quot;--&gt;Inner exception stack trace:&quot;</span>);
            EmitExceptionStackTrace(formatter, exception.InnerException);
        }
    }
}
</pre>
<p>And finally, here&#39;s a helper class that manages indentation levels for the output email message:</p><pre class="csharpcode"><span class="kwrd">public</span> <span class="kwrd">class</span> CustomEventFormatter
{
    <span class="kwrd">const</span> <span class="kwrd">int</span> TabSpaces = 4;

    StringBuilder sb = <span class="kwrd">new</span> StringBuilder();
    <span class="kwrd">private</span> <span class="kwrd">int</span> indentLevel;
    <span class="kwrd">private</span> <span class="kwrd">bool</span> startingNewLine = <span class="kwrd">true</span>;

    <span class="kwrd">public</span> <span class="kwrd">void</span> Indent()
    {
        ++indentLevel;
    }

    <span class="kwrd">public</span> <span class="kwrd">void</span> RevertIndent()
    {
        <span class="kwrd">if</span> (indentLevel &gt; 0)
            --indentLevel;
    }

    <span class="kwrd">public</span> <span class="kwrd">void</span> Append(<span class="kwrd">string</span> text)
    {
        <span class="kwrd">if</span> (startingNewLine)
            EmitIndent();
        sb.Append(text);
        startingNewLine = <span class="kwrd">false</span>;
    }

    <span class="kwrd">public</span> <span class="kwrd">void</span> AppendLine(<span class="kwrd">string</span> lineOfText)
    {
        <span class="kwrd">if</span> (startingNewLine)
            EmitIndent();
        EmitIndent();
        sb.AppendLine(lineOfText);
        startingNewLine = <span class="kwrd">true</span>;
    }

    <span class="kwrd">private</span> <span class="kwrd">void</span> EmitIndent()
    {
        sb.Append(<span class="str">&#39; &#39;</span>, TabSpaces * indentLevel);
    }

    <span class="kwrd">public</span> <span class="kwrd">void</span> AppendLine()
    {
        AppendLine(<span class="kwrd">string</span>.Empty);
    }

    <span class="kwrd">public</span> <span class="kwrd">override</span> <span class="kwrd">string</span> ToString()
    {
        <span class="kwrd">return</span> sb.ToString();
    }
}
</pre>
<p>Build this into a library application and reference it in your config file. Here&#39;s an example:</p><pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">healthMonitoring</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">providers</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">name</span><span class="kwrd">=&quot;mailWebEventProvider&quot;</span>
         <span class="attr">type</span><span class="kwrd">=&quot;MyMailWebEventProvider&quot;</span>
         <span class="attr">to</span><span class="kwrd">=&quot;web-fault@fabrikam.com&quot;</span>
         <span class="attr">from</span><span class="kwrd">=&quot;website@fabrikam.com&quot;</span>
         <span class="attr">buffer</span><span class="kwrd">=&quot;false&quot;</span>
         <span class="attr">subjectPrefix</span><span class="kwrd">=&quot;[WEB-ERROR]&quot;</span>
       <span class="kwrd">/&gt;</span>
  <span class="kwrd">&lt;/</span><span class="html">providers</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">rules</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">name</span><span class="kwrd">=&quot;All Errors Email&quot;</span>
         <span class="attr">eventName</span><span class="kwrd">=&quot;All Errors&quot;</span>
         <span class="attr">provider</span><span class="kwrd">=&quot;mailWebEventProvider&quot;</span>
         <span class="attr">profile</span><span class="kwrd">=&quot;Default&quot;</span>
         <span class="attr">minInstances</span><span class="kwrd">=&quot;1&quot;</span>
         <span class="attr">maxLimit</span><span class="kwrd">=&quot;Infinite&quot;</span>
         <span class="attr">minInterval</span><span class="kwrd">=&quot;00:01:00&quot;</span>
         <span class="attr">custom</span><span class="kwrd">=&quot;&quot;</span><span class="kwrd">/&gt;</span>
  <span class="kwrd">&lt;/</span><span class="html">rules</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">healthMonitoring</span><span class="kwrd">&gt;</span>
</pre><div style="clear:both;"></div><img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=52349" width="1" height="1">]]></content:encoded>
      <pubDate>Mon, 04 Aug 2008 10:11:14 +0000</pubDate>
      <category domain="http://securityratty.com/tag/return">return</category>
      <category domain="http://securityratty.com/tag/return subjectbuilder">return subjectbuilder</category>
      <category domain="http://securityratty.com/tag/return formatter">return formatter</category>
      <category domain="http://securityratty.com/tag/exception">exception</category>
      <category domain="http://securityratty.com/tag/formatter">formatter</category>
      <category domain="http://securityratty.com/tag/crazy formatter">crazy formatter</category>
      <category domain="http://securityratty.com/tag/static void">static void</category>
      <category domain="http://securityratty.com/tag/static void emitprocessinfo">static void emitprocessinfo</category>
      <category domain="http://securityratty.com/tag/return null">return null</category>
      <source url="http://www.pluralsight.com/community/blogs/keith/archive/2008/08/04/better-exception-reporting-in-asp-net-part-2.aspx">Better exception reporting in ASP.NET part 2</source>
    </item>
    <item>
      <title><![CDATA[U.S. Government Policy for Seizing Laptops at Borders]]></title>
      <link>http://securityratty.com/article/644821439b7605896de17d8ca6d3a3de</link>
      <guid>http://securityratty.com/article/644821439b7605896de17d8ca6d3a3de</guid>
      <description><![CDATA[Amazing. The U.S. government has published its policy : they can take you laptop anywhere they want, for as long as they want, and share the information with anyone they want
Here's the actual policy:...]]></description>
      <content:encoded><![CDATA[<p>Amazing.  The U.S. government has <a href="http://www.washingtonpost.com/wp-dyn/content/article/2008/08/01/AR2008080103030.html">published its policy</a>: they can take you laptop anywhere they want, for as long as they want, and share the information with anyone they want.</p>

<p><a href="http://www.cbp.gov/linkhandler/cgov/travel/admissability/search_authority.ctt/search_authority.pdf">Here's</a> the actual policy:</p>

<blockquote>Federal agents may take a traveler's laptop or other electronic device to an off-site location for an unspecified period of time without any suspicion of wrongdoing, as part of border search policies the Department of Homeland Security recently disclosed. Also, officials may share copies of the laptop's contents with other agencies and private entities for language translation, data decryption, or other reasons, according to the policies, dated July 16 and issued by two DHS agencies, US Customs and Border Protection and US Immigration and Customs Enforcement... DHS officials said that the newly disclosed policies — which apply to anyone entering the country, including US citizens — are reasonable and necessary to prevent terrorism... The policies cover 'any device capable of storing information in digital or analog form,' including hard drives, flash drives, cell phones, iPods, pagers, beepers, and video and audio tapes. They also cover 'all papers and other written documentation,' including books, pamphlets and 'written materials commonly referred to as "pocket trash..."</blockquote>

<p>It's not the policy that's amazing; it's the fact that the government has actually made it public.</p>

<p>Slashdot <a href="http://yro.slashdot.org/yro/08/08/01/0958242.shtml">thread</a>.  My previous <a href="http://www.schneier.com/essay-217.html">essay</a> on crossing borders with laptops, and how to protect yourself.</p>

<p>Although honestly, the best thing is probably to keep your encrypted archives on some network drive somewhere, and download what you need after you cross the border.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/schneier/fulltext?a=xpja3K"><img src="http://feeds.feedburner.com/~f/schneier/fulltext?i=xpja3K" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/schneier/fulltext?a=vWPUNK"><img src="http://feeds.feedburner.com/~f/schneier/fulltext?i=vWPUNK" border="0"></img></a>
</div>]]></content:encoded>
      <pubDate>Fri, 01 Aug 2008 08:21:25 +0000</pubDate>
      <category domain="http://securityratty.com/tag/policy">policy</category>
      <category domain="http://securityratty.com/tag/cover">cover</category>
      <category domain="http://securityratty.com/tag/policies cover">policies cover</category>
      <category domain="http://securityratty.com/tag/policies">policies</category>
      <category domain="http://securityratty.com/tag/actual policy">actual policy</category>
      <category domain="http://securityratty.com/tag/government">government</category>
      <category domain="http://securityratty.com/tag/border protection">border protection</category>
      <category domain="http://securityratty.com/tag/border">border</category>
      <category domain="http://securityratty.com/tag/laptop">laptop</category>
      <source url="http://www.schneier.com/blog/archives/2008/08/us_government_p.html">U.S. Government Policy for Seizing Laptops at Borders</source>
    </item>
    <item>
      <title><![CDATA[More on World's Ugliest Logs]]></title>
      <link>http://securityratty.com/article/a680b03bb955d00a72f9b93f161aa24f</link>
      <guid>http://securityratty.com/article/a680b03bb955d00a72f9b93f161aa24f</guid>
      <description><![CDATA[To follow the old thread on ugliest logs , I just saw this log entry


done (yes, that's it

If you are a developer who produced it, please die. Be done

More on ugly logs in the future
About me:...]]></description>
      <content:encoded><![CDATA[To follow <a href="http://www.loganalysis.org/pipermail/loganalysis/2008-January/000534.html">the old thread on ugliest logs</a>, I just saw this log entry:<br /><br /><pre><label class="sg477cf8d5"></label><label class="sg597061 explicitMouseOver"></label><label style="font-family: courier new;" class="sg2b5d3">.</label><span style="font-family: courier new;">..</span><label style="font-family: courier new;" class="sg7c95cc2b">done</label></pre>(yes, that's it!)<br /><br />If you are a developer who produced it, please die. Be done :-)<br /><br />More on ugly logs in the future!<div class="blogger-post-footer">About me: http://www.chuvakin.org</div><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/AntonChuvakinPersonalBlog?a=L1ahRJ"><img src="http://feeds.feedburner.com/~f/AntonChuvakinPersonalBlog?i=L1ahRJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/AntonChuvakinPersonalBlog?a=Wat1JJ"><img src="http://feeds.feedburner.com/~f/AntonChuvakinPersonalBlog?i=Wat1JJ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/AntonChuvakinPersonalBlog?a=HbaIAJ"><img src="http://feeds.feedburner.com/~f/AntonChuvakinPersonalBlog?i=HbaIAJ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AntonChuvakinPersonalBlog/~4/350853116" height="1" width="1"/>]]></content:encoded>
      <pubDate>Wed, 30 Jul 2008 09:46:00 +0000</pubDate>
      <category domain="http://securityratty.com/tag/logs">logs</category>
      <category domain="http://securityratty.com/tag/ugly logs">ugly logs</category>
      <category domain="http://securityratty.com/tag/log entry">log entry</category>
      <category domain="http://securityratty.com/tag/follow">follow</category>
      <category domain="http://securityratty.com/tag/org">org</category>
      <category domain="http://securityratty.com/tag/die">die</category>
      <category domain="http://securityratty.com/tag/thread">thread</category>
      <category domain="http://securityratty.com/tag/developer">developer</category>
      <category domain="http://securityratty.com/tag/future">future</category>
      <source url="http://feeds.feedburner.com/~r/AntonChuvakinPersonalBlog/~3/350853116/more-on-worlds-ugliest-logs.html">More on World's Ugliest Logs</source>
    </item>
  </channel>
</rss>
