<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>C# Hacker - The Rambling Coder &#187; Security</title>
	<atom:link href="http://www.csharphacker.com/technicalblog/index.php/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.csharphacker.com/technicalblog</link>
	<description>Thoughts and ponderings on the technical world</description>
	<lastBuildDate>Thu, 22 Jul 2010 02:15:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Who knows of the .Net Secure Strings?</title>
		<link>http://www.csharphacker.com/technicalblog/index.php/2010/01/21/who-knows-of-the-net-secure-strings/</link>
		<comments>http://www.csharphacker.com/technicalblog/index.php/2010/01/21/who-knows-of-the-net-secure-strings/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 14:58:29 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.csharphacker.com/technicalblog/?p=465</guid>
		<description><![CDATA[While SecureString is certainly not a new kid on the block it is often overlooked by .Net programmers that are programming applications that deal with sensitive data (think PCI, KeyManagement, Passwords, Credit cards etc). This article aims to bring everyone up to speed why there is information leakage in .Net and how SecureString aims to resolve that.]]></description>
			<content:encoded><![CDATA[<p>[Warning this is not new stuff - but shouldn't be overlooked if you need to secure sensitive data in your application]</p>
<p>Isn&#8217;t &#8220;Secure String&#8221; an oxymoron for .Net? So if we are thinking about securing some sensitive data in say C or C++ its relatively simple load it into a char array memory and encrypt it, wiping the memory out after the information has been loaded.</p>
<p>Now try that with .Net! From the Microsoft site:</p>
<blockquote><p>&#8220;<a href="http://msdn.microsoft.com/en-us/library/system.string%28VS.71%29.aspx">A String is called immutable because its value cannot be modified once it has been created.</a>&#8220;</p></blockquote>
<p>So how can you destroy one? Set it to empty? Well simply put you can&#8217;t <img src='http://www.csharphacker.com/technicalblog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . Once your string is not longer referenced, or worse yet your object containing the string its time for the <a href="http://msdn.microsoft.com/en-us/library/ms973837.aspx">Garbage Collector</a> to come and do its work. The problem is if your object has been around long enough to get into Generation 1 or 2 then it is going to take a bit longer.</p>
<p>Hmmm so in translation if you keep a password, Credit Card, encryption key or some other sensitive text in memory as a string you cant destroy it (think memset for us oldies!). Only the GC can free the memory for you, and you are dependent on HOW it frees that memory. I personally don&#8217;t know for a fact if it memsets it to blank, or just dereferences the pointer. However I would be willing to bet it is the option that requires the least amount of work and that doesn&#8217;t bode well for controlling the exposure of our sensitive data.</p>
<p>Plainly that proverbially sucks!</p>
<p>Enter the &#8220;<a href="http://msdn.microsoft.com/en-us/library/system.security.securestring.aspx">SecureString</a>&#8221; class, from the MS site it says:</p>
<blockquote><p>&#8220;Represents text that should be kept confidential. The text is encrypted for privacy when being used, and deleted from computer memory when no longer needed.&#8221;</p></blockquote>
<p>Wow doesn&#8217;t that just sound like the ticket we need! Secure, Encryption, delete from memory &#8211; how fantastic! Uh oh keep reading the remarks:</p>
<blockquote><p>&#8220;Your application can render the instance immutable and prevent further modification by invoking the <a href="http://msdn.microsoft.com/en-us/library/system.security.securestring.makereadonly.aspx">MakeReadOnly</a> method.</p>
<p>&#8230;</p>
<p>Use appropriate members of the <a href="http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.marshal.aspx">System.Runtime.InteropServices..::.Marshal</a> class, such as the <a href="http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.marshal.securestringtobstr.aspx">SecureStringToBSTR</a> method, to manipulate the value of a SecureString object.&#8221;</p></blockquote>
<p>BSTR &#8211; oh I feel the COM headache coming back!</p>
<p>Actually its really not that bad, but its definitely not a straight swap for a System.String. See some example code below:</p>
<pre class="brush: csharp;">

using System;
using System.Text;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Security;

namespace CSharpHacker.Utilities
{
   /// &lt;summary&gt;
   /// Demo helper class for &lt;see cref=&quot;SecureString&quot;/&gt;
   /// &lt;/summary&gt;
   public class SensitiveDataHelper
   {
      private SecureString sensitiveData;

      /// &lt;summary&gt;
      /// Gets or sets the sensitive data class from helper
      /// &lt;/summary&gt;
      /// &lt;value&gt;The sensitive data container.&lt;/value&gt;
      public SecureString SensitiveData
      {
         get { return sensitiveData; }
         set { sensitiveData = value; }
      }

      /// &lt;summary&gt;
      /// UNSECURE: Converts the secured sensitive data into an unsecured string.
      /// &lt;/summary&gt;
      /// &lt;remarks&gt;
      /// This is a dangerous function that converts secured information into
      /// unsecured data.
      /// &lt;/remarks&gt;
      /// &lt;returns&gt;String representing the secured data&lt;/returns&gt;
      public string SensitiveDataToString()
      {
         IntPtr ptr = Marshal.SecureStringToGlobalAllocUnicode(this.sensitiveData);
         try
         {
             // Unsecure managed string
             return Marshal.PtrToStringUni(ptr);
         }
         finally
         {
             Marshal.ZeroFreeGlobalAllocUnicode(ptr);
         }
      }

      /// &lt;summary&gt;
      /// UNSECURE: Base64s encodes a SHA512 has of the sensitive data
      /// &lt;/summary&gt;
      /// &lt;returns&gt;SHA512 hash value&lt;/returns&gt;
      public string Base64SensitiveDataHash()
      {
         IntPtr bstr = Marshal.SecureStringToBSTR(sensitiveData);
         try
         {
            // Pretend simple hash function that returns a string - this is fake just for readability!!
            string output = Marshal.PtrToStringBSTR(bstr);

            Marshal.FreeBSTR(bstr);

            SHA512 sha = new SHA512Managed();
            byte[] result = sha.ComputeHash(Encoding.UTF8.GetBytes(output));
            return Convert.ToBase64String(result);
         }
         finally
         {
            Marshal.ZeroFreeBSTR(bstr);
         }
      }

      /// &lt;summary&gt;
      /// Loads the sensitive data into a &lt;see cref=&quot;SecureString&quot;/&gt;
      /// &lt;/summary&gt;
      /// &lt;param name=&quot;sensitiveInformation&quot;&gt;The sensitive information to protect.&lt;/param&gt;
      public void LoadSensitiveData(char[] sensitiveInformation)
      {
         try
         {
            using (SecureString securePassword = new SecureString())
            {
               foreach (char c in sensitiveInformation)
               {
                  securePassword.AppendChar(c);
               }
               securePassword.MakeReadOnly();
               this.sensitiveData = securePassword.Copy();
            }
         }
         finally
         {
            // discard the char array
            Array.Clear(sensitiveInformation, 0, sensitiveInformation.Length);
         }
      }

      /// &lt;summary&gt;
      /// Loads the sensitive data into a &lt;see cref=&quot;SecureString&quot;/&gt;
      /// &lt;/summary&gt;
      /// &lt;param name=&quot;sensitiveInformation&quot;&gt;The sensitive information to protect.&lt;/param&gt;
      public void LoadSensitiveData(string sensitiveInformation)
      {
         char[] sensitive = new char[sensitiveInformation.Length];
         sensitiveInformation.CopyTo(0, sensitive, 0, sensitive.Length);

         LoadSensitiveData(sensitive);
      }

      /// &lt;summary&gt;
      /// Loads the sensitive data into a &lt;see cref=&quot;SecureString&quot;/&gt;
      /// &lt;/summary&gt;
      /// &lt;param name=&quot;sensitiveInformation&quot;&gt;The sensitive information to protect.&lt;/param&gt;
      public void LoadSensitiveData(StringBuilder sensitiveInformation)
      {
         char[] sensitive = new char[sensitiveInformation.Length];
         sensitiveInformation.CopyTo(0, sensitive, 0, sensitive.Length);

         LoadSensitiveData(sensitive);
      }

      /// &lt;summary&gt;
      /// Creates the secure string from string.
      /// &lt;/summary&gt;
      /// &lt;param name=&quot;unprotectedSensitiveInformation&quot;&gt;The unprotected sensitive information.&lt;/param&gt;
      /// &lt;returns&gt;&lt;/returns&gt;
      public static SecureString CreateSecureStringFromString(string unprotectedSensitiveInformation)
      {
         char[] unprotectedSensitive = unprotectedSensitiveInformation.ToCharArray();
         SecureString secureInformation = new SecureString();
         try
         {
            foreach (char c in unprotectedSensitive)
            {
               secureInformation.AppendChar(c);
            }
            secureInformation.MakeReadOnly();
            return secureInformation;
         }
         finally
         {
            // discard the char array
            Array.Clear(unprotectedSensitive, 0, unprotectedSensitive.Length);
         }
      }
   }
}
</pre>
<p>A word of caution to the above code:</p>
<ul>
<li>SensitiveDataToString &#8211; is considered insecure as it returns a string of the encrypted data. The same data we are trying to encrypt! However it is a commonly requested function, and so there is the implementation.</li>
<li>Base64SensitiveDataHash &#8211; is considered insecure as it currently uses a temporary string (:-( ), at this time I don&#8217;t have a way to converts a BSTR into a an array without going through a string first. One way would be to process it prior to being made ReadOnly, or alternatively someone can write a comment how to convert a C# BSTR into a byte array!</li>
</ul>
<p>So even with all those disclaimers running a program that takes input will still a &#8216;leak information&#8217; for the System.String. Specifically the tricky area is how do you get them into you program in the first place? Read them from a database, WinForm user input, or a web page? Kinda tricky <img src='http://www.csharphacker.com/technicalblog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ! If you search the web there are implementations of  secure login controls that build it up character by character, but certainly something to think about.</p>
<p>So how Secure is &#8220;SecureString&#8221;? The answer is &#8220;it depends&#8221;, but reasonably secure and a heck of a lot better than System.String. A while ago there was a big storm about tools that can connect to the process and decrypt your SecureStrings. The best rebuttal to this I&#8217;ve seen can be read about in [<a href="http://blogs.msdn.com/shawnfa/archive/2006/11/01/securestring-redux.aspx">SecureString Redux</a>]. I definitely recommend reading this.</p>
<p>Now I have to say I&#8217;ve been meaning to write this for some time now! Hopefully this helped raise awareness of the string leakage risks in the .Net language and ways to help minimize the string information leak scenario.</p>
<p>Potential enhancements to the helper class would be:</p>
<ul>
<li>Make the Hashing really secure, and allow a &#8220;HashAlgorithm&#8221; to be passed in</li>
<li>Allow external encryption</li>
<li>Allow secure serialization of data (via the encryption)</li>
</ul>
<p>Gareth</p>
]]></content:encoded>
			<wfw:commentRss>http://www.csharphacker.com/technicalblog/index.php/2010/01/21/who-knows-of-the-net-secure-strings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Links to Software Security Code reviews</title>
		<link>http://www.csharphacker.com/technicalblog/index.php/2010/01/15/links-to-security-code-reviews/</link>
		<comments>http://www.csharphacker.com/technicalblog/index.php/2010/01/15/links-to-security-code-reviews/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 02:48:16 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.csharphacker.com/technicalblog/?p=480</guid>
		<description><![CDATA[Here is a link of helpful links if you want to double check your existing security code process (y&#8217;all do have them &#8211; right?): [OWASP Code Review] [How To: Perform a Security Code Review for Managed Code] [Phase 1: Conduct a Security Design Review] [Security Code Reviews] Note as other are suggested, or I find [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a link of helpful links if you want to double check your existing security code process (y&#8217;all do have them &#8211; right?):</p>
<ul>
<li>[<a href="http://www.owasp.org/index.php/OWASP_Code_Review_Guide_Table_of_Contents">OWASP Code Review</a>]</li>
<li>[<a href="http://msdn.microsoft.com/en-us/library/ms998364.aspx">How To: Perform a Security Code Review for Managed Code</a>]</li>
<li>[<a href="http://blogs.msdn.com/ace_team/archive/2009/10/19/dogfooding-how-microsoft-it-information-security-dogfoods-phase-1-conduct-a-security-design-review.aspx">Phase 1: Conduct a Security Design Review</a>]</li>
<li>[<a href="http://www.codesecurely.info/Wiki/view.aspx/Security_Code_Reviews">Security Code Reviews</a>]</li>
</ul>
<p>Note as other are suggested, or I find others I&#8217;ll update the list.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.csharphacker.com/technicalblog/index.php/2010/01/15/links-to-security-code-reviews/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How security is very much like MMA</title>
		<link>http://www.csharphacker.com/technicalblog/index.php/2009/09/20/how-security-is-very-much-like-mma/</link>
		<comments>http://www.csharphacker.com/technicalblog/index.php/2009/09/20/how-security-is-very-much-like-mma/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 16:19:25 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.csharphacker.com/technicalblog/?p=461</guid>
		<description><![CDATA[It occurred to me after following the most recent UFC MMA (via the web blogs rather than PPV as I&#8217;m still too cheap!) that security and MMA have a lot in common. More precisely the fighters in a stable as very similar to security algorithms or process. Once a fighters weakness has been exposed there [...]]]></description>
			<content:encoded><![CDATA[<p>It occurred to me after following the most recent UFC MMA (via the web blogs rather than PPV as I&#8217;m still too cheap!) that security and MMA have a lot in common. More precisely the fighters in a stable as very similar to security algorithms or process.</p>
<p>Once a fighters weakness has been exposed there is really nothing you can do to unhide that weakness. You could have the best fighter in the world one day, then the weakness is exposed&#8230; You are in trouble!</p>
<p>Security is very much the same. You can perform all the scans, probes, fuzzes, code reviews and feel confident (well as confident anyone does in the security world!) that you are pretty well covered. One revelation a day later can completely invalidate your expectations, and you have to completely start over. Sometimes it is a slow build up, other times it is the equivalent of a bomb.</p>
<p>Bottom line is once a weakness has been exposed you need to:</p>
<ul>
<li>See if it can be simply covered
<ul>
<li>Fighter can learn to defend against take downs (or not get hit in the head <img src='http://www.csharphacker.com/technicalblog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  )</li>
<li>Algorithm can be enhanced to extend its life DES==&gt;3DES</li>
</ul>
</li>
<li>Relegate
<ul>
<li>Fighter acts as the &#8216;gatekeeper&#8217; to the higher competition levels</li>
<li>Algorithms security clearance has been lowered, it cant be used in the more secure areas. Examples of this are theoretical discoveries that are likely to result in the actual weakness discover some time later.</li>
</ul>
</li>
<li>Retire
<ul>
<li>Fighter retires, becomes a commentator!</li>
<li>Algorithm depreciated as it is shown to be fundamentally insecure, now studied in university to show the weakness that designers need to be aware of. Think WEP!</li>
</ul>
</li>
</ul>
<p>If the weakness is known it is natural the opponent will attempt to get a competitive advantage using it. The longer the weakness is known the more adept the opposition will be at exploiting it.  This is true for both MMA &amp; security!</p>
<p>Companies running a SDL are the equivalent to the fighters stable. It is their job to recognize the weaknesses and manage the processes and algorithms so any weaknesses are covered or retired before they become a major problem.</p>
<p>Gareth</p>
]]></content:encoded>
			<wfw:commentRss>http://www.csharphacker.com/technicalblog/index.php/2009/09/20/how-security-is-very-much-like-mma/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Better way to determine and police Password Strengths</title>
		<link>http://www.csharphacker.com/technicalblog/index.php/2009/09/13/better-way-to-determine-and-police-password-strengths/</link>
		<comments>http://www.csharphacker.com/technicalblog/index.php/2009/09/13/better-way-to-determine-and-police-password-strengths/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 23:41:02 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.csharphacker.com/technicalblog/?p=435</guid>
		<description><![CDATA[Perhaps my Google search mo-jo has been acting up, but I could not find a good strong C# implementation for strong passwords (in fact I really couldn&#8217;t find much outside of logical cut &#38; paste of implementations of random Information entropy implementations) . They were all predicated on the relatively standard assessment that all submitted [...]]]></description>
			<content:encoded><![CDATA[<p>Perhaps my Google search mo-jo has been acting up, but I could not find a good strong C# implementation for strong passwords (in fact I really couldn&#8217;t find much outside of logical cut &amp; paste of implementations of random Information entropy implementations) . They were all predicated on the relatively standard assessment that all submitted passwords are random &#8211; uh huh!</p>
<p>For starters I recommend reading the article [<a href="http://en.wikipedia.org/wiki/Password_strength">http://en.wikipedia.org/wiki/Password_strength</a>]. This is a good article covering the relative strengths of passwords, and gives a guide for determining the strength of a random password and a human derived password.</p>
<p>The major problem with passwords are that humans need to remember them, or they write them down. In an interesting technology twist historically you only used to  have to worry about your co-workers having access/abusing  your password because there was implicit physical security in place &#8211; you could only log on if you were physically in the office.  As such at that time your biggest threat was your co-workers, unfortunately the secondary defense of physical location has effectively been removed with the internet and VPN technology.  So now your threat count has increased from the people you work with to the entire world! Add to this these people are financially motivated and can directly target you &#8211; its a whole lot scarier out there now!</p>
<p>So before jumping into the implementations we need to go through well known things to avoid to help improve password strength:</p>
<ul>
<li>Avoid sequences &#8211; keyboard or alphabet based (abcd, qwert, 1234, !@#$% etc)</li>
<li>Avoid dictionary words, especially common ones! Be aware that common misspellings are also used in dictionary based attacks &#8211; so unless your misspelling is VERY unusual then you can expect it to be in a dictionary!</li>
<li>Avoid <a href="http://en.wikipedia.org/wiki/Leet">leet/1337</a> password substitution of words (eg P@ssw0rd, M1cr0$0ft, 0\/\/n3d). Again these are now all in dictionaries, so while it may be harder to brute force &#8211; they are pretty trivial for a dictionary attack. Of course it doesnt hurt to be 1337, but it just really doesn&#8217;t help defend a targeted attack.</li>
<li>Avoid team names, socials, license names etc.</li>
</ul>
<p>Things to avoid to minimize compromise exposure:</p>
<ul>
<li>Use different passwords for different online accounts</li>
<li>Avoid using information about you that can be readily be found on the web as a password reset scheme. DOB, where you were born, school name etc.</li>
<li>If any account needs the most rigorous password control it is your email account. Nearly every online system ties back to an email account. If you need to reset a password, it normally goes to your email address. If that is compromised then that is really the opening of Pandora&#8217;s box.</li>
</ul>
<p>Alright, lets start with the weakest &#8216;safe&#8217; approach &#8211; Information entropy:</p>
<ul>
<li>This strength calculation only holds true for &#8216;random&#8217; passwords. No human (at least that I know) can really generate a random password on their own. The best approach that I&#8217;m aware of is to start up notepad and get your two year old to start smacking your keyboard. Then take this text and randomly change case of characters and inserting special characters. Unfortunately this is still weak because we have 2 hands and the keyboard is naturally divided into where your hands go. This generation is not as randomly distributed as people would think &#8211; nor would I recommend it! But at least you have a starting point, but then you have to write it down!</li>
<li>[0-9] &#8211; 10 possible symbols per character &#8211; 3.32 bits of base2 log entropy</li>
<li>[a-z] &#8211; 26 possible symbols per character- 4.7 bits of base2 log entropy</li>
<li>[A-Z] &#8211; 26 possible symbols per character- 4.7 bits of base2 log entropy</li>
<li>[A-Z, 0-9] &#8211; 36 possible symbols per character- 5.17 bits of base2 log entropy</li>
<li>[A-Z,a-z] &#8211; 52 possible symbols per character- 5.7 bits of base2 log entropy</li>
<li>[A-Z, a-z, 0-9] &#8211; 62 possible symbols per character- 5.95 bits of base2 log entropy</li>
<li>[A-Z, a-z, 0-9, Special] &#8211; 94 possible symbols per character &#8211; 6.55 bits of base2 log entropy</li>
</ul>
<p>So we can see that having a strong password using completely random information will be hard to generate on our own, yet this approach is what is what is most commonly used to in web applications to determine password strength. This is not strong enough because humans are naturally not random. Using this  theory the following non-random passwords generate results that imply the passwords are strong:</p>
<ul>
<li>12345678901234567890 &#8211; 20*3.32 =&gt; 66.4 bits of entropy</li>
<li>!!!!!!!!!!!!!!!!!!!! &#8211; 10 * 6.55 =&gt; 65.5 bits of entropy</li>
<li>!@#$%^&amp;*() &#8211; 10 &amp; 6.55 =&gt; 65.5 bits of entropy</li>
<li>qwertyuiop[]qwertyuiop[] = 24 * 6.55 =&gt; 157.2 bits of entropy.</li>
</ul>
<p>The more astute among us will see the last two passwords were generated by running your finger across the a keyboard line of on a US keyboard. To enter the 24 characters password took under 3 seconds. So if anyone saw someone entering a password like this at work or in a library &#8211; its pretty easy to duplicate. Plainly you can see that with human users they are going to opt for the easiest way to remember and enter a password &#8211; this will never be random!</p>
<p>So to help avoid our users from becoming victims we have to try to take away the &#8216;easy&#8217; passage from them. We have to assume the password is not going to be mathematically random &#8211; so we need to start from a different position. We have to ensure we remove the human weaknesses that other &#8216;black hats&#8217; are looking to exploit.</p>
<p>So going back to the beginning of the article we are going to create an interface to define a &#8216;password policy&#8217; that provides us a way to help enforce a stronger passwords &#8211; or  at least allows systems to setup a common language for handling passwords.</p>
<pre class="brush: csharp;">
   /// &lt;summary&gt;
   /// Interface for defining a password policy
   /// &lt;/summary&gt;
   /// &lt;remarks&gt;
   /// This security policy determines whether passwords
   /// meet pre-determined complexity requirements.
   ///
   /// If this policy is enabled, passwords must meet the
   /// following minimum requirements:
   ///
   /// Not contain the user's account name or parts of the
   /// user's full name that exceed four consecutive
   /// characters.
   /// Be at least &lt;see cref=&quot;MinimumPasswordLength&quot;/&gt;
   /// characters in length
   /// Contain characters from three of the following
   /// four categories:
   /// English uppercase characters (A through Z)
   /// English lowercase characters (a through z)
   /// Base 10 digits (0 through 9)
   /// Non-alphabetic characters (for example, !, $, #, %)
   ///
   /// Complexity requirements are enforced when passwords
   /// are changed or created.
   /// &lt;/remarks&gt;
   public interface IPasswordPolicy : IPolicy
   {
      /// &lt;summary&gt;
      /// Indicates the minimum password strength index for
      /// this policy (see PasswordStrengthIndex)
      /// &lt;/summary&gt;
      /// &lt;remarks&gt;
      /// This value is based of a calculation of
      /// information entropy after sequences
      /// and dictionary words have been
      /// removed.
      /// &lt;/remarks&gt;
      /// &lt;value&gt;
      /// The minimum index of the password strength.
      /// &lt;/value&gt;
      PasswordStrengthIndex MinimumPasswordStrengthIndex
      {
         get;
         set;
      }

      /// &lt;summary&gt;
      /// Gets or sets the minimum length of the password.
      /// &lt;/summary&gt;
      /// &lt;value&gt;The minimum length of the password.&lt;/value&gt;
      int MinimumPasswordLength
      {
         get;
         set;
      }

      /// &lt;summary&gt;
      /// Gets or sets the maximum length of the password.
      /// &lt;/summary&gt;
      /// &lt;value&gt;The maximum length of the password.&lt;/value&gt;
      int MaximumPasswordLength
      {
         get;
         set;
      }

      /// &lt;summary&gt;
      /// If policy requires mixed case
      /// &lt;/summary&gt;
      /// &lt;value&gt;true if policy needs mixed case&lt;/value&gt;
      bool RequireMixedCase
      {
         get;
         set;
      }

      /// &lt;summary&gt;
      /// If policy needs digits
      /// &lt;/summary&gt;
      /// &lt;value&gt;true if policy needs digits.&lt;/value&gt;
      bool RequireDigits
      {
         get;
         set;
      }

      /// &lt;summary&gt;
      /// If policy needs special characters
      /// &lt;/summary&gt;
      /// &lt;value&gt;
      /// true if require special characters are needed
      /// &lt;/value&gt;
      bool RequireSpecialCharacters
      {
         get;
         set;
      }

      /// &lt;summary&gt;
      /// Indicates if the username needs to be additionally
      /// supplied to verify the password complexity against
      /// &lt;/summary&gt;
      /// &lt;value&gt;
      /// true require username to check password against
      /// &lt;/value&gt;
      bool RequireUsernameToCheckPasswordAgainst
      {
         get;
         set;
      }

      /// &lt;summary&gt;
      /// Gets or sets the maximum count of characters
      /// in a sequence
      /// &lt;/summary&gt;
      /// &lt;value&gt;The maximum count of characters
      /// in a sequence.&lt;/value&gt;
      int MaximumCharacterSequenceCount
      {
         get;
         set;
      }

      /// &lt;summary&gt;
      /// The duration of the lockout in minutes.
      /// &lt;/summary&gt;
      /// &lt;remarks&gt;
      /// This security setting determines the number of
      /// minutes a locked-out account remains locked
      /// out before automatically becoming unlocked.
      /// The available range is from 0 minutes through
      /// 99,999 minutes.
      /// If you set the account lockout duration to less
      /// than zero, the account will be locked out until an
      /// administrator explicitly unlocks it. If an account
      /// lockout threshold is defined, the account lockout
      /// duration must be greater than or equal to
      /// the reset time.
      /// &lt;/remarks&gt;
      /// &lt;value&gt;The duration of the lockout.&lt;/value&gt;
      int LockoutDuration
      {
         get;
         set;
      }

      /// &lt;summary&gt;
      /// Gets or sets the lockout threshold.
      /// &lt;/summary&gt;
      /// &lt;remarks&gt;
      /// This security setting determines the number of
      /// failed logon attempts that causes a user
      /// account to be locked out. A locked-out
      /// account cannot be used until it is reset
      /// by an administrator or until the
      /// lockout duration for the account has expired. You
      /// can set a value between 0 and 999 failed
      /// logon attempts. If you set the value to 0,
      /// the account will never be locked out.
      /// &lt;/remarks&gt;
      /// &lt;value&gt;The lockout threshold.&lt;/value&gt;
      int LockoutThreshold
      {
         get;
         set;
      }

      /// &lt;summary&gt;
      /// Reset account lockout after X minutes
      /// &lt;/summary&gt;
      /// &lt;remarks&gt;
      /// This security setting determines the number of
      /// minutes that must elapse after a failed logon
      /// attempt before the failed logon attempt
      /// counter is reset to 0 bad logon attempts.
      /// The available range is 1 minute to
      /// 99,999 minutes.
      /// &lt;/remarks&gt;
      /// &lt;value&gt;The duration of the lockout.&lt;/value&gt;
      int LockoutResetInMinutes
      {
         get;
         set;
      }
   }
</pre>
<p>You can see this password policy template extends the initial outline to not only provide guidance for the number of entropy bits, but allows for the policy to cover the lock out strategy in the case of incorrect password handling and password expiry approaches. If you look at the source code you will also see the options that are available, but for the sake of this article we are trying to keep on point <img src='http://www.csharphacker.com/technicalblog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>So on to the actual strength testing, this oddly is rather simple at the end of the day. We are going to use an Interface definition (IPassword) for the Password processor (makes testing &amp; mocking easier) so we can actually have multiple implementations (think <a href="http://www.codeplex.com/MEF">MEF</a>!).  Now the actual implementation.</p>
<ol>
<li>Check for sequences using various lookup tables to determine if any sequences exist. If a sequence length is detected, and is longer than allowed the password fails the policy. The tables include:
<ul>
<li>Alphabetic + numeric sequence</li>
<li>QWERTY US Keyboard</li>
<li>QWERTY UK Keyboard</li>
<li>AZERTY Keyboard</li>
</ul>
</li>
<li>Perform simple DecodeEliteEncoding then perform a simple hardcoded dictionary match of well known super common passwords</li>
<li>If supplied (and if required) compare password elements to the user name</li>
</ol>
<p>The end implementation is still fairly simple and it would be fairly easy to improve on this implementation.  The most obvious ones are to support a custom dictionary and add more custom keyboard sequences. Other extensions would be to store the passwords and become a real password token service. We can leave it up to the reader to provide an implementation of IPassword to call the Google password rating service rather than the above implementation:</p>
<p><a href="https://www.google.com/accounts/RatePassword?Passwd=csharphacker">https://www.google.com/accounts/RatePassword?Passwd=csharphacker</a></p>
<p>All good stuff! I hope this helps (and the source code) people provide a better approach to helping strengthen passwords.</p>
<p style="text-align: center;"><strong>[<a href="http://www.csharphacker.com/CSharpHacker.Utils.zip">Download source code here</a>]</strong></p>
<p>The linked source code is liable to change over time so check back often. The source code uses the Microsoft testing framework and currently has 100% code coverage! Although I don&#8217;t think 100% is all that people think it is.</p>
<p>Finally the goal is to make everything a more secure place &#8211; and in reality the best approach is to use a strong memorable password in conjunction with a hardware token that changes every minute.</p>
<p>As always feedback is welcome!</p>
<p>Gareth</p>
]]></content:encoded>
			<wfw:commentRss>http://www.csharphacker.com/technicalblog/index.php/2009/09/13/better-way-to-determine-and-police-password-strengths/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interesting Cloud developments, and other technical news</title>
		<link>http://www.csharphacker.com/technicalblog/index.php/2009/09/01/interesting-cloud-developments-and-other-technical-news/</link>
		<comments>http://www.csharphacker.com/technicalblog/index.php/2009/09/01/interesting-cloud-developments-and-other-technical-news/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 03:16:59 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[High Availability]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.csharphacker.com/technicalblog/?p=427</guid>
		<description><![CDATA[It seems with the VMWare conference that the relative quiet has brought out the virtualization fairy&#8217;s out to play! What a difference a week makes. All of a sudden we get: VMware announces VMware vCloud Express, goes head to head with Amazon EC2 VMware today announced vCloud Express, a new class of service that will [...]]]></description>
			<content:encoded><![CDATA[<p>It seems with the VMWare conference that the relative quiet has brought out the virtualization fairy&#8217;s out to play! What a difference a week makes. All of a sudden we get:</p>
<ul>
<li><a href="http://virtualization.com/news/2009/09/01/vmware-announces-vmware-vcloud-express-goes-head-to-head-with-amazon-ec2/">VMware announces VMware vCloud Express, goes head to head with Amazon EC2</a>
<ul>
<li>VMware today announced vCloud Express, a new class of service that will deliver on-demand, pay-as-you-go computing power as a service, much like Amazon Web Services’ Elastic Compute Cloud (EC2).</li>
</ul>
</li>
<li><a href="http://www.datacenterknowledge.com/archives/2009/08/19/a-pci-compliant-cloud-not-at-amazon/">A PCI-Compliant Cloud? Not at Amazon</a>
<ul>
<li>Very interesting debate and conclusion regarding Amazon EC2 &amp; PCI. Worth a read!</li>
</ul>
</li>
<li><a href="http://blogs.msdn.com/usisvde/archive/2009/08/29/azure-reference-architecture-explored-with-project-riviera.aspx">Azure Reference Architecture Explored with Project Riviera </a>
<ul>
<li>If you’ve been wanting to see how a multi-tenant architecture works with Windows Azure Platform, you’ll want to see Project Riviera. The project has been released on MSDN and includes source code. Interestingly the sample application is a loyalty application!</li>
</ul>
</li>
<li><a href="http://cloudsecurity.org/2009/08/31/cloud-cartography-side-channel-attacks/">Cloud Cartography &amp; Side Channel Attacks</a>
<ul>
<li>This is obviously dependent on the availability of a weakness in the hypervisor, but definitely an interesting concept none the less.</li>
</ul>
</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Security</strong></span></p>
<ul>
<li><a href="http://www.securitytracker.com/alerts/2009/Aug/1022792.html">Microsoft Internet Information Server (IIS) FTP Server Buffer Overflow Lets Remote Authenticated Users Execute Arbitrary Code</a>
<ul>
<li>Any one running IIS 5, 5.1, or 6 and FTP &#8211; watch out!</li>
</ul>
</li>
<li><a href="http://www.net-security.org/secworld.php?id=7949">New version of WiKID authentication server</a>
<ul>
<li>WiKID Systems announced version 3.4 of the WiKID Strong Authentication Server in Enterprise and Community Editions. New features include built-in support for the SAML Single Sign-On Service for Google Apps, a new self-registration process for Active Directory users and extended vendor-specific RADIUS attributes.</li>
<li>Pretty interesting stuff, not seen this before.</li>
</ul>
</li>
</ul>
<p>Hopefully my writers block has been solved and I&#8217;ll get back to writing some code <img src='http://www.csharphacker.com/technicalblog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Gareth</p>
]]></content:encoded>
			<wfw:commentRss>http://www.csharphacker.com/technicalblog/index.php/2009/09/01/interesting-cloud-developments-and-other-technical-news/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Security News 2009-07-17</title>
		<link>http://www.csharphacker.com/technicalblog/index.php/2009/07/17/security-news-2009-07-17/</link>
		<comments>http://www.csharphacker.com/technicalblog/index.php/2009/07/17/security-news-2009-07-17/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 01:28:35 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[PCI]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.csharphacker.com/technicalblog/?p=387</guid>
		<description><![CDATA[NMap 5.0 Released The official site is here [http://nmap.org/5/]. This is the first update for a while, and things are starting to get graphical! Check it now &#8211; looks nice. PCI clarifies procedures to secure Wi-Fi Direct PDF download [here] Banned Crypto and the SDL &#8211; Read it , outlined some bullets below: Dont use [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li><a href="http://www.net-security.org/secworld.php?id=7769">NMap 5.0 Released</a>
<ul>
<li>The official site is here [<a href="http://nmap.org/5/">http://nmap.org/5/</a>]. This is the first update for a while, and things are starting to get graphical! Check it now &#8211; looks nice.</li>
</ul>
</li>
<li><a href="http://www.scmagazineus.com/PCI-clarifies-procedures-to-secure-Wi-Fi/article/140256/">PCI clarifies procedures to secure Wi-Fi</a>
<ul>
<li>Direct PDF download <a href="http://media.haymarketmedia.com/Documents/9/PCI_DSS_Wireless_Guidance_July_09_FINAL_071309_2221.pdf">[here]</a></li>
</ul>
</li>
<li><a href="http://blogs.msdn.com/sdl/archive/2009/07/16/banned-crypto-and-the-sdl.aspx">Banned Crypto and the SDL</a> &#8211; Read it <img src='http://www.csharphacker.com/technicalblog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> , outlined some bullets below:
<ul>
<li>Dont use MD4, MD5 and SHA-1, you should use SHA-256, SHA-384 or SHA-512</li>
<li>Dont use DES, 3DES, you should use AES (in CBC mode)</li>
<li>Dont use RC4, use RSA and Elliptical Curve.</li>
<li>Only use the following random generators:
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/aa379942%28VS.85%29.aspx">CryptGenRandom</a> (Win32)</li>
<li><a href="http://msdn.microsoft.com/en-us/library/aa375458%28VS.85%29.aspx">BCryptGenRandom</a> (Win32)</li>
<li><a href="http://msdn.microsoft.com/en-us/library/system.security.cryptography.rngcryptoserviceprovider.aspx">System.Security.Cryptography.RNGCryptoServiceProvider</a> (.Net)</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>Gareth</p>
]]></content:encoded>
			<wfw:commentRss>http://www.csharphacker.com/technicalblog/index.php/2009/07/17/security-news-2009-07-17/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Morning News 2009-07-14</title>
		<link>http://www.csharphacker.com/technicalblog/index.php/2009/07/14/morning-news-2009-07-14/</link>
		<comments>http://www.csharphacker.com/technicalblog/index.php/2009/07/14/morning-news-2009-07-14/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 13:57:11 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PCI]]></category>

		<guid isPermaLink="false">http://www.csharphacker.com/technicalblog/?p=365</guid>
		<description><![CDATA[A fair bit of news recently: AWS Start-Up Challenge For 2009 &#8211; Amazon has kicked off the third annual AWS Start-Up Challenge now. Start-ups in the United States, the United Kingdom, Germany, and Israel are encouraged to apply for a chance to win $50,000 in cash, $50,000 in AWS credits, mentoring sessions from AWS technical [...]]]></description>
			<content:encoded><![CDATA[<p>A fair bit of news recently:</p>
<ul>
<li><a href="http://aws.typepad.com/aws/2009/07/aws-startup-challenge-2009.html">AWS Start-Up Challenge For 2009</a> &#8211; Amazon has kicked off the third annual AWS Start-Up Challenge now.
<ul>
<li>Start-ups in the United States, the United Kingdom, Germany, and Israel are encouraged to apply for a chance to win $50,000 in cash, $50,000 in <span>AWS</span> credits, mentoring sessions from <span>AWS</span> technical experts, and <span>AWS</span> Premium Support Gold for one year.</li>
</ul>
</li>
<li><a href="http://sqlblogcasts.com/blogs/madhivanan/archive/2009/07/11/cte-in-a-view.aspx">How to use a CTE in a view</a>. If you dont know what a CTE is check it out <a href="http://msdn.microsoft.com/en-us/library/ms190766.aspx">here</a>, definitely check out its recursive capabilities <a href="http://sqlblogcasts.com/blogs/tonyrogerson/archive/2008/05/11/common-table-expressions-cte-s-how-it-works-how-recursion-works-using-with-adjacency-list.aspx">here</a>.</li>
<li>Microsoft Research &#8220;<a href="http://arstechnica.com/microsoft/news/2009/07/gazelle-microsofts-browser-os-is-not-actually-an-os.ars">Gazelle</a>&#8221; fires experimental salvo at Google.</li>
<li><a href="http://information-security-resources.com/2009/07/11/pci-dss-legitimizes-conflicts-of-interest/">PCI DSS Legitimizes Conflicts of Interest</a></li>
<li><a href="http://blogs.msdn.com/vbertocci/archive/2009/07/13/the-geneva-suite-of-products-get-official-names.aspx">Geneva identity grows up with rebranding</a> roll on Active Directory Federation Services (ADFS), Windows Identity Foundation &amp; Windows CardSpace.</li>
<li><a href="http://blogs.msdn.com/brada/archive/2009/07/13/managed-extensibility-framework-mef-preview-6-silverlight-support-and-much-more.aspx">Managed Extensibility Framework (MEF) Preview 6: V1 Feature Complete Silverlight Support and Much More!</a>
<ul>
<li>Not only is this the feature complete build for MEF V1.0 (which will ship with .NET Framework 4) but it also has the first drop of MEF for Silverlight!</li>
</ul>
</li>
<li><a href="http://www.techworld.com.au/article/310857/google_releases_open_source_nx_server">Google releases remote screen viewer</a> NeatX.
<ul>
<li>“The good old X Window system can be used over the network, but it has issues with network latency and bandwidth. Neatx remedies some of these issues,” Google engineers wrote on the <a href="http://google-opensource.blogspot.com/2009/07/releasing-neatx-open-source-nx-servier.html">company&#8217;s open source blog</a>.</li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.csharphacker.com/technicalblog/index.php/2009/07/14/morning-news-2009-07-14/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.Net Garbage Collection Primer</title>
		<link>http://www.csharphacker.com/technicalblog/index.php/2009/06/19/net-garbage-collection-primer/</link>
		<comments>http://www.csharphacker.com/technicalblog/index.php/2009/06/19/net-garbage-collection-primer/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 15:11:36 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PCI]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.csharphacker.com/technicalblog/?p=216</guid>
		<description><![CDATA[I&#8217;ve been meaning to write up an article on writing a high performance long running service using .Net for a while now as that lead me down the road (of no return )of my interactions with the .Net garbage collector. On that note I just saw that Andrew Hunter wrote up a blog on &#8220;Understanding [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been meaning to write up an article on writing a high performance long running service using .Net for a while now as that lead me down the road (of no return <img src='http://www.csharphacker.com/technicalblog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  )of my interactions with the .Net garbage collector. On that note I just saw that Andrew Hunter wrote up a blog on &#8220;<a href="http://www.simple-talk.com/dotnet/.net-framework/understanding-garbage-collection-in-.net/">Understanding Garbage Collection in .NET</a>&#8220;. This is an excellent visual high level primer on .Net garbage collection, and I see absolutely no reason to attempt to duplicate his work (especially as he is blatantly better at graphics than me!). </p>
<p>Interestingly for me also is that while this concept applies to both Microsoft .Net runtimes and Mono they do behave differently, well they have different GC collection algorithms at any rate and there are implications for that. I may cover that as a separate topic in a later blog as well (more Blog promises&#8230; everyone tells me not to do that <img src='http://www.csharphacker.com/technicalblog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  )</p>
<p>Gareth</p>
]]></content:encoded>
			<wfw:commentRss>http://www.csharphacker.com/technicalblog/index.php/2009/06/19/net-garbage-collection-primer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cloud News &#8211; June 5, 2009</title>
		<link>http://www.csharphacker.com/technicalblog/index.php/2009/06/05/cloud-news-june/</link>
		<comments>http://www.csharphacker.com/technicalblog/index.php/2009/06/05/cloud-news-june/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 18:46:31 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[High Availability]]></category>
		<category><![CDATA[PCI]]></category>

		<guid isPermaLink="false">http://www.csharphacker.com/technicalblog/?p=112</guid>
		<description><![CDATA[Here are a number of links over been watching over the last couple of weeks that are particularly interesting in the cloud progression. Amazon Adds CloudWatch Monitoring, Other Services Amazon to &#8216;Open Source&#8217; their cloud API&#8217;s This will be a very telling move if it gains acceptance. It will open up the way for a [...]]]></description>
			<content:encoded><![CDATA[<p>Here are a number of links over been watching over the last couple of weeks that are particularly interesting in the cloud progression.</p>
<ul>
<li> <a href="http://www.intelligententerprise.com/showArticle.jhtml?articleID=217500828">Amazon Adds CloudWatch Monitoring, Other Services</a></li>
<li><a href="http://news.cnet.com/software-interrupted/?categoryId=9930224&amp;tag=mncol;tags">Amazon to &#8216;Open Source&#8217; their cloud API&#8217;s</a>
<ul>
<li>This will be a very telling move if it gains acceptance. It will open up the way for a number of people to standardize to, but I am more than a little skeptical <img src='http://www.csharphacker.com/technicalblog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
</ul>
</li>
<li><a href="http://www.cio.com/article/493101/Credit_Card_Council_Looks_Into_Cloud_Security">Credit Card Council Looks Into Cloud Security</a>
<ul>
<li>You knew it had to be coming &#8211; and now it has!</li>
</ul>
</li>
<li><a href="http://aws.amazon.com/importexport/#supported_devices">Bulk Loading/Export from Clouds</a>
<ul>
<li>This shows how the systems are starting to mature. It has always been a fear how to get large data sets to and from cloud systems. Specifically I imagine there will be data analysis cloud applications that may end up processing terabytes (or more) of data. Getting that information there was a problem until now.</li>
</ul>
</li>
<li><a href="http://linuxdevices.com/news/NS9634061300.html">Cloud Electronic Socket for $100</a>
<ul>
<li>This is key, this moves backup from significant chunky machines (PC&#8217;s) to a small appliance no larger than an electrical adapter. Very nice, and I hope successful.</li>
<li><a href="http://www.ctera.com/home/cloud-attached-storage.html">Socket appliance backs up to cloud storage</a></li>
</ul>
</li>
<li><a href="http://www.onstrategies.com/blog/?p=366">Tibco enters the cloud space using Silver on Amazon</a></li>
<li><a href="http://www.theregister.co.uk/2009/06/01/microsoft_sun_mutual_support/">Microsoft and Sun talk interoperability</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.csharphacker.com/technicalblog/index.php/2009/06/05/cloud-news-june/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SDL &#8211; Guilty as charged, I missed the updated documentation!!</title>
		<link>http://www.csharphacker.com/technicalblog/index.php/2009/05/29/sdl-guilty-as-charged-i-missed-the-updated-documentation/</link>
		<comments>http://www.csharphacker.com/technicalblog/index.php/2009/05/29/sdl-guilty-as-charged-i-missed-the-updated-documentation/#comments</comments>
		<pubDate>Fri, 29 May 2009 13:48:56 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.csharphacker.com/technicalblog/?p=94</guid>
		<description><![CDATA[With all the recent SDL excitement of the new TFS template, which appears on the surface to be a nice concept suffers from the fact that is doesn&#8217;t appear fundamentally integrated into the other templates yet (more on that another time). So after looking into this a little I completely missed the fact the web [...]]]></description>
			<content:encoded><![CDATA[<p>With all the recent <a href="http://www.microsoft.com/sdl">SDL</a> excitement of the new TFS template, which appears on the surface to be a nice concept suffers from the fact that is doesn&#8217;t appear fundamentally integrated into the other templates yet (more on that another time). So after looking into this a little I completely missed the fact the <a href="http://msdn.microsoft.com/en-us/library/cc307748.aspx"> web </a> and <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=967389d8-6ed0-4751-a8d2-9c2fad39adce&amp;displaylang=en"> Word </a> documentation was updated.</p>
<p>The SDL blog <a href="http://blogs.msdn.com/sdl/archive/2009/05/28/a-note-on-the-recent-sdl-4-1-process-release.aspx">http://blogs.msdn.com/sdl/archive/2009/05/28/a-note-on-the-recent-sdl-4-1-process-release.aspx</a> highlighted this fact, and is really what pointed me to get the latest documentation. Below is an excerpt of the changes in the documentation:</p>
<blockquote><p><span style="text-decoration: underline;"><strong>Changes in This Version</strong></span><br />
Corrected typographical errors and added guidance regarding SDL security requirements and security recommendations. Additional requirements and recommendations for line-of-business (LOB) applications have been added.</p>
<ul>
<li>Phase Two: Design
<ul>
<li>Three new security requirements</li>
</ul>
</li>
<li>Phase Three: Implementation
<ul>
<li>Ten new security requirements</li>
</ul>
<ul>
<li>Twelve new security recommendations</li>
</ul>
</li>
<li>Phase Four: Verification
<ul>
<li>Four new security requirements</li>
<li>Two new security recommendations</li>
</ul>
</li>
<li>Phase Five: Release
<ul>
<li>One new security requirement</li>
</ul>
</li>
<li>Security Development Lifecycle for Line-of-Business Applications</li>
</ul>
</blockquote>
<p>So for those out there definitely check out the SDL blog and if you are following SDL make sure you get the latest revision of the documentation. Next time I&#8217;ll make sure I that dont miss the crown jewels!</p>
<p>Gareth</p>
]]></content:encoded>
			<wfw:commentRss>http://www.csharphacker.com/technicalblog/index.php/2009/05/29/sdl-guilty-as-charged-i-missed-the-updated-documentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Int13 Hacking to attack Vista &#8211; revisting the old school way</title>
		<link>http://www.csharphacker.com/technicalblog/index.php/2009/05/08/using-int13-hacking-to-attack-vista-revisting-the-old-school-way/</link>
		<comments>http://www.csharphacker.com/technicalblog/index.php/2009/05/08/using-int13-hacking-to-attack-vista-revisting-the-old-school-way/#comments</comments>
		<pubDate>Fri, 08 May 2009 14:15:55 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.csharphacker.com/technicalblog/?p=57</guid>
		<description><![CDATA[It seems that security researchers are now becoming historians. A pair of security researchers have &#8216;re-discovered&#8217; a way to hack Vista (and presumably Windows 7) http://www.blackhat.com/presentations/bh-europe-07/Kumar/Presentation/bh-eu-07-kumar-apr19.pdf . They have released the concept prior to the Windows 7 launch to goad Microsoft into making some fixes. I have to say this one definitely made me smile [...]]]></description>
			<content:encoded><![CDATA[<p>It seems that security researchers are now becoming historians. </p>
<p>A pair of security researchers have &#8216;re-discovered&#8217; a way to hack Vista (and presumably Windows 7)<br />
<a href="http://www.blackhat.com/presentations/bh-europe-07/Kumar/Presentation/bh-eu-07-kumar-apr19.pdf">http://www.blackhat.com/presentations/bh-europe-07/Kumar/Presentation/bh-eu-07-kumar-apr19.pdf<br />
</a>. They have released the concept prior to the Windows 7 launch to goad Microsoft into making some fixes.</p>
<p>I have to say this one definitely made me smile as <a href="http://en.wikipedia.org/wiki/INT_13">Int13</a> was always my favorite interrupt, but I suspect most modern programmers don&#8217;t even know what it does &#8211; and even worst don&#8217;t know the <a href="http://www.cs.cmu.edu/~ralf/files.html">Ralf Brown</a> list (last updated last updated 29-Dec-02, which is way newer than I would have thought!).</p>
<p>Any way for us folks that know <a href="http://en.wikipedia.org/wiki/INT_13">Int13</a> I suspect this &#8216;approach&#8217; will make you smile &#8211; but it is definitely a blast from the past.</p>
<p>Gareth</p>
]]></content:encoded>
			<wfw:commentRss>http://www.csharphacker.com/technicalblog/index.php/2009/05/08/using-int13-hacking-to-attack-vista-revisting-the-old-school-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NetNanny &#8211; Build vs Buy?</title>
		<link>http://www.csharphacker.com/technicalblog/index.php/2009/05/03/netnanny-build-vs-buy/</link>
		<comments>http://www.csharphacker.com/technicalblog/index.php/2009/05/03/netnanny-build-vs-buy/#comments</comments>
		<pubDate>Sun, 03 May 2009 16:32:29 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.csharphacker.com/technicalblog/?p=47</guid>
		<description><![CDATA[Well today was the day we needed to fix all of our PCs with internet monitoring software. We had survived so long, but there was one click too far for one of our children that caused the need to come into play. So being the cheapskate that I am, I had already tried Dans Guardian [...]]]></description>
			<content:encoded><![CDATA[<p>Well today was the day we needed to fix all of our PCs with internet monitoring software. We had survived so long, but there was one click too far for one of our children that caused the need to come into play.</p>
<p>So being the cheapskate that I am, I had already tried <a href="http://dansguardian.org/">Dans Guardian</a> a year or two ago in conjunction with <a href="http://www.ipcop.org/">IPCop</a>. This worked reasonably well but caused me to have another PC warming up my Floridian office &#8211; which as most know we are not short of heat here in Florida!</p>
<p>So given I didn&#8217;t want to add another device I had a look around the net for other host based offerings, rather than network based. For the difference have a look at the Wikipedia <a href="http://en.wikipedia.org/wiki/Intrusion-prevention_system">Intrusion Prevention system</a> page and search for &#8216;host based&#8217; and &#8216;network&#8217;. These concepts also apply to the internet monitoring software as well.</p>
<p>So the first attempt was <a href="http://download.live.com/familysafety">Microsoft Live Family Safety</a>, since I couldn&#8217;t find much detailed information on this I had to just try it to see how effective it actually was. The install was smooth enough, but the downsides for me were:</p>
<ul>
<li>Each child/person needed a live ID to alter the allowed profiles</li>
<li>It didn&#8217;t fare very well at all on <a href="http://www.youtube.com/">YouTube</a> (aka failed miserably).</li>
<li>Very limited configuration options</li>
</ul>
<p>The big immediate one was that it really only appeared to restrict sites rather than content, obviously an easier thing to implement but not that helpful when dealing with <a href="http://www.youtube.com/">YouTube</a>. So in its favor it was free, but the fact we had to create live id&#8217;s for the kids, and it really failed on the <a href="http://www.youtube.com/">YouTube</a> test we had to test the uninstall feature. Which it did very well!</p>
<p>So on to the next one, <a href="http://www.netnanny.com/">NetNanny</a>. This one had good reviews on the net, so it seemed the next choice. In addition it had a trial version to allow us to check how effective it was before committing money. Well technically I wouldn&#8217;t commit money without knowing how effective it was, it would have just been scrubbed off the list &#8211; unless it was personally recommended to me.</p>
<p>So the trial was easy enough, supply a email address and get started. From the get-go it seemed nice and polished, and it successfully blocked the problematic <a href="http://www.youtube.com/">YouTube</a>. The features that it offered were significantly more configurable than the free Microsoft offering. Significantly these were:</p>
<ul>
<li>Name a child in configuration, without the need for a live ID</li>
<li>Link Names to Windows logins (nice and handy for fast user switching)</li>
<li>Name a child in configuration, without the need for a live ID</li>
<li>Blocks by content, so passed the YouTube address.</li>
<li>Extensive configuration options</li>
</ul>
<p>So it passed all the immediate needs, in addition (which to be fair I think the MS one also allows for) was email notifications of alert behaviors. So if any blocking was performed I would get the email. So after trying a couple of test scenarios it really seemed to block what we needed to be blocked, without blanket cutting out YouTube &#8211; which is really a sledge hammer approach. </p>
<p>So now the programmer side in me was interested. Normally I only buy software that I consider to be valuable, and my valuable that means I couldn&#8217;t trivially write it my self (or there wasn&#8217;t an equivalent <a href="http://en.wikipedia.org/wiki/Open_source_software">Open Source</a> version). This software is definitely valuable &#8211; and there is a lot of potential in the software. For the programmers out there, it should be noted the software is subscription rather than buy and forget &#8211; but that actually seems a sensible model to follow for this type of software (similar to AV).</p>
<p>So while it was installed on the computers we didnt warn the kids&#8230; 9:30 the following morning we got the question &#8220;So have you got software on the PC to block sites?&#8221;. The email chain in my inbox showed exactly what was blocked and why, and again it did the job! In addition it even seems to lock in at a nice low level even blocking all network access until the user is signed in, so no sneaking stuff in and to be honest the NetNanny team have gone about nearly everything I would have attempted to do my self anyway &#8211; so the Buy vs Build in this case for me was a no-brainer. Firstly it did what the box said, secondarily it wasn&#8217;t excessively expensive &#8211; in fact it was pretty darn reasonable given the capabilities of the software. My congratulations to the <a href="http://www.netnanny.com/">NetNanny team</a>. There are no doubt other software solutions/options out there and people are free to comment on their recommendations. However to be clear I dont want to be perceived as disrespecting any OSS solutions as I have the greatest respect for them. However in my case the key benefit was the fact it was a host based system rather than a remote firewall with content filtering, and most OSS solutions are device/Linux based rather than host. NetNanny did the job for a good no-nonsense price, and I can be fairly assured that they will succeed as a company as they have a excellent product offering.</p>
<p>So congratulations and thanks to all those out there helping parents protect the younger ones.</p>
<p>Gareth</p>
]]></content:encoded>
			<wfw:commentRss>http://www.csharphacker.com/technicalblog/index.php/2009/05/03/netnanny-build-vs-buy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New passive security &#8216;auditor&#8217; released</title>
		<link>http://www.csharphacker.com/technicalblog/index.php/2009/04/29/new-passive-security-auditor-released/</link>
		<comments>http://www.csharphacker.com/technicalblog/index.php/2009/04/29/new-passive-security-auditor-released/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 03:06:21 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[PCI]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.csharphacker.com/technicalblog/?p=29</guid>
		<description><![CDATA[A new add-on for the Fiddler2 proxy enables passive monitoring/analysis of websites. Specifically this is handy for any pen analysis of sites under review for PCI audits. The add-on can be found at http://websecuritytool.codeplex.com/, and there is an excellent blog article covering its intent at http://blogs.msdn.com/sdl/archive/2009/04/16/watcher-a-new-web-security-testing-tool.aspx. Hopefully this helps anyone looking for help performing some [...]]]></description>
			<content:encoded><![CDATA[<p>A new add-on for the <a href="http://www.fiddler2.com/fiddler2/">Fiddler2</a> proxy enables passive monitoring/analysis of websites. Specifically this is handy for any pen analysis of sites under review for PCI audits. The add-on can be found at <a href="http://websecuritytool.codeplex.com/">http://websecuritytool.codeplex.com/</a>, and there is an excellent blog article covering its intent at <a href="http://blogs.msdn.com/sdl/archive/2009/04/16/watcher-a-new-web-security-testing-tool.aspx">http://blogs.msdn.com/sdl/archive/2009/04/16/watcher-a-new-web-security-testing-tool.aspx</a>.</p>
<p>Hopefully this helps anyone looking for help performing some semi-automated test.</p>
<p>Gareth</p>
]]></content:encoded>
			<wfw:commentRss>http://www.csharphacker.com/technicalblog/index.php/2009/04/29/new-passive-security-auditor-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
