<?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>Dataplex Technology Solutions Blog &#187; Information Security</title>
	<atom:link href="http://dataplex.org/blog/category/information-security/feed/" rel="self" type="application/rss+xml" />
	<link>http://dataplex.org/blog</link>
	<description>Web Development, Network Administration, Informaton Security</description>
	<lastBuildDate>Wed, 24 Aug 2011 15:36:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Regain Administrative Rights to SQL Server</title>
		<link>http://dataplex.org/blog/2011/08/regain-administrative-rights-to-sql-server/</link>
		<comments>http://dataplex.org/blog/2011/08/regain-administrative-rights-to-sql-server/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 15:36:44 +0000</pubDate>
		<dc:creator>dpx</dc:creator>
				<category><![CDATA[Informat Technology]]></category>
		<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://dataplex.org/blog/?p=232</guid>
		<description><![CDATA[Ever run into a situation where you are an administrator on a machine, but your account is not an administrator in SQL server? Read below for my situation and the solution I found to fix it! The project I&#8217;m on currently has a shared virtual machine that is given to new developers when they come [...]]]></description>
			<content:encoded><![CDATA[<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=170888536311777&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://dataplex.org/blog/2011/08/regain-administrative-rights-to-sql-server/" layout="button_count" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div><div class="al2fb_send_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=170888536311777&amp;xfbml=1" type="text/javascript"></script>
<fb:send ref="AL2FB" font="arial" colorscheme="light" href="http://dataplex.org/blog/2011/08/regain-administrative-rights-to-sql-server/"></fb:send></div><p>Ever run into a situation where you are an administrator on a machine, but your account is not an administrator in SQL server? Read below for my situation and the solution I found to fix it!</p>
<p>The project I&#8217;m on currently has a shared virtual machine that is given to new developers when they come onto the project. It&#8217;s done this way because of some legacy software SDKs that are installed that only work on Windows XP, as well as some legacy VB6 code that requires the IDE to compile properly. I&#8217;m not complaining about this, but the virtual machine was created with Microsoft VirtualPC and I happen to be working on a Mac. Rather than booting my bootcamp VM, and starting the VM inside there (tedious and slow), I opted to migrate the VPC image to a VMWare Fusion image.</p>
<p>The transition was not easy, and required several steps that were not intuitive, but I finally got there and the VM is responsive and performs fairly well now. But I ran into a problem &#8211; the VM relied on share Windows authentication that mapped my Bootcamp user with a user in the VM called &#8216;dev&#8217;. Dev had administrative rights to the SQL Server, but during the transition the account disappeared and I lost all rights to do anything in the database other than connect!</p>
<p>I found a <a title="Add Self to SQL as sysadmin" href="http://archive.msdn.microsoft.com/addselftosqlsysadmin/">script</a> that will map a given user to a given SQL server instance with the sysadmin rights. This saved me a ton of time and got me up and working again. The script does require administrative rights to the machine, so it should not be a security concern. All in all, I&#8217;m very happy to have regained access to my 2008 SQL Express instance so SSMS can enable intellisense on this rather complex database!</p>
]]></content:encoded>
			<wfw:commentRss>http://dataplex.org/blog/2011/08/regain-administrative-rights-to-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Teaching An Old Dog New Tricks</title>
		<link>http://dataplex.org/blog/2010/08/teaching-an-old-dog-new-tricks/</link>
		<comments>http://dataplex.org/blog/2010/08/teaching-an-old-dog-new-tricks/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 09:44:14 +0000</pubDate>
		<dc:creator>dpx</dc:creator>
				<category><![CDATA[Family]]></category>
		<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Social Networking]]></category>
		<category><![CDATA[family]]></category>
		<category><![CDATA[Teaching]]></category>

		<guid isPermaLink="false">http://dataplex.org/blog/?p=219</guid>
		<description><![CDATA[First Computer Memories &#8211; When I Got Started&#8230; Remember when you sat down in front of your first personal computer? I vaguely remember sitting there as a pissed off eight year old in 1991, starring at a DOS prompt. I was trying to play a 16-bit race car game and it kept complaining about HIMEM [...]]]></description>
			<content:encoded><![CDATA[<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=170888536311777&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://dataplex.org/blog/2010/08/teaching-an-old-dog-new-tricks/" layout="button_count" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div><div class="al2fb_send_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=170888536311777&amp;xfbml=1" type="text/javascript"></script>
<fb:send ref="AL2FB" font="arial" colorscheme="light" href="http://dataplex.org/blog/2010/08/teaching-an-old-dog-new-tricks/"></fb:send></div><h2>First Computer Memories &#8211; When I Got Started&#8230;</h2>
<p>Remember when you sat down in front of your first personal computer? I vaguely remember sitting there as a pissed off eight year old in 1991, starring at a DOS prompt. I was trying to play a 16-bit race car game and it kept complaining about HIMEM being unavailable.</p>
<p>That&#8217;s how it all started for me &#8211; I wanted to be Mario Andretti, and be damned if that big cold metal box was going to get in my way. No one else in the house could figure out what was wrong, so my grandfather handed me the user manual for the IBM 386/DX Personal Computer and told me to figure it out. After all, Wheel of Fortune was on and it was much higher priority than these &#8220;computers&#8221; were ever going to be. That was the day I learned that RTFMing is probably the best way to go when problems happen. I&#8217;ve been RTFMing ever since.</p>
<h2>Teaching An Old Dog</h2>
<p>Nineteen years later &#8211; about a month ago &#8211; I gave my father his first computer to help him run a convenience store he recently bought (his first business). Nineteen years after sitting at my first computer in 1991, he&#8217;s in the same situation of not knowing a damn thing about computers other than he has to use them to stay in business. But he&#8217;s got a much harder learning curve to deal with, and I&#8217;m sadly unprepared to help him through that journey.</p>
<p>I take the last 19 years for granted. <strong>Computer jargon is almost it&#8217;s own language now.</strong> What IS a link? What IS a URL? What IS a tab? More importantly, how MUCH knowledge is required to be effective when using a computer?</p>
<h2>What is a Link? How Do I Plug In a Galvanized Chain Link?</h2>
<p><strong>ME</strong>: A link is a URL&#8230;<br />
<strong>DAD</strong>: URL? Ugly Rearrangement of Letters?<br />
<strong>ME</strong>: &#8230;yes, that tells the browser&#8230;<br />
<strong>DAD</strong>: I hate trousers! I prefer blue jeans.<br />
<strong>ME</strong>:  &#8230;the BROWSER&#8230;how to request content&#8230;<br />
<strong>DAD</strong>: Like those slow people at the Luby&#8217;s line? Why would I want those in my computer?<br />
<strong>ME</strong>: &#8230;oh boy. Let&#8217;s start over. It&#8217;s like an index card in the card catalog at the library.<br />
<strong>DAD</strong>: Well if the internet just tells me to go to the library, what the hell good is it?</p>
<h2>Who The Hell Is Windows Defender? Is He Hitting On My Girlfriend?!</h2>
<p><strong>DAD</strong>: Why does this guy named Windows Defender keep telling me to run a scan? The only scan I have to run is with my shotgun when the dogs bark at night!<br />
<strong>ME</strong>: Please, don&#8217;t point your shotgun at the computer! Windows Defender is a great guy once you get to know him. He&#8217;s the Trojan Man&#8217;s second cousin &#8211; he helps keep the good times rolling and the viruses at bay!</p>
<h2>How Do You Make a Computer Stutter? Ask It To Define Itself!</h2>
<p>So the question my father asked that I can&#8217;t answer:</p>
<p><strong>&#8220;How do I learn how to use a computer without spending 19 years and giving up what&#8217;s left of my social life?&#8221;</p>
<p></strong>The knock on my social life aside, what are the best resources to give new computer users, and what is the best way to teach them? Do we order him some of those DVD&#8217;s I see on late night TV? A Computers for Dummy&#8217;s book? What&#8217;s considered a &#8220;good enough&#8221; level of knowledge for beginners? Give him an abacus and pray?﻿ Any help would be appreciated!</p>
]]></content:encoded>
			<wfw:commentRss>http://dataplex.org/blog/2010/08/teaching-an-old-dog-new-tricks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Broken Windows</title>
		<link>http://dataplex.org/blog/2009/03/broken-windows/</link>
		<comments>http://dataplex.org/blog/2009/03/broken-windows/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 15:18:07 +0000</pubDate>
		<dc:creator>dpx</dc:creator>
				<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ccdc]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[pregnancy]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://dataplex.org/blog/?p=166</guid>
		<description><![CDATA[One of the first tips in The Pragmatic Programmer: From Journeyman to Master is about broken windows. The theory is that if you leave a broken window in a house, you&#8217;re less inclined to fix anything else and eventually the house is abandoned or otherwise abused. This of course relates originally to software development &#8211; [...]]]></description>
			<content:encoded><![CDATA[<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=170888536311777&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://dataplex.org/blog/2009/03/broken-windows/" layout="button_count" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div><div class="al2fb_send_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=170888536311777&amp;xfbml=1" type="text/javascript"></script>
<fb:send ref="AL2FB" font="arial" colorscheme="light" href="http://dataplex.org/blog/2009/03/broken-windows/"></fb:send></div><p>One of the first tips in <span style="text-decoration: underline;">The Pragmatic Programmer: From Journeyman to Master</span> is about broken windows. The theory is that if you leave a broken window in a house, you&#8217;re less inclined to fix anything else and eventually the house is abandoned or otherwise abused. This of course relates originally to software development &#8211; leaving a bug in the system you know about will cause you to value the software less and will lead to other bugs that are left unfixed.</p>
<p>This principle however applies to anything in life that must be maintained vigilantly. I&#8217;m afraid I&#8217;ve fallen into this trap with my blog recently. I stopped posting daily and then I stopped posting weekly and now I&#8217;m barely posting at all. I can&#8217;t believe I let myself do this! I&#8217;ve been busy, but 5 minutes a day to post something isn&#8217;t a huge sacrifice and it pays for itself.</p>
<p>I&#8217;ve been working on a lot of PHP code lately (Zend, Dwoo, etc) that I&#8217;ll be blogging about soon. I&#8217;ve also been working on some .NET related stuff (CC.NET, NCover) that I&#8217;d like to post about as well. I&#8217;m having very interesting results now that I&#8217;ve put Windows XP x64 on my desktop. Sometimes the software &#8211; NCover &#8211; is getting confused trying to run in 64 bit mode and profiling a 32 bit application.</p>
<p>Finally, the most time consuming event I&#8217;ve been working on was the Collegiate Cyber Defense Competition (CCDC). It happened this past weekend and Texas A&amp;M won the region and will be headed to nationals. I ended up being red team for this competition and I had a blast. I dusted off some skills I haven&#8217;t used in quite a while and put a bit of a polish on them again. However, I realize just how badly I&#8217;ve let that skillset diminish and I&#8217;m vowing to myself to bring them back.</p>
<p>My wife has also been having a rough time with the new baby that is on the way so I&#8217;ve been helping out with our daughter Kaylyn more. We&#8217;ll both be glad when the new baby arrives and we can turn this pregnancy leaf over for quite a while. So that&#8217;s my life in a nutshell right now. What&#8217;s going on in your neck of the woods?</p>
]]></content:encoded>
			<wfw:commentRss>http://dataplex.org/blog/2009/03/broken-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automating Code Review Tools &#8211; CAT.NET &#8211; Part II</title>
		<link>http://dataplex.org/blog/2008/12/automating-code-review-tools-catnet-part-ii/</link>
		<comments>http://dataplex.org/blog/2008/12/automating-code-review-tools-catnet-part-ii/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 23:32:33 +0000</pubDate>
		<dc:creator>dpx</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Information Security]]></category>
		<category><![CDATA[.NET security]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[CAT.NET]]></category>
		<category><![CDATA[cisg]]></category>
		<category><![CDATA[code review]]></category>
		<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[NAnt]]></category>
		<category><![CDATA[static code analysis]]></category>

		<guid isPermaLink="false">http://dataplex.org/blog/?p=80</guid>
		<description><![CDATA[The other day in Part I of this series I said I was going to write up some more articles about automating code review tools in your build process. Today I spent some time looking over CAT.NET and figuring out how it fits into my build process. CAT.NET is a static code analysis tools that [...]]]></description>
			<content:encoded><![CDATA[<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=170888536311777&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://dataplex.org/blog/2008/12/automating-code-review-tools-catnet-part-ii/" layout="button_count" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div><div class="al2fb_send_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=170888536311777&amp;xfbml=1" type="text/javascript"></script>
<fb:send ref="AL2FB" font="arial" colorscheme="light" href="http://dataplex.org/blog/2008/12/automating-code-review-tools-catnet-part-ii/"></fb:send></div><p>The other day in <a title="Read Part I first" href="http://dataplex.org/blog/2008/12/automating-code-review-tools-part-i/" target="_blank">Part I of this series</a> I said I was going to write up some more articles about automating code review tools in your build process. Today I spent some time looking over <a title="The CTP Release of CAT.NET and the Anti-XSS Tool" href="http://blogs.msdn.com/cisg/archive/2008/12/15/anti-xss-3-0-beta-and-cat-net-community-technology-preview-now-live.aspx" target="_blank">CAT.NET</a> and figuring out how it fits into my build process. <a title="Part II of a Series on CAT.NET at the CISG Blog" href="http://blogs.msdn.com/cisg/archive/2008/12/22/security-code-review-using-cat-net-part-2.aspx" target="_blank">CAT.NET is a static code analysis</a> tools that analyzes data flow through a .NET library or executable and tries to identify common security problems such as cross site scripting (XSS) and SQL Injection (SQLi) vulnerabilities. My process is not perfect but it does the job well enough. <strong><em>Remember, you should always augment automated tools with a human review to catch things automation cannot.<span id="more-80"></span></em></strong></p>
<p><strong>CAT.NET Installation</strong></p>
<p>The first thing to do is <a title="Downlaod 32-bit CAT.NET installer" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=0178e2ef-9da8-445e-9348-c93f24cc9f9d&amp;displaylang=en" target="_blank">download the CAT.NET MSI installer</a>. Then either unpack it or do what I did and install it, copy the files from C:\Program Files\Microsoft\CAT.NET to your project directory, and uninstall. I  like to keep all tools contained within the svn repositories for a project so they can be utilized on any development computer without having to set it up first.</p>
<p>One funny thing with CAT.NET (<a title="CISG Blog" href="http://blogs.msdn.com/cisg/default.aspx" target="_blank">CISG</a> take note) is that it has to live in a specific path within the project repository. When it was put in {root.dir}\tools\CAT.NET it failed to find the config files, default rules files, etc. It was looking for them at Microsoft\CAT.NET so I broke with my standards (laziness really) and moved it to {root.dir}\Microsoft\CAT.NET. The tool is much happier there and still available in the build file.</p>
<p><strong>Basics of The Project</strong></p>
<p>The demo project is a website that takes in a cat&#8217;s name, tail length, and color and then repeats them back to the page (&#8220;You have entered: &lt;name&gt;, &lt;tail length&gt;, &lt;color&gt;&#8221;). When the user fills in the textboxes and clicks submit, the page creates a CatContext object, fills it with the values taken from the page, and passes it to a CatEngine object. The CatEngine.GetMyCat() method returns the values and they are put in ASP Labels on the page &#8211; lblName.Text = cEngine.GetMyCat().Name, etc etc. The CatEngine and CatContext classes are defined in the ClassLibrary1 project (original eh?) and the website code (Default.aspx) is in the WebApplication1 project.</p>
<p>The important thing to note with this project is that the CatEngine does not do any cleaning or validation on the input or output. This is a clear cut example of a Cross Site Scripting vulnerability (and possibly a SQLi vulnerability if the input were eventually put in a database). Both of these situations are caught with CAT.NET, so it is a good tool to have in your build process.</p>
<p><strong>Project Repository Layout</strong></p>
<p>The following is the layout of the project repository (in the root.dir):</p>
<ul>
<li>ClassLibrary1\
<ul>
<li>bin\</li>
<li>CatContext.cs &#8211; A value object for holding information about a cat (name, tail length, and color)</li>
<li>CatEngine.cs &#8211; The &#8220;business object&#8221; that takes in a CatContext object and has a method &#8211; CatContext GetMyCat() that returns the object</li>
<li>ClassLibrary1.csproj</li>
</ul>
</li>
<li>Microsoft\CAT.NET\
<ul>
<li>Config\</li>
<li>Rules\</li>
<li>CatNetCmd.exe</li>
<li>Other CAT.NET files (from the download) *</li>
</ul>
</li>
<li>tools\
<ul>
<li>nant\
<ul>
<li>nant.exe</li>
<li>Other nant files</li>
</ul>
</li>
</ul>
</li>
<li>WebApplication1\
<ul>
<li>Default.aspx &#8211; The page with the XSS vulnerability in it</li>
<li>Default.aspx.cs &#8211; The code behind for the page</li>
<li>web.config</li>
<li>WebApplication1.csproj</li>
</ul>
</li>
<li>build.bat &#8211; Easy way to run nant &#8211; (Tools\nant\NAnt.exe -buildfile:default.build %* -nologo)</li>
<li>default.build &#8211; The build file for the solution</li>
<li>Solution1.sln</li>
</ul>
<p><strong>The Build File</strong></p>
<p>The build file is a typical <a title="NAnt homepage" href="http://nant.sourceforge.net/" target="_blank">NAnt</a> build file with the following properties and targets</p>
<ul>
<li>Properties
<ul>
<li>build.dir &#8211; Directory to put the output from the csc task (C# Source Compiler)</li>
<li>dist.dir &#8211; Directory to put all file that are necessary for a deployment of the application to a webserver (also where the local IIS is configured to look when manually testing the site)</li>
<li>artifacts.dir &#8211; Directory to hold reports generated from NUnit, CAT.NET, FxCop, and other tools that generate XML and HTML reports</li>
</ul>
</li>
<li>Targets
<ul>
<li>init &#8211; Creates the build.dir and dist.dir</li>
<li>clean &#8211; Deletes build.dir, dist.dir, and artifacts.dir for a clean environment</li>
<li>compile.catengine &#8211; Compiles the ClassLibrary1 project into ${build.dir}\ClassLibrary1.dll</li>
<li>compile.web &#8211; Compiles the website code behind files into ${build.dir}\WebApplication1.dll
<ul>
<li>This target depends on compile.catengine</li>
</ul>
</li>
<li>build &#8211; Runs all the necessary targets to build the libraries and put them in the build directory
<ul>
<li>Depends on clean, init, compile.catengine, compile.web (in that order)</li>
</ul>
</li>
<li>dist &#8211; Depends on &#8216;build&#8217; and copies the libraries and the website pages (Default.aspx) to the ${dist.dir} for deployment
<ul>
<li>Depends on &#8216;catnet&#8217;</li>
</ul>
</li>
<li>catnet &#8211; Runs the CAT.NET code analysis tool on the libraries and checks for errors. If any are found the build if failed and the distribution package never completes.</li>
</ul>
</li>
</ul>
<p><strong>The &#8216;catnet&#8217; Target</strong></p>
<p>This is the bread and butter of the CAT.NET automation. You can get a sense of the command line options we use by running CatNetCmd.exe /?. Here is the code:</p>
<blockquote><p>&lt;target name=&#8221;catnet&#8221; description=&#8221;Runs the CAT.NET static code analysis tool on a set of libraries&#8221;&gt;<br />
&lt;exec program=&#8221;Microsoft\CAT.NET\CatNetCmd.exe&#8221; workingdir=&#8221;.&#8221; output=&#8221;catnetout.log&#8221;&gt;<br />
&lt;arg value=&#8221;/file:${build.dir}\ClassLibrary1.dll&#8221; /&gt;<br />
&lt;arg value=&#8221;/file:${build.dir}\WebApplication1.dll&#8221; /&gt;<br />
&lt;arg value=&#8221;/report:${artifacts.dir}\CatNetReport.xml&#8221; /&gt;<br />
&lt;arg value=&#8221;/reportxsloutput:${artifacts.dir}\CatNetReport.html&#8221; /&gt;<br />
&lt;/exec&gt;</p>
<p>&lt;!&#8211; Check for errors since the command doesn&#8217;t throw error codes &#8211;&gt;<br />
&lt;loadfile file=&#8221;catnetout.log&#8221; property=&#8221;catnetout&#8221; /&gt;<br />
&lt;fail if=&#8221;${string::contains(catnetout, &#8216;ERROR&#8217;)}&#8221; message=&#8221;There was an error running CAT.NET Static Analysis&#8221; /&gt;<br />
&lt;!&#8211; Clean up if we didn&#8217;t error out &#8211;&gt;<br />
&lt;delete file=&#8221;catnetout.log&#8221; /&gt;</p>
<p>&lt;xmlpeek file=&#8221;${artifacts.dir}\CatNetReport.xml&#8221;<br />
property=&#8221;hasErrors&#8221;<br />
xpath=&#8221;//Rule[TotalResults&gt;0]/Results/Result/ProblemDescription&#8221; /&gt;</p>
<p>&lt;fail if=&#8221;${string::get-length(hasErrors) &amp;gt; 0}&#8221; message=&#8221;CAT.NET found at least one problem: ${hasErrors}&#8221; /&gt;<br />
&lt;/target&gt;</p></blockquote>
<p>This target runs the CAT.NET tool over the libraries produced from the &#8216;build&#8217; target. It uses the default rule set and outputs the reports to ${artifacts.dir}\CatNetReport.xml and CatNetReport.html. Because the CAT.NET command line tool does not return an error code (CISG again), the build file sends the output to catnet.log file, read it in, and check for the word &#8216;ERROR&#8217;. If that is found, the build is failed because something went wrong with the command itself.</p>
<p>If the command completes successfully it cleans up the standard output file (delete catnet.log) and then performs an <em>XMLPeek</em> on the CatNetReport.xml file. The xmlpeek xpath looks for a &lt;TotalResults&gt;#&lt;/TotalResults&gt; where # is greater than zero. Unfortunately the xmlpeek command only pulls the first record it comes across that matches the xpath, but that is enough to know that the build needs to be failed. If even one error is reported from this utility, the build should stop anyway and a manual check of the report shoud be performed. The CI process should include some way of notifying developers of errors like this but for this is an example those targets were not included.</p>
<p><strong>Analyzing the Output<br />
</strong></p>
<p>When the build is run (&#8216;build dist&#8217;), the output of the catnet target looks like the following:</p>
<blockquote><p>catnet:</p>
<p>[exec] Application Assurance<br />
[exec] Static Analysis Tool<br />
[exec] 1.0.3272.32340<br />
[exec]<br />
[exec] 12/31/2008 4:13:38 PM:Info : Starting analysis [2 modules]<br />
[exec] 12/31/2008 4:13:38 PM:Info : Analyzing module ClassLibrary1&#8230;<br />
[exec] 12/31/2008 4:13:38 PM:Info : Analyzing module WebApplication1&#8230;<br />
[exec] 12/31/2008 4:13:39 PM:Info : 2 Cross-Site Scripting issues found.<br />
[exec] 12/31/2008 4:13:39 PM:Info : Analysis completed.<br />
[delete] Deleting file C:\Dev\CatNetExample\catnetout.log.<br />
[xmlpeek] Peeking at &#8216;C:\Dev\CatNetExample\reports\CatNetReport.xml&#8217; with XPath expression &#8216;//Rule[TotalResults&gt;0]/Results/Result/ProblemDescription&#8217;.<br />
[xmlpeek] Found &#8217;2&#8242; nodes with the XPath expression &#8216;//Rule[TotalResults&gt;0]/Results/Result/ProblemDescription&#8217;.</p>
<p>BUILD FAILED</p>
<p>C:\Dev\CatNetExample\default.build(70,4):<br />
CAT.NET found at least one problem: A cross-site scripting vulnerability was found through  a user controlled variable that enters the application at  Default.aspx.cs:27 through the variable stack0 which  eventually leads to a cross-site scripting issue at  Default.aspx.cs:29.</p>
<p>Total time: 3.1 seconds.</p></blockquote>
<p>The tool finds an XSS defect and fails the build. There are a few more errors found, but it stops on the first occurance of an error. CAT.NET can be customized to find all kinds of coding problems and it is recommended to customize the configuration for your specific needs. Once it is configured don&#8217;t forget to include it in the build process!</p>
<p><strong>Conclusion</strong></p>
<p>CAT.NET is a great tool and it should only get better over time. I sleep better at night knowing that I am catching common security errors, my junior developers (if I had any) learn from their mistakes using automation, and I can cut down the time I spend doing manual code reviews. The next article will look at the use of FxCop to help your project adhere to coding standards. I use the default Microsoft standard set because I&#8217;m insane, but you can also customize this tool to your liking.</p>
]]></content:encoded>
			<wfw:commentRss>http://dataplex.org/blog/2008/12/automating-code-review-tools-catnet-part-ii/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Automating Code Review Tools &#8211; Part I</title>
		<link>http://dataplex.org/blog/2008/12/automating-code-review-tools-part-i/</link>
		<comments>http://dataplex.org/blog/2008/12/automating-code-review-tools-part-i/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 15:51:42 +0000</pubDate>
		<dc:creator>dpx</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[build process]]></category>
		<category><![CDATA[CAT.NET]]></category>
		<category><![CDATA[code review]]></category>
		<category><![CDATA[FxCop]]></category>
		<category><![CDATA[NAnt]]></category>

		<guid isPermaLink="false">http://dataplex.org/blog/?p=77</guid>
		<description><![CDATA[The Connected Information Security Group blog at Microsoft recently published a couple of articles (part 1, part 2) about a tool recently released called CAT.NET. This is a static code analysis tool which reads a compiled programs code and looks for security problems such as null pointers, null references, and other problems specific to interpreted [...]]]></description>
			<content:encoded><![CDATA[<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=170888536311777&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://dataplex.org/blog/2008/12/automating-code-review-tools-part-i/" layout="button_count" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div><div class="al2fb_send_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=170888536311777&amp;xfbml=1" type="text/javascript"></script>
<fb:send ref="AL2FB" font="arial" colorscheme="light" href="http://dataplex.org/blog/2008/12/automating-code-review-tools-part-i/"></fb:send></div><p>The <a title="CISG Blog" href="http://blogs.msdn.com/cisg/" target="_blank">Connected Information Security Group</a> blog at Microsoft recently published a couple of articles (<a title="Code Review Using CAT.NET Part 1" href="http://blogs.msdn.com/cisg/archive/2008/12/22/security-code-review-using-cat-net-part-1.aspx" target="_blank">part 1</a>, <a title="Code Review Using CAT.NET Part 2" href="http://blogs.msdn.com/cisg/archive/2008/12/22/security-code-review-using-cat-net-part-2.aspx" target="_blank">part 2</a>) about a tool recently released called <a title="Download 32-bit CAT.NET" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=0178e2ef-9da8-445e-9348-c93f24cc9f9d&amp;displaylang=en" target="_blank">CAT.NET</a>. This is a static code analysis tool which reads a compiled programs code and looks for security problems such as null pointers, null references, and other problems specific to interpreted languages.</p>
<p>I&#8217;ve started to put this tool, as well as FxCop, into my build process. The biggest headache in the CAT.NET automation process is defining the sources and sinks necessary for the tool to be effective. Some of this can be autogenerated using XML comments in the code, and as I explore this more I&#8217;ll give some details here.</p>
<p>Over the next week I&#8217;m going to be publishing a series of articles detailing how to automate these tools to make your code more secure and best practices compliant. It will also help reduce your manual code review process (you do have a code review process in place, don&#8217;t you?) because these tools are designed to catch the most common errors that take up a lot of time during a human review.</p>
]]></content:encoded>
			<wfw:commentRss>http://dataplex.org/blog/2008/12/automating-code-review-tools-part-i/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OpenID Alternative to Multiple Passwords</title>
		<link>http://dataplex.org/blog/2008/12/openid-alternative-to-multiple-passwords/</link>
		<comments>http://dataplex.org/blog/2008/12/openid-alternative-to-multiple-passwords/#comments</comments>
		<pubDate>Sat, 27 Dec 2008 15:49:05 +0000</pubDate>
		<dc:creator>dpx</dc:creator>
				<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[authentication implementation]]></category>
		<category><![CDATA[federation]]></category>
		<category><![CDATA[openid]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[user management]]></category>

		<guid isPermaLink="false">http://dataplex.org/blog/?p=66</guid>
		<description><![CDATA[A few days ago I wrote about some of the software I use for personal password management. Today I&#8217;d like to write about a movement that could very well replace the need for all those passwords. I&#8217;m talking about identity federation using OpenID. Identity federation simply means that a user can log into one site, [...]]]></description>
			<content:encoded><![CDATA[<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=170888536311777&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://dataplex.org/blog/2008/12/openid-alternative-to-multiple-passwords/" layout="button_count" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div><div class="al2fb_send_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=170888536311777&amp;xfbml=1" type="text/javascript"></script>
<fb:send ref="AL2FB" font="arial" colorscheme="light" href="http://dataplex.org/blog/2008/12/openid-alternative-to-multiple-passwords/"></fb:send></div><p>A few days ago I wrote about some of the software I use for <a title="Read my last article" href="http://dataplex.org/blog/2008/12/personal-password-management/" target="_blank">personal password management</a>. Today I&#8217;d like to write about a movement that could very well replace the need for all those passwords. I&#8217;m talking about identity federation using <a title="Read more from the official OpenID website" href="http://openid.net/" target="_blank">OpenID</a>. Identity federation simply means that a user can log into one site, and use that login as their identification for other websites.</p>
<p>Other sites then trust the one site for authentication, and then they have their own mechanisms for authorization. I use <a title="OpenID Federation identity provider" href="http://www.signon.com" target="_blank">SignOn.com</a> as my identity provider. The way this happens is as follows:</p>
<ol>
<li>Sign up for an account at SignOn.com and provider a custom username, which then turns into a URL (for example: http://myusername.signon.com)</li>
<li>Head over to a website that support OpenID and put in the URL you were assigned as the OpenID username</li>
<li>The website will use the last part of the URL (signon.com) to identify the identity provider</li>
<li>It will then redirect your browser to the site so you can either sign on, or be given the okay to continue back to the requesting site</li>
<li>Once you come back to the site, it validates your ID and adds an account using the URL as the username</li>
<li>You continue to use the website without having to authenticate to them with a password</li>
</ol>
<p>There are several benefits to this kind of authentication management. One benefit is that you are only trusting one site with a password to your account. If you make this password very secure and trust their service to be secure you are minimizing the chances that your password will be compromised as you put it into many websites. The second fringe benefit is, of course, that you aren&#8217;t entering that password all over the web.</p>
<p><strong>Community Support</strong></p>
<p>OpenID has been gaining traction for several years and may become one of the major ways we authenticate to the web in the future. There are OpenID plugins for <a title="wordpress.com openid support added" href="http://en.blog.wordpress.com/2007/03/06/openid/" target="_blank">WordPress</a> (<a title="plugin for WordPress OpenID support" href="http://wordpress.org/extend/plugins/openid/" target="_blank">OpenID Plugin</a>), <a title="an open source php based CMS" href="http://www.joomla.org" target="_blank">Joomla</a> (<a title="plugin for Joomla CMS supporting OpenID" href="http://extensions.joomla.org/extensions/1562/details" target="_blank">OpenID Plugin</a>), and many many more. Nearly all the open source projects I use that have a plugin framework have a plugin that support OpenID federation for user management.</p>
<p><strong>Programmatic Support</strong></p>
<p>As a programmer, I&#8217;ve also taken a few shots at implementing identity federation. Some of the standards used in OpenID can be confusing, but once you have a thorough understanding of them, it becomes easy to implement. An understanding of Single Sign On (SSO) helps, and visiting <a title="get started implementing OpenID" href="http://openid.net/developers/" target="_blank">OpenID.net&#8217;s Developer Resources</a> area will complete the process.</p>
]]></content:encoded>
			<wfw:commentRss>http://dataplex.org/blog/2008/12/openid-alternative-to-multiple-passwords/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Personal Password Management</title>
		<link>http://dataplex.org/blog/2008/12/personal-password-management/</link>
		<comments>http://dataplex.org/blog/2008/12/personal-password-management/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 22:15:36 +0000</pubDate>
		<dc:creator>dpx</dc:creator>
				<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Politics]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[identity management]]></category>
		<category><![CDATA[keepass]]></category>
		<category><![CDATA[password management]]></category>
		<category><![CDATA[passwords]]></category>
		<category><![CDATA[personal security]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[truecrypt]]></category>

		<guid isPermaLink="false">http://dataplex.org/blog/?p=63</guid>
		<description><![CDATA[As a web technology person, I sign up for a lot of online accounts. Everything from personal photo sites to online banking, security wikis to open source projects. Recently I decided my password security was not the best because I only had about 8 standard passwords I would use across all my website accounts. I [...]]]></description>
			<content:encoded><![CDATA[<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=170888536311777&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://dataplex.org/blog/2008/12/personal-password-management/" layout="button_count" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div><div class="al2fb_send_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=170888536311777&amp;xfbml=1" type="text/javascript"></script>
<fb:send ref="AL2FB" font="arial" colorscheme="light" href="http://dataplex.org/blog/2008/12/personal-password-management/"></fb:send></div><p>As a web technology person, I sign up for a lot of online accounts. Everything from <a title="My personal photo website of choice" href="http://www.flickr.com" target="_blank">personal photo sites</a> to online banking, <a title="Open Web Application Security" href="http://www.owasp.org" target="_blank">security wikis</a> to open source projects. Recently I decided my password security was not the best because I only had about 8 standard passwords I would use across all my website accounts. I based the complexity of my passwords on the danger to myself if the site were compromised. A wiki compromised in my name wouldn&#8217;t be so bad so I&#8217;d use a medium security password. My online banking, however, would be pretty bad if compromised and has a very secure password.</p>
<p>I decided to mix things up a bit and started looking for a way to make all my passwords complex and find an easy and secure way to keep track of them all. A collegue of mine recommended <a title="Open source password management software" href="http://keepass.info/" target="_blank">KeePass</a> and it&#8217;s just what the doctor ordered. I keep my KeePass installation on a thumb drive that is encrypted with <a title="open source disk encryption software" href="http://www.truecrypt.org/" target="_blank">TrueCrypt</a> and use a very secure password  (&gt; 50 characters) for both systems.  KeePass allows me to group my accounts into categories so I can easily identify the accounts for which I&#8217;m looking. It also allows me to generate random secure passwords for new accounts when signing up for things.</p>
<p>While it is somewhat a hassle to learn these new passwords over time, it is much more secure that I am not using the same password across multiple sites. And if all else fails, I can open KeePass up from my thumb drive and unhide the password temporarily to remind me what it is.</p>
<p>I recommend this for everyone as it&#8217;s much more secure that the typical sticky note under the keyboard trick, or allowing your browser to store your passwords (I still do this for the less security sensitive sites, but not for online banking). Best of all, it would take a really long time to crack the encryption set on my thumb drive (and then the second level of security with KeePass itself). If I ever lose my thumb drive or it gets stolen, I will have ample time to reset all my passwords. I of course keep a backup copy of my KeePass database, but I&#8217;m not telling you where! <img src='http://dataplex.org/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Best of all, both KeePass and TrueCrypt are open source projects, so anyone can download and look through the source code. In general, this makes them both more secure because more people can find and fix flaws in the design. They also both use the latest in encryption technology to ensure that your information is as secure as possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://dataplex.org/blog/2008/12/personal-password-management/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

