<?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: exception]]></title>
    <link>http://securityratty.com/tag/exception</link>
    <description></description>
    <pubDate>Fri, 25 Jul 2008 16:49:00 +0000</pubDate>
    <generator>iRatty Engine</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <item>
      <title><![CDATA[Is an incorrectly implemented security program better than a non-existent one ?]]></title>
      <link>http://securityratty.com/article/5893399324f415d7cb19e54c1340401b</link>
      <guid>http://securityratty.com/article/5893399324f415d7cb19e54c1340401b</guid>
      <description><![CDATA[Think carefully before you answer that one. A large majority of you would be inclined to give a resounding 'yes' - but I really want you to think carefully on this one. Think long term. Think about...]]></description>
      <content:encoded><![CDATA[Think carefully before you answer that one. A large majority of you would be inclined to give a resounding 'yes' - but I really want you to think <em>carefully </em>on this one. Think long term. Think about implementation hurdles, think about project documentation.<br /><br />The answer to this IMHO is a big "DEPENDS". <br /><br />To explain:<br /><br />Imagine you're working in a company that has no security controls in place - and is in desperate need of getting a security program impemented. They hire a new CISO to make sure their physical and logical controls are in place, network and applications are secured appropriately and their incident management and forensics capabilities are upto date. At this point the CISO clearly  knows that he needs to create and implement a number of programs and hires a bunch of people to perform and manage a series of tasks. Till this point, things are going smoothly. Everyone understands the need, and is working towards meeting a common goal. The program is not in place yet, but people know and understand the urgency need to act immediately. The CISO's risk radar has a list of projects ranked by priority and everone begins to tackle them. <br /><br />Now consider the scenario when certain security programs are not done right - say, a few of the high risk  applications are not considered in the initial risk matrix or there are certain business units that have been granted an 'exception'to the process that is being put in place, with the most common excuses of:<br /><br />1. This is a pilot<br />2. We will get to this in the next phase<br />3. The group has a number of high profile clients who don't want it implemented right now<br />4. &ltplug your own excuse here&gt<br /><br />Well - initially, everyone is completely aware that they have more issues to remediate and and have honest intentions to fix that too, once the pilot and<br />PoC is well established and in place. But then things change. Leaders change. Managers change. People's roles change. What doesn't, is the documentation regarding the project. But documents usually tend to highlight what the project <em>does</em>, not what it <em>doesn't do</em>. Nobody seems to remember there are additional tasks that need to get completed. People take a quick look at documents detailing what was done in the program and begin to assume that it is well established, completely ignoring the fact that a very important Phase 2 still needs to be in place. A false sense of security is now well in place... and life goes on. <br /><br />Till you get hacked. <br /><br />..and then a forensics team attempts to determine the cause. A new CISO comes in, reviews the existing program, decides it is too complex and structureless and decides to do away with it entirely and create a new security program.. and the cycle continues.<br /><br />The moral of the story: When you have no security program - be very careful while diligently working to get one in place<br /><br />But when you have a partial one, be extremely careful and don't leave any loose ends while getting it completely and correctly put in place.<br /><br /><br />On a lighter note - here's an email I received from a school I was doing some courses from ..<br /><a href="http://4.bp.blogspot.com/_XTqu2iQGpYM/SL8CCfFxwwI/AAAAAAAAAq8/dQfN6tdLU-M/s1600-h/blog1.JPG"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_XTqu2iQGpYM/SL8CCfFxwwI/AAAAAAAAAq8/dQfN6tdLU-M/s400/blog1.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5241910733011272450" /></a><br />Beautiful !! Here is your PIN (username). But we will not give you your password over email. I was sooo impressed when I got that! - Could it be that schools and universities are finally waking up and trying to understand security ? No more SSNs as IDs ? No more default 'password' passwords ?  This was great. I followed the procedure outlined to receive a new password - it asked for my name, DOB and email.. and then .. I receive this:<br /><br /><a href="http://2.bp.blogspot.com/_XTqu2iQGpYM/SL7-9CTJaKI/AAAAAAAAAq0/ZY9Q0SqaxkU/s1600-h/blog2.JPG"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_XTqu2iQGpYM/SL7-9CTJaKI/AAAAAAAAAq0/ZY9Q0SqaxkU/s400/blog2.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5241907340848490658" /></a><br /><br /><br />For those who cannot see the image:<br /><br /><br />the email says:<br /><br />blah blah blah blah blah blah..<br />your PIN: <my PIN><br />your password: password1234<br /><br />blah blah blah blah blah blah]]></content:encoded>
      <pubDate>Wed, 03 Sep 2008 12:02:00 +0000</pubDate>
      <category domain="http://securityratty.com/tag/security">security</category>
      <category domain="http://securityratty.com/tag/security program">security program</category>
      <category domain="http://securityratty.com/tag/program">program</category>
      <category domain="http://securityratty.com/tag/security controls">security controls</category>
      <category domain="http://securityratty.com/tag/change">change</category>
      <category domain="http://securityratty.com/tag/leaders change">leaders change</category>
      <category domain="http://securityratty.com/tag/programs">programs</category>
      <category domain="http://securityratty.com/tag/security programs">security programs</category>
      <category domain="http://securityratty.com/tag/roles change">roles change</category>
      <source url="http://securitycoin.blogspot.com/2008/09/is-incorrectly-implemented-security.html">Is an incorrectly implemented security program better than a non-existent one ?</source>
    </item>
    <item>
      <title><![CDATA[ISO 27001 Adoption Poll Results are In]]></title>
      <link>http://securityratty.com/article/fc09764886f19fc2d529d52d8b214dbe</link>
      <guid>http://securityratty.com/article/fc09764886f19fc2d529d52d8b214dbe</guid>
      <description><![CDATA[So, several weeks ago I wrote a piece discussing the &quot;long road to ISO 27001&quot; adoption. A question posed to readers at the end of the piece: &quot;How far off are we from the point at which ISO 27001...]]></description>
      <content:encoded><![CDATA[So, several weeks ago I wrote <a href="http://www.rsa.com/blog/blog_entry.aspx?id=1313">a piece</a> discussing the "long road to ISO 27001" adoption.  A question posed to readers at the end of the piece:  "How far off are we from the point at which ISO 27001 certifications in the U.S. are standard operating procedure for businesses -- the exception, rather than the rule?"
<P>
Well, the results are in!  Our servers nearly crashed thanks to the influx of responses, but, fortunately, that wasn't the case.  <B>Here are the results...</b>]]></content:encoded>
      <pubDate>Thu, 28 Aug 2008 05:00:00 +0000</pubDate>
      <category domain="http://securityratty.com/tag/iso">iso</category>
      <category domain="http://securityratty.com/tag/results">results</category>
      <category domain="http://securityratty.com/tag/piece">piece</category>
      <category domain="http://securityratty.com/tag/question posed">question posed</category>
      <category domain="http://securityratty.com/tag/adoption">adoption</category>
      <category domain="http://securityratty.com/tag/weeks ago">weeks ago</category>
      <category domain="http://securityratty.com/tag/standard">standard</category>
      <category domain="http://securityratty.com/tag/rule">rule</category>
      <category domain="http://securityratty.com/tag/influx">influx</category>
      <source url="http://www.rsa.com/blog/blog_entry.aspx?id=1335">ISO 27001 Adoption Poll Results are In</source>
    </item>
    <item>
      <title><![CDATA[Full Disclosure and the Boston Farecard Hack]]></title>
      <link>http://securityratty.com/article/40a098c4c848de62a0921d68f8cef2e7</link>
      <guid>http://securityratty.com/article/40a098c4c848de62a0921d68f8cef2e7</guid>
      <description><![CDATA[In eerily similar cases in the Netherlands and the United States, courts have recently grappled with the computer-security norm of &quot;full disclosure,&quot; asking whether researchers should be permitted to...]]></description>
      <content:encoded><![CDATA[<p>In eerily similar cases in the Netherlands and the United States, courts have recently grappled with the computer-security norm of "full disclosure," asking whether researchers should be permitted to disclose details of a fare-card vulnerability that allows people to ride the subway for free.</p>

<p>The "Oyster card" used on the <a href="http://www.schneier.com/essay-229.html">London Tube</a> was at issue in the Dutch case, and a similar fare card used on the <a href="http://blog.wired.com/27bstroke6/2008/08/injunction-requ.html">Boston "T"</a> was the center of the U.S. case. The Dutch court got it right, and the American court, in Boston, <a href="http://blog.wired.com/27bstroke6/2008/08/computer-scient.html ">got it wrong</a> from the start -- despite facing an open-and-shut case of First Amendment prior restraint.</p>

<p>The U.S. court has since <a href="http://blog.wired.com/27bstroke6/2008/08/federal-judge-t.html ">seen the error</a> of its ways -- but the damage is done. The MIT security researchers who were prepared to discuss their Boston findings at the DefCon security conference were <a href="http://blog.wired.com/27bstroke6/2008/08/eff-to-appeal-r.html ">prevented</a> from giving their talk.</p>

<p>The <a href="http://www.schneier.com/essay-146.html">ethics</a> of <a href="http://www.schneier.com/crypto-gram-0111.html#1">full disclosure</a> are intimately familiar to those of us in the computer-security field.  Before full disclosure became the norm, researchers would quietly disclose vulnerabilities to the vendors -- who would routinely ignore them. Sometimes vendors would even threaten researchers with legal action if they disclosed the vulnerabilities. </p>

<p>Later on, researchers started disclosing the existence of a vulnerability but not the details.  Vendors responded by denying the security holes' existence, or calling them just theoretical.  It wasn't until full disclosure became the norm that vendors began consistently fixing vulnerabilities quickly.  Now that vendors routinely patch vulnerabilities, researchers generally give them advance notice to allow them to patch their systems before the vulnerability is published.  But even with this "responsible disclosure" protocol, it's the threat of disclosure that motivates them to patch their systems.  Full disclosure <a href="http://www.eff.org/files/filenode/MBTA_v_Anderson/letter081208.pdf">is the mechanism</a> (.pdf) by which computer security improves.</p>

<p>Outside of computer security, secrecy is much more the norm.  Some security communities, like locksmiths, behave much like medieval guilds, divulging the secrets of their profession only to those within it.  These communities <a href="http://news.cnet.com/8301-1009_3-10002138-83.html?tag=mncol">hate</a> <a href="http://www.slate.com/id/2195862/">open</a> <a href="http://www.theglobeandmail.com/servlet/story/RTGAM.20080711.wlpicking11/EmailBNStory/lifeMain/">research</a>, and have <a href="http://www.schneier.com/crypto-gram-0302.html#1">responded</a> with <a href="http://www.crypto.com/papers/kiss.html">surprising vitriol</a> to <a href="http://www.crypto.com/papers/flattery.html">researchers</a> who have found serious vulnerabilities in <a href="http://www.wired.com/culture/lifestyle/news/2004/09/64987">bicycle locks</a>, <a href="http://www.crypto.com/papers/safelocks.pdf">combination safes</a> (.pdf), <a href="http://www.crypto.com/masterkey.html">master-key systems</a> and <a href="http://blog.wired.com/27bstroke6/2008/08/medeco-locks-cr.html">many</a> other <a href="http://en.wikipedia.org/wiki/Lock_bumping">security devices</a>.  </p>

<p>Researchers have received a similar reaction from other communities more used to secrecy than openness.  Researchers -- sometimes <a href="http://compsci.ca/blog/lanschool-threatens-compscica-with-legal-actions/">young students</a> -- who discovered and published flaws in copyright-protection schemes, <a href="http://www.freedom-to-tinker.com/?p=1265">voting-machine security</a> and now wireless access cards have all suffered recriminations and sometimes lawsuits for not keeping the vulnerabilities secret.  When Christopher Soghoian created a website allowing people to print fake airline boarding passes, he got <a href="http://www.schneier.com/blog/archives/2006/11/forge_your_own.html">several unpleasant visits</a> from the FBI.</p>

<p>This preference for secrecy comes from confusing a vulnerability with information <em>about</em> that vulnerability.  Using <a href="http://www.schneier.com/crypto-gram-0205.html#1">secrecy as a security measure</a> is fundamentally fragile.  It assumes that the bad guys don't do their own security research.  It assumes that no one else will find the same vulnerability.  It assumes that information won't leak out even if the research results are suppressed.  These assumptions are all incorrect.</p>

<p>The problem isn't the researchers; it's the products themselves.  Companies will only design security as good as what their customers know to ask for.  Full disclosure helps customers evaluate the security of the products they buy, and educates them in how to ask for better security.  The Dutch court got it exactly right when it <a href="http://zoeken.rechtspraak.nl/resultpage.aspx?snelzoeken=true&searchtype=ljn&ljn=BD7578&u_ljn=BD7578">wrote</a>: "Damage to NXP is not the result of the publication of the article but of the production and sale of a chip that appears to have shortcomings."</p>

<p>In a world of forced secrecy, vendors make inflated claims about their products, vulnerabilities don't get fixed, and customers are no wiser.  Security research is stifled, and security technology doesn't improve.  The only beneficiaries are the bad guys.</p>

<p>If you'll forgive the analogy, the ethics of full disclosure parallel the ethics of not paying kidnapping ransoms.  We all know why we don't pay kidnappers: It encourages more kidnappings.  Yet in every kidnapping case, there's someone -- a spouse, a parent, an employer -- with a good reason why, in this one case, we should make an exception. </p>

<p>The reason we want researchers to publish vulnerabilities is because that's how security improves. But in every case there's someone -- the Massachusetts Bay Transit Authority, the locksmiths, an election machine manufacturer -- who argues that, in this one case, we should make an exception.</p>

<p>We shouldn't.  The benefits of responsibly publishing attacks greatly outweigh the potential harm. Disclosure encourages companies to build security properly rather than relying on shoddy design and secrecy, and discourages them from promising security based on their ability to threaten researchers.  It's how we learn about security, and how we improve future security.</p>

<p>This essay <a href="http://www.wired.com/politics/security/commentary/securitymatters/2008/08/securitymatters_0821">previously appeared</a> on Wired.com.</p>

<p>EDITED TO ADD (8/26):  Matt Blaze has a <a href="http://www.crypto.com/blog/security_through_restraining_orders/">good essay</a> on the topic.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/schneier/fulltext?a=Jzhf7K"><img src="http://feeds.feedburner.com/~f/schneier/fulltext?i=Jzhf7K" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/schneier/fulltext?a=e3TDeK"><img src="http://feeds.feedburner.com/~f/schneier/fulltext?i=e3TDeK" border="0"></img></a>
</div>]]></content:encoded>
      <pubDate>Tue, 26 Aug 2008 02:04:49 +0000</pubDate>
      <category domain="http://securityratty.com/tag/computer security improves">computer security improves</category>
      <category domain="http://securityratty.com/tag/security improves">security improves</category>
      <category domain="http://securityratty.com/tag/computer security">computer security</category>
      <category domain="http://securityratty.com/tag/security">security</category>
      <category domain="http://securityratty.com/tag/mit security researchers">mit security researchers</category>
      <category domain="http://securityratty.com/tag/security devices">security devices</category>
      <category domain="http://securityratty.com/tag/security holes">security holes</category>
      <category domain="http://securityratty.com/tag/disclosure">disclosure</category>
      <category domain="http://securityratty.com/tag/security properly">security properly</category>
      <source url="http://www.schneier.com/blog/archives/2008/08/full_disclosure.html">Full Disclosure and the Boston Farecard Hack</source>
    </item>
    <item>
      <title><![CDATA[Boston Court's Meddling With 'Full Disclosure' Is Unwelcome]]></title>
      <link>http://securityratty.com/article/b65bde3bbcffdced12efa1287ce8e1e0</link>
      <guid>http://securityratty.com/article/b65bde3bbcffdced12efa1287ce8e1e0</guid>
      <description><![CDATA[In eerily similar cases in the Netherlands and the United States, courts have recently grappled with the computer-security norm of &quot;full disclosure,&quot; asking whether researchers should be permitted to...]]></description>
      <content:encoded><![CDATA[<p>
In eerily similar cases in the Netherlands and the United States, courts have recently grappled with the computer-security norm of "full disclosure," asking whether researchers should be permitted to disclose details of a fare-card vulnerability that allows people to ride the subway for free.
</p><p>
The "Oyster card" used on the <a href="http://www.schneier.com/essay-229.html">London Tube</a> was at issue in the Dutch case, and a similar fare card used on the <a href="http://blog.wired.com/27bstroke6/2008/08/injunction-requ.html">Boston "T"</a> was the center of the U.S. case. The Dutch court got it right, and the American court, in Boston, <a href="http://blog.wired.com/27bstroke6/2008/08/computer-scient.html ">got it wrong</a> from the start -- despite facing an open-and-shut case of First Amendment prior restraint.
</p><p>
The U.S. court has since <a href="http://blog.wired.com/27bstroke6/2008/08/federal-judge-t.html ">seen the error</a> of its ways -- but the damage is done. The MIT security researchers who were prepared to discuss their Boston findings at the DefCon security conference were <a href="http://blog.wired.com/27bstroke6/2008/08/eff-to-appeal-r.html ">prevented</a> from giving their talk.
</p><p>
The <a href="http://www.schneier.com/essay-146.html">ethics</a> of <a href="http://www.schneier.com/crypto-gram-0111.html#1">full disclosure</a> are intimately familiar to those of us in the computer-security field.  Before full disclosure became the norm, researchers would quietly disclose vulnerabilities to the vendors -- who would routinely ignore them. Sometimes vendors would even threaten researchers with legal action if they disclosed the vulnerabilities. 
</p><p>
Later on, researchers started disclosing the existence of a vulnerability but not the details.  Vendors responded by denying the security holes' existence, or calling them just theoretical.  It wasn't until full disclosure became the norm that vendors began consistently fixing vulnerabilities quickly.  Now that vendors routinely patch vulnerabilities, researchers generally give them advance notice to allow them to patch their systems before the vulnerability is published.  But even with this "responsible disclosure" protocol, it's the threat of disclosure that motivates them to patch their systems.  Full disclosure <a href="http://www.eff.org/files/filenode/MBTA_v_Anderson/letter081208.pdf">is the mechanism</a> (.pdf) by which computer security improves.
</p><p>
Outside of computer security, secrecy is much more the norm.  Some security communities, like locksmiths, behave much like medieval guilds, divulging the secrets of their profession only to those within it.  These communities <a href="http://news.cnet.com/8301-1009_3-10002138-83.html?tag=mncol">hate</a> <a href="http://www.slate.com/id/2195862/">open</a> <a href="http://www.theglobeandmail.com/servlet/story/RTGAM.20080711.wlpicking11/EmailBNStory/lifeMain/">research</a>, and have <a href="http://www.schneier.com/crypto-gram-0302.html#1">responded</a> with <a href="http://www.crypto.com/papers/kiss.html">surprising vitriol</a> to <a href="http://www.crypto.com/papers/flattery.html">researchers</a> who have found serious vulnerabilities in <a href="http://www.wired.com/culture/lifestyle/news/2004/09/64987">bicycle locks</a>, <a href="http://www.crypto.com/papers/safelocks.pdf">combination safes</a> (.pdf), <a href="http://www.crypto.com/masterkey.html">master-key systems</a> and <a href="http://blog.wired.com/27bstroke6/2008/08/medeco-locks-cr.html">many</a> other <a href="http://en.wikipedia.org/wiki/Lock_bumping">security devices</a>.  
</p><p>
Researchers have received a similar reaction from other communities more used to secrecy than openness.  Researchers -- sometimes <a href="http://compsci.ca/blog/lanschool-threatens-compscica-with-legal-actions/">young students</a> -- who discovered and published flaws in copyright-protection schemes, <a href="http://www.freedom-to-tinker.com/?p=1265">voting-machine security</a> and now wireless access cards have all suffered recriminations and sometimes lawsuits for not keeping the vulnerabilities secret.  When Christopher Soghoian created a website allowing people to print fake airline boarding passes, he got <a href="http://www.schneier.com/blog/archives/2006/11/forge_your_own.html">several unpleasant visits</a> from the FBI.
</p><p>
This preference for secrecy comes from confusing a vulnerability with information <em>about</em> that vulnerability.  Using <a href="http://www.schneier.com/crypto-gram-0205.html#1">secrecy as a security measure</a> is fundamentally fragile.  It assumes that the bad guys don't do their own security research.  It assumes that no one else will find the same vulnerability.  It assumes that information won't leak out even if the research results are suppressed.  These assumptions are all incorrect.
</p><p>
The problem isn't the researchers; it's the products themselves.  Companies will only design security as good as what their customers know to ask for.  Full disclosure helps customers evaluate the security of the products they buy, and educates them in how to ask for better security.  The Dutch court got it exactly right when it <a href="http://zoeken.rechtspraak.nl/resultpage.aspx?snelzoeken=true&searchtype=ljn&ljn=BD7578&u_ljn=BD7578">wrote</a>: "Damage to NXP is not the result of the publication of the article but of the production and sale of a chip that appears to have shortcomings."
</p><p>
In a world of forced secrecy, vendors make inflated claims about their products, vulnerabilities don't get fixed, and customers are no wiser.  Security research is stifled, and security technology doesn't improve.  The only beneficiaries are the bad guys.
</p><p>
If you'll forgive the analogy, the ethics of full disclosure parallel the ethics of not paying kidnapping ransoms.  We all know why we don't pay kidnappers: It encourages more kidnappings.  Yet in every kidnapping case, there's someone -- a spouse, a parent, an employer -- with a good reason why, in this one case, we should make an exception. 
</p><p>
The reason we want researchers to publish vulnerabilities is because that's how security improves. But in every case there's someone -- the Massachusetts Bay Transit Authority, the locksmiths, an election machine manufacturer -- who argues that, in this one case, we should make an exception.
</p><p>
We shouldn't.  The benefits of responsibly publishing attacks greatly outweigh the potential harm. Disclosure encourages companies to build security properly rather than relying on shoddy design and secrecy, and discourages them from promising security based on their ability to threaten researchers.  It's how we learn about security, and how we improve future security.
</p>
<p>---</p>

<p>
<em>Bruce Schneier is Chief Security Technology Officer of BT Global Services and author of </em><a href="http://www.schneier.com/bf.html">Beyond Fear: Thinking Sensibly About Security in an Uncertain World</a><em>. You can read more of his writings on his <a href="http://www.schneier.com/">website</a>.</em>
</p><br style="clear: both;"/>
  <img alt="" style="border: 0; height:1px; width:1px;" border="0" src="http://www.pheedo.com/img.phdo?i=bca653e99d30d29fe90a724af1243458" height="1" width="1"/>
<img src="http://www.pheedo.com/feeds/tracker.php?i=bca653e99d30d29fe90a724af1243458" style="display: none;" border="0" height="1" width="1" alt=""/><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/wired/politics/privacy?a=FBzLDK"><img src="http://feeds.feedburner.com/~f/wired/politics/privacy?i=FBzLDK" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/wired/politics/privacy?a=I2e1pk"><img src="http://feeds.feedburner.com/~f/wired/politics/privacy?i=I2e1pk" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/wired/politics/privacy?a=znpbtk"><img src="http://feeds.feedburner.com/~f/wired/politics/privacy?i=znpbtk" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/wired/politics/privacy?a=bR68YK"><img src="http://feeds.feedburner.com/~f/wired/politics/privacy?i=bR68YK" border="0"></img></a>
 <a href="http://feeds.wired.com/~f/wired/politics/security?a=AMJk5K"><img src="http://feeds.wired.com/~f/wired/politics/security?i=AMJk5K" border="0"></img></a> <a href="http://feeds.wired.com/~f/wired/politics/security?a=ZF5tzk"><img src="http://feeds.wired.com/~f/wired/politics/security?i=ZF5tzk" border="0"></img></a> <a href="http://feeds.wired.com/~f/wired/politics/security?a=iWkWjk"><img src="http://feeds.wired.com/~f/wired/politics/security?i=iWkWjk" border="0"></img></a> <a href="http://feeds.wired.com/~f/wired/politics/security?a=f5xemK"><img src="http://feeds.wired.com/~f/wired/politics/security?i=f5xemK" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/wired/politics/privacy/~4/370586608" height="1" width="1"/><img src="http://feeds.wired.com/~r/wired/politics/security/~4/370586609" height="1" width="1"/>]]></content:encoded>
      <pubDate>Thu, 21 Aug 2008 00:00:00 +0000</pubDate>
      <category domain="http://securityratty.com/tag/computer security improves">computer security improves</category>
      <category domain="http://securityratty.com/tag/security improves">security improves</category>
      <category domain="http://securityratty.com/tag/computer security">computer security</category>
      <category domain="http://securityratty.com/tag/security">security</category>
      <category domain="http://securityratty.com/tag/mit security researchers">mit security researchers</category>
      <category domain="http://securityratty.com/tag/security devices">security devices</category>
      <category domain="http://securityratty.com/tag/security holes">security holes</category>
      <category domain="http://securityratty.com/tag/disclosure">disclosure</category>
      <category domain="http://securityratty.com/tag/security properly">security properly</category>
      <source url="http://feeds.wired.com/~r/wired/politics/security/~3/370586609/securitymatters_0821">Boston Court's Meddling With 'Full Disclosure' Is Unwelcome</source>
    </item>
    <item>
      <title><![CDATA[Fake Celebrity Video Sites Serving Malware - Part Two]]></title>
      <link>http://securityratty.com/article/c395d54f1c682346aee8b2d88973e345</link>
      <guid>http://securityratty.com/article/c395d54f1c682346aee8b2d88973e345</guid>
      <description><![CDATA[Malicious parties remain busy crunching out domain portfolios of legitimately looking celebrity video sites. The very same templates used on the majority of fake celebrity video sites which I exposed...]]></description>
      <content:encoded><![CDATA[<div style="text-align: left;"></div><div class="separator" style="clear: both; text-align: center;"></div><a href="http://4.bp.blogspot.com/_wICHhTiQmrA/SKx9HqDP8dI/AAAAAAAACE8/IGlb0IMf6r0/s1600-h/fake_celebrity_malware.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/_wICHhTiQmrA/SKx9HqDP8dI/AAAAAAAACE8/O-KOwx_gTlI/s200-R/fake_celebrity_malware.png" /></a>Malicious parties remain busy crunching out domain portfolios of legitimately looking celebrity video sites. The very same templates used on the majority of <a href="http://ddanchev.blogspot.com/2008/06/fake-celebrity-video-sites-serving.html">fake celebrity video sites</a> which I exposed in a previous post, remain in circulation with anecdotal situations where they aren't even bothering to match the site's logo with the domain name -- it would ruin the malicious economies of scale approach. And since centralization to some, an laziness to others, remains in tact, the fake security software and fake codecs served remain once parked at the same IP as the fake celebrity sites which I'll expose in this post.<br />
<br />
<b>starfeed1 .com</b> - (85.255.117.218)<br />
<b>codecservice1 .com<br />
siteresults1 .com<br />
codecservice6 .com<br />
celebs69 .com<br />
topdirectdownload .com<br />
sexlookupworld .com<br />
favoredtube .com<br />
yourfavoritetube .com<br />
wwvyoutube .com<br />
celebsnofake .com<br />
celebsvidsonline .com<br />
celebstape .com<br />
freevidshardcore .com<br />
topsoftupdate .com<br />
porndebug .com<br />
newfunnyvideo .com<br />
bestfunnyvids .com<br />
pornmoviestube .net</b><br />
<br />
<div style="text-align: left;"></div><div class="separator" style="clear: both; text-align: center;"></div><div style="text-align: right;"><a href="http://1.bp.blogspot.com/_wICHhTiQmrA/SKx_zJYKp8I/AAAAAAAACFE/s1Gjxxgtk60/s1600-h/celebrity_fake_windows_player.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/_wICHhTiQmrA/SKx_zJYKp8I/AAAAAAAACFE/ebj-Ry4Nk8g/s200-R/celebrity_fake_windows_player.JPG" /></a><b>worldstars2008 .com</b> - (79.135.167.54)</div><b>antivirus2008-pro .name<br />
antivirus-2008pro .name<br />
antivirus2008pro .name<br />
antivirus2008pro-download .org<br />
antivirus-2008-pro .org<br />
antivirus2008-pro .org<br />
antivirus-2008pro .org<br />
antivirus2008pro .org<br />
thesoft-portal-08 .com<br />
stars-08 .com<br />
thestars-08 .com<br />
thebigstars-08 .com<br />
funny-08 .com<br />
realonlinevideo-2008 .com<br />
2008-adult-2008 .com<br />
adult18tube2008 .com<br />
adultstreamportal2008 .com<br />
2008-adult-s2008 .com&nbsp;</b><br />
<a href="http://1.bp.blogspot.com/_wICHhTiQmrA/SKyBJNS-u7I/AAAAAAAACFU/0QslE2edBHQ/s1600-h/best_celebs_viz.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/_wICHhTiQmrA/SKyBJNS-u7I/AAAAAAAACFU/KWv9siOWkAg/s200-R/best_celebs_viz.JPG" /></a><b>new-content-s2008 .com<br />
newcontent-s2008 .com<br />
worldstars2008 .com<br />
thestars2008 .com<br />
thebigstars2008 .com<br />
newcontents2008 .com<br />
18x-adult2008 .com<br />
2008adult2008 .com<br />
adult-x2008 .com<br />
hotadulttube08 .com<br />
adultxx-18 .com<br />
newcontent-s2008a .com<br />
antivirus2008pro-download .com<br />
onlinestreamvide .com<br />
onlinestreamvide .com<br />
ns2.onlinestreamvide .com<br />
xxxstreamonline .com4<br />
supersoft21freeware .com<br />
kvm-secure .com<br />
kvmsecure .com<br />
themusic-08portal .com<br />
adultstreamportal .com<br />
streamxxxvideo .com<br />
antivirus-2008-pro .com<br />
antivirus2008-pro .com<br />
antivirus-2008pro .com<br />
thefunny-08 .com<br />
thestars-08 .com<br />
thestars08 .com <br />
celebsnofake .com<br />
adult-s-portal .com<br />
adultsoftcodec .com<br />
adultstreamportal .com<br />
adultxx-18 .com</b><br />
<br />
<div style="text-align: left;"></div><div class="separator" style="clear: both; text-align: center;"></div><a href="http://3.bp.blogspot.com/_wICHhTiQmrA/SKyAwLrICsI/AAAAAAAACFM/qnTzrD0L-ow/s1600-h/fake_celebrity_malware1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/_wICHhTiQmrA/SKyAwLrICsI/AAAAAAAACFM/zejNrANC_lc/s200-R/fake_celebrity_malware1.png" /></a>And while none of these seem to be taking advantage of client-side exploits, a Russian celebrity site that seems to by syndicating the malicious redirectors from a legitimate advertising network, is an exception worth point out due to the Adobe Flash player exploit it's attempting to take advantage of. <b>&nbsp;</b><br />
<br />
<b>Bestcelebs .ru</b> javascript redirectors through several different doorways :<br />
<br />
<a href="http://2.bp.blogspot.com/_wICHhTiQmrA/SKyCIPWrPkI/AAAAAAAACFc/1o_3Oou-C9U/s1600-h/best_celebs1.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/_wICHhTiQmrA/SKyCIPWrPkI/AAAAAAAACFc/sp7U9iiSyqg/s200-R/best_celebs1.JPG" /></a><b>crklab .us</b>/index.php =&gt; <b>firstblu .cn</b>/3.php?19383577 =&gt; <b>xanjan .cn</b>/in.cgi?mytraf =&gt; <b>atomakayan .biz</b>/afterftpcheck/2603/index.php =&gt; <br />
<b>toksikoza .net</b>/fi/index.php?mytraf =&gt; <b>toksikoza .net</b>/fi/1.swf<br />
<br />
<div style="text-align: left;"></div><div class="separator" style="clear: both; text-align: center;"></div>What you see is so not what you get.<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?a=wHAK8K"><img src="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?i=wHAK8K" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?a=irKgjK"><img src="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?i=irKgjK" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?a=uNxeIk"><img src="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?i=uNxeIk" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?a=NhDw6k"><img src="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?i=NhDw6k" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?a=wScNuK"><img src="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?i=wScNuK" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?a=m9soyK"><img src="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?i=m9soyK" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?a=ISkINk"><img src="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?i=ISkINk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DanchoDanchevOnSecurityAndNewMedia/~4/370688968" height="1" width="1"/>]]></content:encoded>
      <pubDate>Wed, 20 Aug 2008 21:52:00 +0000</pubDate>
      <category domain="http://securityratty.com/tag/celebrity video sites">celebrity video sites</category>
      <category domain="http://securityratty.com/tag/net">net</category>
      <category domain="http://securityratty.com/tag/org">org</category>
      <category domain="http://securityratty.com/tag/net fi1">net fi1</category>
      <category domain="http://securityratty.com/tag/russian celebrity site">russian celebrity site</category>
      <category domain="http://securityratty.com/tag/site">site</category>
      <category domain="http://securityratty.com/tag/php">php</category>
      <category domain="http://securityratty.com/tag/net fiindex">net fiindex</category>
      <category domain="http://securityratty.com/tag/previous post">previous post</category>
      <source url="http://feeds.feedburner.com/~r/DanchoDanchevOnSecurityAndNewMedia/~3/370688968/fake-celebrity-video-sites-serving.html">Fake Celebrity Video Sites Serving Malware - Part Two</source>
    </item>
    <item>
      <title><![CDATA[The Twitter Malware Campaign Wants to Bank With You]]></title>
      <link>http://securityratty.com/article/0a86c9e6b40c8995b8c3f84a2d12480a</link>
      <guid>http://securityratty.com/article/0a86c9e6b40c8995b8c3f84a2d12480a</guid>
      <description><![CDATA[In what appears to be a lone gunman malware campaign -- where the malware spreader even left his email address within the binary - the now down Twitter malware campaign managed to attract only 69...]]></description>
      <content:encoded><![CDATA[<div style="text-align: left;"></div><div class="separator" style="text-align: center; clear: both;"></div><a href="http://bp0.blogger.com/_wICHhTiQmrA/SJgk-RghwII/AAAAAAAAB_c/xbrYBDO4K9Q/s1600-h/twitter_malware1.JPG" imageanchor="1" style="border: 0pt none ; background-color: transparent; clear: left; margin-bottom: 1em; float: left; margin-right: 1em;"><img src="http://bp0.blogger.com/_wICHhTiQmrA/SJgk-RghwII/AAAAAAAAB_c/om2-uxKUmR4/s200-R/twitter_malware1.JPG" style="border: 0pt none ;" /></a>In <a href="http://www.twitpwn.com/2008/08/coming-up-malware-on-twitter.html">what appears to</a> be a lone gunman <a href="http://www.viruslist.com/en/weblog?weblogid=208187551">malware campaign</a> -- where the malware spreader even left his email address within the binary - the now down <a href="http://blogs.guardian.co.uk/technology/2008/08/05/twiters_trojan_problem.html">Twitter malware campaign</a> managed to attract only 69 followers before it has shut down, <a href="http://www.techcrunch.com/2008/07/27/who-is-johng77536-and-how-did-he-game-twitter/">using a trivial approach</a> for launching an XSS worm - <a href="http://en.wikipedia.org/wiki/Cross-site_request_forgery">Cross-site request forgery</a> (CSRF). More info :<br />
<br />
"<i>This week it’s Twitter’s turn to host an attack - one that is targeting both Twitter users and the Internet community at large. In this case it's a malicious Twitter profile twitter.com/[skip]/ with a name that is Portuguese for ‘pretty rabbit’ which has a photo advertising a video with girls posted.&nbsp;</i><br />
<br />
<i>This profile has obviously been created especially for infecting users, as there is no other data except the photo, which contains the link to the video. If you click on the link, you get a window that shows the progress of an automatic download of a so-called new version of Adobe Flash which is supposedly required to watch the video. You end up with a file labeled Adobe Flash (it’s a fake) on your machine; a technique that is currently very popular.</i>"<br />
<br />
<div style="text-align: left;"></div><div class="separator" style="text-align: center; clear: both;"></div><a href="http://bp0.blogger.com/_wICHhTiQmrA/SJg7qxrXS-I/AAAAAAAAB_k/X5JjQEBfcgc/s1600-h/twitter_malware.JPG" imageanchor="1" style="border: 0pt none ; background-color: transparent; clear: left; margin-bottom: 1em; float: left; margin-right: 1em;"><img src="http://bp0.blogger.com/_wICHhTiQmrA/SJg7qxrXS-I/AAAAAAAAB_k/tnrV5eIbz1M/s200-R/twitter_malware.JPG" style="border: 0pt none ;" /></a>Let's analyze the campaign before it was shut down. The original Twitter account used <b>twitter.com/video_kelly_key</b> basically included a link to <b>player-video-youtube.sytes.net</b> (204.16.252.98) which was using a URL shortening service <b>fly2.ws/NilOMN3</b> in order to redirect to the banker malware located at <b>freewebtown.com/construimagens/ Play-video-youtube.kelly-key.com</b>. It's detection rate is as follows :<br />
<br />
<b>Scanners Result</b>: 14/36 (38.89%)<br />
Trojan-Spy.Win32.Banker.caw <br />
<b>File size</b>: 88064 bytes<br />
<b>MD5</b>...: 25600af502758ca992b9e7fff3739def<br />
<b>SHA1</b>..: 9262ca501ef388e0fe42c50a3d002ddbd6e254f2<br />
<br />
<div style="text-align: left;"></div><div class="separator" style="text-align: center; clear: both;"></div><a href="http://bp3.blogger.com/_wICHhTiQmrA/SJg8dgf3PnI/AAAAAAAAB_s/zemAG6fn3rM/s1600-h/xss_csrfworm.png" imageanchor="1" style="border: 0pt none ; background-color: transparent; clear: left; margin-bottom: 1em; float: left; margin-right: 1em;"><img src="http://bp3.blogger.com/_wICHhTiQmrA/SJg8dgf3PnI/AAAAAAAAB_s/lOjia4dpUaw/s200-R/xss_csrfworm.png" style="border: 0pt none ;" /></a>Twitter isn't an exception to the realistic potential for <a href="http://0x000000.com/index.php?i=512&amp;bin=1000000000">XSS worms though CSRF that could affect each and every Web 2.0 service</a>, which as a matter of fact have all suffered such attempts, namely, <a href="http://ha.ckers.org/blog/20071220/orkut-xss-worm" title="Orkut XSS Worm">Orkut</a>, <a href="http://en.wikipedia.org/wiki/Samy_%28XSS%29" title="Samy MySpace XSS Worm">MySpace</a> (as well as the <a href="http://securitylabs.websense.com/content/Alerts/1319.aspx" title="MySpace QuickTime XSS Flaw">QuickTime XSS flaw</a>), <a href="http://blogs.securiteam.com/index.php/archives/786" title="GaiaOnline XSS Worm">GaiaOnline</a>, <a href="http://sirdarckcat.blogspot.com/2007/12/making-social-network-xss-worm-hi5com.html" title="Hi5 XSS Worm">Hi5</a>, and most recently the <a href="http://blogs.zdnet.com/security/?p=1487">XSS worm at Justin.tv</a>, demonstrate that trivial vulnerabilities come handy for what's to turn into a major security incident if not taken care of promptly.<br />
<br />
<b>Related posts:</b><br />
<a href="http://ddanchev.blogspot.com/2007/05/xss-planet.html">XSS The Planet</a><br />
<a href="http://ddanchev.blogspot.com/2007/02/xss-vulnerabilities-in-e-banking-sites.html">XSS Vulnerabilities in E-banking Sites</a><br />
<a href="http://ddanchev.blogspot.com/2006/05/current-state-of-web-application-worms.html">The Current State of Web Application Worms</a><br />
<a href="http://ddanchev.blogspot.com/2007/06/g0t-xssed.html">g0t XSSed?</a><br />
<a href="http://ddanchev.blogspot.com/2006/06/web-application-email-harvesting-worm.html">Web Application Email Harvesting Worm </a><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?a=oWAtgK"><img src="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?i=oWAtgK" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?a=L5UJoK"><img src="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?i=L5UJoK" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?a=dlgqak"><img src="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?i=dlgqak" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?a=3uAsZk"><img src="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?i=3uAsZk" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?a=YHdd5K"><img src="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?i=YHdd5K" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?a=AezGSK"><img src="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?i=AezGSK" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?a=JZQeBk"><img src="http://feeds.feedburner.com/~f/DanchoDanchevOnSecurityAndNewMedia?i=JZQeBk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DanchoDanchevOnSecurityAndNewMedia/~4/356281978" height="1" width="1"/>]]></content:encoded>
      <pubDate>Tue, 05 Aug 2008 03:14:42 +0000</pubDate>
      <category domain="http://securityratty.com/tag/twitter">twitter</category>
      <category domain="http://securityratty.com/tag/twitter malware campaign">twitter malware campaign</category>
      <category domain="http://securityratty.com/tag/xss">xss</category>
      <category domain="http://securityratty.com/tag/xss vulnerabilities">xss vulnerabilities</category>
      <category domain="http://securityratty.com/tag/original twitter account">original twitter account</category>
      <category domain="http://securityratty.com/tag/xss worms">xss worms</category>
      <category domain="http://securityratty.com/tag/xss worm">xss worm</category>
      <category domain="http://securityratty.com/tag/twitter users">twitter users</category>
      <category domain="http://securityratty.com/tag/worm">worm</category>
      <source url="http://feeds.feedburner.com/~r/DanchoDanchevOnSecurityAndNewMedia/~3/356281978/twitter-malware-campaign-wants-to-bank.html">The Twitter Malware Campaign Wants to Bank With You</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[Better exception reporting in ASP.NET]]></title>
      <link>http://securityratty.com/article/34119f443c0ec116d6e16efd70378528</link>
      <guid>http://securityratty.com/article/34119f443c0ec116d6e16efd70378528</guid>
      <description><![CDATA[In my last post , I commented on how ASP.NET health monitoring doesn't output stack traces for inner exceptions, which can be problematic due to its heavy reliance on reflection. I spent the morning...]]></description>
      <content:encoded><![CDATA[<p>In <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">my last post</a>, I commented on how ASP.NET health monitoring doesn&#39;t output stack traces for inner exceptions, which can be problematic due to its heavy reliance on reflection. I spent the morning doing some further spelunking with <a href="http://www.aisto.com/roeder/dotnet/" target="_blank">reflector</a>, and my first solution was to implement a custom WebEvent that overrides ToString() to format itself with all of the data I care about. I then overrode the Error event via global.asax and raised my custom event, instead of letting ASP.NET raise its default event. This worked reasonably well with the SimpleMailWebEventProvider, but didn&#39;t seem to change anything at all with the event log provider.</p> <p>What I found is that the two providers were using entirely different means to format the events! The email provider calls ToString(bool, bool) on the event to ask it to format itself. But the EventLogWebEventProvider does its own formatting of individual fields of the event. Indeed, its ProcessEvent method has a big list of checks:</p><pre class="csharpcode"><span class="kwrd">if</span> (eventRaised <span class="kwrd">is</span> WebBaseErrorEvent)
    AddErrorStuff();
<span class="kwrd">if</span> (eventRaised <span class="kwrd">is</span> WebAuthenticationSuccessAuditEvent)
    AddLogonStuff();
</pre>
<p>So it seemed like a better approach would be to write my own provider. I left the event log provider alone, and I wrote a custom email provider to display errors in a more useful way. This also allowed me to drop some fields from the event report that aren&#39;t useful for us. And I was able to construct a much more concise and useful subject line (the subject line that SimpleMailWebEventProvider uses is rather clunky since it assumes it might be spitting out a whole bunch of buffered events in one go).</p>
<p>Not only does my provider include the stack traces for all of the exceptions in the chain, but in the subject line, I display the type of error that is at the root of the problem. So if I am formatting a TargetInvocationException, I drill into its InnerException chain until I find a different exception type, and display that exception type instead.</p>
<p>Oh, one other benefit of building the custom provider instead of using a custom WebEvent was that I was then able to remove the Error handler from global.asax. All I had to do was replace the SimpleMailWebEventProvider with my own provider, and I got the behavior I wanted. Now my email notifications include detailed stack traces.</p>
<p>I&#39;ll post the code for this provider once it&#39;s run for a little while in production and I&#39;m satisfied that it works reasonably well.</p><div style="clear:both;"></div><img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=52314" width="1" height="1">]]></content:encoded>
      <pubDate>Fri, 01 Aug 2008 16:30:05 +0000</pubDate>
      <category domain="http://securityratty.com/tag/error event">error event</category>
      <category domain="http://securityratty.com/tag/event">event</category>
      <category domain="http://securityratty.com/tag/provider">provider</category>
      <category domain="http://securityratty.com/tag/default event">default event</category>
      <category domain="http://securityratty.com/tag/email provider calls">email provider calls</category>
      <category domain="http://securityratty.com/tag/event log provider">event log provider</category>
      <category domain="http://securityratty.com/tag/provider include">provider include</category>
      <category domain="http://securityratty.com/tag/custom email provider">custom email provider</category>
      <category domain="http://securityratty.com/tag/output stack traces">output stack traces</category>
      <source url="http://www.pluralsight.com/community/blogs/keith/archive/2008/08/01/better-exception-reporting-in-asp-net.aspx">Better exception reporting in ASP.NET</source>
    </item>
    <item>
      <title><![CDATA[ASP.NET Health Monitoring doesn't log inner exception stack trace]]></title>
      <link>http://securityratty.com/article/b3299c7401f4189ad9619ab42a4a438e</link>
      <guid>http://securityratty.com/article/b3299c7401f4189ad9619ab42a4a438e</guid>
      <description><![CDATA[This can be a problem, especially when an ObjectDataSource starts throwing exceptions. The stack trace looks the same because of the way the methods are invoked (via reflection) - you end up with a...]]></description>
      <content:encoded><![CDATA[<p>This can be a problem, especially when an ObjectDataSource starts throwing exceptions. The stack trace looks the same because of the way the methods are invoked (via reflection) - you end up with a stack trace for a TargetInvocationException, which basically says, &quot;I used reflection to invoke some method, and it threw an exception. See the inner exception for details.&quot;</p>
<p>ASP.NET&#39;s health monitoring system does list the inner exceptions (apparently up to a maximum depth of two, from spelunking the code with <a href="http://www.aisto.com/roeder/dotnet/">reflector</a>), but it does not emit the stack traces for these exceptions, which would be <i>really helpful</i>. I&#39;ve spent some time this morning trying to figure out how I&#39;d customize things to emit this, and it looks like what I&#39;d have to do is catch the exception and generate a custom WebEvent that overrides ToString(bool, bool) and does everything that WebRequestErrorEvent does, but also generate the inner stack trace.</p>
<p>That seems a bit ugly. A search for &quot;ASP.NET web event inner exception stack trace&quot; yielded no interesting results, so if you&#39;ve dealt with this and have a cleaner solution, let me know. I&#39;ll post my solution once I get it worked out.</p><div style="clear:both;"></div><img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=52306" width="1" height="1">]]></content:encoded>
      <pubDate>Fri, 01 Aug 2008 12:21:00 +0000</pubDate>
      <category domain="http://securityratty.com/tag/exception stack trace">exception stack trace</category>
      <category domain="http://securityratty.com/tag/exception">exception</category>
      <category domain="http://securityratty.com/tag/stack trace">stack trace</category>
      <category domain="http://securityratty.com/tag/net">net</category>
      <category domain="http://securityratty.com/tag/net web event">net web event</category>
      <category domain="http://securityratty.com/tag/asp">asp</category>
      <category domain="http://securityratty.com/tag/exceptions">exceptions</category>
      <category domain="http://securityratty.com/tag/solution">solution</category>
      <category domain="http://securityratty.com/tag/cleaner solution">cleaner solution</category>
      <source url="http://www.pluralsight.com/community/blogs/keith/archive/2008/08/01/asp-net-health-monitoring-doesn-t-log-inner-exception-stack-trace.aspx">ASP.NET Health Monitoring doesn't log inner exception stack trace</source>
    </item>
    <item>
      <title><![CDATA["Walking" with the SDL - Part 4]]></title>
      <link>http://securityratty.com/article/ce96a44cff02b1bc67ce9b397efe89a4</link>
      <guid>http://securityratty.com/article/ce96a44cff02b1bc67ce9b397efe89a4</guid>
      <description><![CDATA[Jeremy Dallman here with the final piece of my multi-part series on Walking with the Security Development Lifecycle (SDL) [ Part 1 , Part 2 , Part 3 ]. So far I have discussed getting management...]]></description>
      <content:encoded><![CDATA[<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3 face=Calibri>Jeremy Dallman here with the final piece of my multi-part series on “Walking” with the Security Development Lifecycle (SDL) [</FONT><A href="http://blogs.msdn.com/sdl/archive/2008/07/18/walking-with-the-sdl-part-1.aspx"><FONT size=3 face=Calibri>Part 1</FONT></A><FONT size=3 face=Calibri>, </FONT><A href="http://blogs.msdn.com/sdl/archive/2008/07/21/walking-with-the-sdl-part-2.aspx"><FONT size=3 face=Calibri>Part 2</FONT></A><FONT size=3 face=Calibri>, </FONT><A href="http://blogs.msdn.com/sdl/archive/2008/07/23/walking-with-the-sdl-part-3.aspx"><FONT size=3 face=Calibri>Part 3</FONT></A><FONT size=3><FONT face=Calibri>]. So far I have discussed getting management approval, expanding security training, formalizing security requirements and effective ways to reuse your threat model or attack surface review data. <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>In this post, I will wrap up with a look into setting up final security reviews and managing post-release documentation.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><FONT size=3><FONT face=Calibri>Formalize your Final Security Review (FSR) Process<o:p></o:p></FONT></FONT></B></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>A Final Security Review is your final security audit to ensure your software is secure enough to deliver to your customers. I will assume the idea of an FSR is a new concept and try to provide some FAQ-style detail on this topic.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri><B style="mso-bidi-font-weight: normal"><I style="mso-bidi-font-style: normal"><U>Who is the FSR team?</U></I></B> An FSR Team usually consists of a non-product-team security expert (for impartial perspective), a security representative from the product team, and individual representatives from the separate disciplines. However, that size team may not scale to your company. If that is the case, at a minimum, you should have an impartial “outsider” separate from the product team who understands the security requirements as well as the measurements used to validate them. This person along with a project manager can probably perform the bulk of the FSR with development or test leadership providing input as needed.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri><B style="mso-bidi-font-weight: normal"><I style="mso-bidi-font-style: normal"><U>What is needed to do an FSR?</U></I></B> All threat models should be revised to reflect the final product, the code should be complete, and all security-related testing should be completed and documented. In addition, everyone involved in the FSR should have full access to the bug database to review status or exceptions to security bugs.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><I style="mso-bidi-font-style: normal"><U><FONT size=3><FONT face=Calibri>What does an FSR team do? <o:p></o:p></FONT></FONT></U></I></B></P>
<OL style="MARGIN-TOP: 0in" type=1>
<LI style="MARGIN: 0in 0in 10pt; mso-list: l1 level1 lfo1" class=MsoNormal><FONT size=3><FONT face=Calibri>Re-review threat models to verify all mitigations identified in those exercises were fixed or went through an exception process. <o:p></o:p></FONT></FONT></LI>
<LI style="MARGIN: 0in 0in 10pt; mso-list: l1 level1 lfo1" class=MsoNormal><FONT size=3><FONT face=Calibri>Verify that all security issues uncovered during the development process were fixed or granted exceptions by the appropriate people. This is where you verify whether the state of your security bugs meets the “bug bar” requirements you have defined for your products.<o:p></o:p></FONT></FONT></LI>
<LI style="MARGIN: 0in 0in 10pt; mso-list: l1 level1 lfo1" class=MsoNormal><FONT size=3><FONT face=Calibri>If there is any output from security tools that you have used to define requirements, the FSR team would verify that the results of the tools meet the security requirements.<o:p></o:p></FONT></FONT></LI>
<LI style="MARGIN: 0in 0in 10pt; mso-list: l1 level1 lfo1" class=MsoNormal><FONT size=3><FONT face=Calibri>Review all exceptions to verify that they approve these decisions in the context of the final product. If they identify risks associated with the exceptions, they should communicate those to the business ownership for a final decision before signoff. Any decisions related to known risks should also be reflected in the response plan for future reference.<o:p></o:p></FONT></FONT></LI>
<LI style="MARGIN: 0in 0in 10pt; mso-list: l1 level1 lfo1" class=MsoNormal><FONT size=3><FONT face=Calibri>Finally, there should be a final signoff exercise where all security people and project leadership jointly approve the decision of the Final Security Review.<o:p></o:p></FONT></FONT></LI></OL>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri><B style="mso-bidi-font-weight: normal"><I style="mso-bidi-font-style: normal"><U>How long does an FSR take?</U></I></B> If done correctly, the FSR will likely take some time. You should schedule this review well in advance of your release date to give your FSR team some time to complete the review, push issues back to the product team, and respond to any serious issues that may be discovered.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Final security reviews are a crucial piece to your Security Development Lifecycle. It would be easy to encourage secure development in your team, but as you expand your process to include formal security requirements and begin enforcing those requirements, it is necessary to perform a final audit of your product before it is released. Your customers will thank you for taking the time to add this layer of quality control to your operations and you will likely save yourself some security embarrassment down the road by adding a FSR to the end of your product cycle.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><FONT size=3><FONT face=Calibri>Document security work for reference<o:p></o:p></FONT></FONT></B></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>After the FSR is complete, there is still work for the security team. The final FSR documentation should be archived along with the symbols and code that represents the finished project. This becomes the time-stamped “snapshot” of your product. Your post-release process should include archiving the following documents in an easily accessible location:<o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpFirst><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>All final threat models for future reference. <o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpMiddle><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Bug bars, tool settings, and test results related to your project and the supporting tools used to validate. These will be referenced and reused in the next product cycle. <o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpMiddle><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>All documented security bug exceptions. These need to be rolled into your next product cycle to ensure they are addressed. <o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpMiddle><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>The final symbols that reflect the product shipped should be archived.<o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpMiddle><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>The Final Security Report and project signoffs to validate your security audit activity <o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoListParagraphCxSpMiddle><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3 face=Calibri>Your </FONT><A href="http://www.microsoft.com/security/msrc/incident_response.mspx"><FONT size=3 face=Calibri>Incident Response Plan</FONT></A><FONT size=3><FONT face=Calibri> (discussed in the Crawl post). This must be accessible for quick reference if security incidents occur.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.25in; mso-add-space: auto" class=MsoListParagraphCxSpMiddle><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 10pt; mso-add-space: auto" class=MsoListParagraphCxSpLast><FONT size=3><FONT face=Calibri>Archiving this evidence serves a few critical purposes: it shows historic evidence of the work you did to ensure a secure product, allows you to postmortem the results and improves your process each time, and reduces the amount of time your team will have to spend next time around by making the existing resources reusable.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><FONT size=3><FONT face=Calibri>In closing…<o:p></o:p></FONT></FONT></B></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>I hope this long series has provided some practical steps you can take to move your Security Development Lifecycle practices to the next level. At Microsoft, creating a lifecycle to match security development practices has faced a fair share of challenges. However, the investment and time has resulted in more secure products. We’ll continue refining how we execute the Security Development Lifecycle and hope to share those ideas with you along the way. We welcome your thoughts and questions as you start “Walking” with the SDL in your own company and look forward to seeing more secure products and customers as a result. <o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>I’ve created a unique tag on the SDL Blog to cover this series. To get a full list of the related posts, click the “Crawl Walk Run” tag on the left column. I’ll post a Word document version of the full “Walk” series sometime in the next week.<o:p></o:p></FONT></FONT></P><img src="http://blogs.msdn.com/aggbug.aspx?PostID=8772987" width="1" height="1">]]></content:encoded>
      <pubDate>Fri, 25 Jul 2008 16:49:00 +0000</pubDate>
      <category domain="http://securityratty.com/tag/team">team</category>
      <category domain="http://securityratty.com/tag/product team">product team</category>
      <category domain="http://securityratty.com/tag/requirements">requirements</category>
      <category domain="http://securityratty.com/tag/define requirements">define requirements</category>
      <category domain="http://securityratty.com/tag/security requirements">security requirements</category>
      <category domain="http://securityratty.com/tag/security">security</category>
      <category domain="http://securityratty.com/tag/final security report">final security report</category>
      <category domain="http://securityratty.com/tag/threat models">threat models</category>
      <category domain="http://securityratty.com/tag/re-review threat models">re-review threat models</category>
      <source url="http://blogs.msdn.com/sdl/archive/2008/07/25/walking-with-the-sdl-part-4.aspx">"Walking" with the SDL - Part 4</source>
    </item>
  </channel>
</rss>
