<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" version="2.0">
  <channel>
    <title>DotNetDoc - Security</title>
    <link>http://www.dotnetdoc.com/</link>
    <description>My Ramblings on .Net and other stuff</description>
    <language>en-us</language>
    <copyright>Daniel Egan</copyright>
    <lastBuildDate>Wed, 14 Mar 2007 21:32:31 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.9.6264.0</generator>
    <managingEditor>degan@ocgpros.com</managingEditor>
    <webMaster>degan@ocgpros.com</webMaster>
    <item>
      <trackback:ping>http://www.dotnetdoc.com/Trackback.aspx?guid=d410decf-ae9c-4c53-b6b8-e1362477f6b4</trackback:ping>
      <pingback:server>http://www.dotnetdoc.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.dotnetdoc.com/PermaLink,guid,d410decf-ae9c-4c53-b6b8-e1362477f6b4.aspx</pingback:target>
      <dc:creator>Daniel Egan</dc:creator>
      <wfw:comment>http://www.dotnetdoc.com/CommentView,guid,d410decf-ae9c-4c53-b6b8-e1362477f6b4.aspx</wfw:comment>
      <wfw:commentRss>http://www.dotnetdoc.com/SyndicationService.asmx/GetEntryCommentsRss?guid=d410decf-ae9c-4c53-b6b8-e1362477f6b4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Security in today's world is evolving at a rapid pace. In the early days(86 -95) the
threat was localized to individual workstations or individual LANS. 
</p>
        <p>
          <img src="http://www.DotNetDoc.com/content/binary/031407_2101_SecurityTod1.png" alt="" />
        </p>
        <p>
When the internet took over, things just exploded. Peer to Peer, Social Engineering,
root kits, have been proliferated by the ease at which a hacker can transfer his/her
virus/worm. This session talked about what has been, and what MS had in mind for the
future. I will blog more about this later. He talked a lot about SDL (The security
Development Lifecycle) . If you are interested, there is a great book on the subject. 
</p>
        <p>
          <img src="http://www.DotNetDoc.com/content/binary/031407_2101_SecurityTod2.png" alt="" />
        </p>
        <p>
Check it out on Amazon etc… 
</p>
        <p>
Happy programming 
</p>
        <p>
Doc 
</p>
        <p>
        </p>
        <img width="0" height="0" src="http://www.dotnetdoc.com/aggbug.ashx?id=d410decf-ae9c-4c53-b6b8-e1362477f6b4" />
      </body>
      <title>Security Today</title>
      <guid isPermaLink="false">http://www.dotnetdoc.com/PermaLink,guid,d410decf-ae9c-4c53-b6b8-e1362477f6b4.aspx</guid>
      <link>http://www.dotnetdoc.com/PermaLink,guid,d410decf-ae9c-4c53-b6b8-e1362477f6b4.aspx</link>
      <pubDate>Wed, 14 Mar 2007 21:32:31 GMT</pubDate>
      <description>&lt;p&gt;
Security in today's world is evolving at a rapid pace. In the early days(86 -95) the
threat was localized to individual workstations or individual LANS. 
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.DotNetDoc.com/content/binary/031407_2101_SecurityTod1.png" alt="" /&gt; 
&lt;/p&gt;
&lt;p&gt;
When the internet took over, things just exploded. Peer to Peer, Social Engineering,
root kits, have been proliferated by the ease at which a hacker can transfer his/her
virus/worm. This session talked about what has been, and what MS had in mind for the
future. I will blog more about this later. He talked a lot about SDL (The security
Development Lifecycle) . If you are interested, there is a great book on the subject. 
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.DotNetDoc.com/content/binary/031407_2101_SecurityTod2.png" alt="" /&gt; 
&lt;/p&gt;
&lt;p&gt;
Check it out on Amazon etc… 
&lt;/p&gt;
&lt;p&gt;
Happy programming 
&lt;/p&gt;
&lt;p&gt;
Doc 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.dotnetdoc.com/aggbug.ashx?id=d410decf-ae9c-4c53-b6b8-e1362477f6b4" /&gt;</description>
      <comments>http://www.dotnetdoc.com/CommentView,guid,d410decf-ae9c-4c53-b6b8-e1362477f6b4.aspx</comments>
      <category>Security</category>
    </item>
    <item>
      <trackback:ping>http://www.dotnetdoc.com/Trackback.aspx?guid=4617d343-6f40-42cc-ad49-48c863e9b555</trackback:ping>
      <pingback:server>http://www.dotnetdoc.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.dotnetdoc.com/PermaLink,guid,4617d343-6f40-42cc-ad49-48c863e9b555.aspx</pingback:target>
      <dc:creator>Daniel Egan</dc:creator>
      <wfw:comment>http://www.dotnetdoc.com/CommentView,guid,4617d343-6f40-42cc-ad49-48c863e9b555.aspx</wfw:comment>
      <wfw:commentRss>http://www.dotnetdoc.com/SyndicationService.asmx/GetEntryCommentsRss?guid=4617d343-6f40-42cc-ad49-48c863e9b555</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I received a question for a blog reader the other day complaining that they could
not find the &lt;machineKey&gt; element in their Machine level web.config or their
machine.config file. It was quite puzzling to them and thought that someone may have
removed it. 
</p>
        <p>
Well, they were right and wrong. Someone did remove it, but that someone was Microsoft. 
</p>
        <p>
When .Net 2.0 came out, they did some "reconfiguring" of the config files. The first
thing you will notice is that they moved most of the items that developers may want
to change to a "Machine-Level" web.config file which can be found right alongside
the machine.config file in the C:\WINDOWS\Microsoft.NET\Framework\v2.x\CONFIG folder.
The second thing they did was remove elements from the machine.config file that were
set at their default level. So if you don't want to change the machineKey, it will
be set like the following. 
</p>
        <p>
          <img src="http://www.DotNetDoc.com/content/binary/031107_2326_Whereismyma1.png" alt="" />
        </p>
        <p>
You can find these settings in the web.config.comments file in the same directory. 
</p>
        <p>
You can of course override the defaults by adding the element to the machine.config,
machine-level web.config, or a web.config in your application. 
</p>
        <p>
Happy programming 
</p>
        <p>
Doc
</p>
        <img width="0" height="0" src="http://www.dotnetdoc.com/aggbug.ashx?id=4617d343-6f40-42cc-ad49-48c863e9b555" />
      </body>
      <title>Where is my machineKey element??</title>
      <guid isPermaLink="false">http://www.dotnetdoc.com/PermaLink,guid,4617d343-6f40-42cc-ad49-48c863e9b555.aspx</guid>
      <link>http://www.dotnetdoc.com/PermaLink,guid,4617d343-6f40-42cc-ad49-48c863e9b555.aspx</link>
      <pubDate>Sun, 11 Mar 2007 23:24:53 GMT</pubDate>
      <description>&lt;p&gt;
I received a question for a blog reader the other day complaining that they could
not find the &amp;lt;machineKey&amp;gt; element in their Machine level web.config or their
machine.config file. It was quite puzzling to them and thought that someone may have
removed it. 
&lt;/p&gt;
&lt;p&gt;
Well, they were right and wrong. Someone did remove it, but that someone was Microsoft. 
&lt;/p&gt;
&lt;p&gt;
When .Net 2.0 came out, they did some "reconfiguring" of the config files. The first
thing you will notice is that they moved most of the items that developers may want
to change to a "Machine-Level" web.config file which can be found right alongside
the machine.config file in the C:\WINDOWS\Microsoft.NET\Framework\v2.x\CONFIG folder.
The second thing they did was remove elements from the machine.config file that were
set at their default level. So if you don't want to change the machineKey, it will
be set like the following. 
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.DotNetDoc.com/content/binary/031107_2326_Whereismyma1.png" alt="" /&gt; 
&lt;/p&gt;
&lt;p&gt;
You can find these settings in the web.config.comments file in the same directory. 
&lt;/p&gt;
&lt;p&gt;
You can of course override the defaults by adding the element to the machine.config,
machine-level web.config, or a web.config in your application. 
&lt;/p&gt;
&lt;p&gt;
Happy programming 
&lt;/p&gt;
&lt;p&gt;
Doc
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.dotnetdoc.com/aggbug.ashx?id=4617d343-6f40-42cc-ad49-48c863e9b555" /&gt;</description>
      <comments>http://www.dotnetdoc.com/CommentView,guid,4617d343-6f40-42cc-ad49-48c863e9b555.aspx</comments>
      <category>Security</category>
    </item>
    <item>
      <trackback:ping>http://www.dotnetdoc.com/Trackback.aspx?guid=c851f63b-65a6-41c7-9764-4587511dd7fa</trackback:ping>
      <pingback:server>http://www.dotnetdoc.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.dotnetdoc.com/PermaLink,guid,c851f63b-65a6-41c7-9764-4587511dd7fa.aspx</pingback:target>
      <dc:creator>Daniel Egan</dc:creator>
      <wfw:comment>http://www.dotnetdoc.com/CommentView,guid,c851f63b-65a6-41c7-9764-4587511dd7fa.aspx</wfw:comment>
      <wfw:commentRss>http://www.dotnetdoc.com/SyndicationService.asmx/GetEntryCommentsRss?guid=c851f63b-65a6-41c7-9764-4587511dd7fa</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
What it Code Access Security (CAS)? And why is it important to me? 
</p>
        <p>
Well, the simplest definition can be found in the name itself, what resources are
you code allowed to access (Code Access Security). Will your code be allowed to access
local files? The registry? SQL Server? These are questions that you should be asking
yourself when you are designing your application but far too often, security is just
an afterthought it the design process. 
</p>
        <p>
CAS is also sometimes called evidence-based security. To determine the access your
code possesses, the Common Language Runtime (CLR) evidence it gathers about assemblies.
This "evidence" is determined by a number of factors. 
</p>
        <ul>
          <li>
            <div>Where did the code come from? 
</div>
            <ul>
              <li>
The site, URL, Zone, and Application Directory.<span style="color:black; font-family:Verdana; font-size:8pt"></span></li>
            </ul>
          </li>
          <li>
            <div>
              <span style="font-size:10pt">
                <span style="color:black; font-family:Verdana">What
does the assembly contain?</span>
              </span>
            </div>
            <ul>
              <li>
Evidence Hash (Not the Strong Name Hash) 
</li>
            </ul>
            <blockquote>
              <p>
                <em>The Hash evidence is simply a compact identifier that uniquely identifies a particular
compilation of a component. The Hash evidence is added by the assembly loader to all
assemblies and allows security policy to recognize particular builds of an assembly,
even when the assembly version numbers have not changed. </em>
              </p>
            </blockquote>
            <blockquote>
              <p>
                <em>A hash value represents a unique value that corresponds to a particular set of
bytes. Rather than referring to an assembly by name, version, or other designation,
a hash value designates the assembly without ambiguity. Names are subject to collisions
in rare cases where the same name is given to completely different code. Different
variations of code can accidentally be marked with the same version. However, even
changing a single bit results in a very different hash value. </em>
              </p>
            </blockquote>
            <blockquote>
              <p>
                <em>Hash values are a cryptographically secure way to refer to specific assemblies
in policy without the use of digital signatures. A secure hash algorithm is designed
so that it is computationally infeasible to construct a different assembly with the
identical hash value by either an accidental or malicious attempt. By default, evidence
from the SHA1 and MD5 hash algorithms is supported, although any hash algorithm can
be used through GenerateHash. </em>
              </p>
            </blockquote>
          </li>
          <li>
            <div>Who wrote the code : 
</div>
            <ul>
              <li>
Is the assembly Strongly Named? If so, what is the Strong Name? 
</li>
              <li>
Who is the publisher of the assembly? Is it digitally signed? 
</li>
            </ul>
          </li>
        </ul>
        <p>
        </p>
        <p>
Evidence is where CAS starts. It is the who, what, where and why of your code. Let's
talk about the about the different types of evidence. 
</p>
        <p>
The assembly loader works with the first four parts of the evidence, the Site, URL,
ZONE, and Application directory. All four of these are derived by the CODEBASE URL.
The URL evidence is the simplest since it is just be the URI of the assembly. The
site evidence is derived from the URL. If the URL of the assembly is http://www.DotNetDoc.com/downloads/samplestuff.dll
then the Site evidence will be www.DotNetDoc.com. But if the assembly is file based
(C:\MyStuff\AndThings\samplestuff.dll) then this evidence will be blank. The Zone
evidence also comes from the URL but is divided into five possible Zones : 
</p>
        <ul>
          <li>
My Computer – All code loaded from local file system 
</li>
          <li>
Intranet – All code loaded off of a remote file system using mapped drives 
</li>
          <li>
Trusted – IE Mapped Trusted Sites 
</li>
          <li>
Internet – All code loaded off the internet 
</li>
          <li>
Not Trusted – IE Mapped Not Trusted Sites 
</li>
        </ul>
        <p>
The final location-based evidence is ApplicationDirectory. This evidence specifies
the base directory for running the application. This is usually used to grant special
permissions to assemblies that are run from the same location as the base application. 
</p>
        <p>
        </p>
        <p style="background: white">
        </p>
        <p>
        </p>
        <img width="0" height="0" src="http://www.dotnetdoc.com/aggbug.ashx?id=c851f63b-65a6-41c7-9764-4587511dd7fa" />
      </body>
      <title>.Net Code Access Security – Part 1 Evidence</title>
      <guid isPermaLink="false">http://www.dotnetdoc.com/PermaLink,guid,c851f63b-65a6-41c7-9764-4587511dd7fa.aspx</guid>
      <link>http://www.dotnetdoc.com/PermaLink,guid,c851f63b-65a6-41c7-9764-4587511dd7fa.aspx</link>
      <pubDate>Mon, 26 Feb 2007 02:55:51 GMT</pubDate>
      <description>&lt;p&gt;
What it Code Access Security (CAS)? And why is it important to me? 
&lt;/p&gt;
&lt;p&gt;
Well, the simplest definition can be found in the name itself, what resources are
you code allowed to access (Code Access Security). Will your code be allowed to access
local files? The registry? SQL Server? These are questions that you should be asking
yourself when you are designing your application but far too often, security is just
an afterthought it the design process. 
&lt;/p&gt;
&lt;p&gt;
CAS is also sometimes called evidence-based security. To determine the access your
code possesses, the Common Language Runtime (CLR) evidence it gathers about assemblies.
This "evidence" is determined by a number of factors. 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;Where did the code come from? 
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
The site, URL, Zone, and Application Directory.&lt;span style="color:black; font-family:Verdana; font-size:8pt"&gt; &lt;/span&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;span style="font-size:10pt"&gt;&lt;span style="color:black; font-family:Verdana"&gt;What
does the assembly contain?&lt;/span&gt; &lt;/span&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
Evidence Hash (Not the Strong Name Hash) 
&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;
&lt;em&gt;The Hash evidence is simply a compact identifier that uniquely identifies a particular
compilation of a component. The Hash evidence is added by the assembly loader to all
assemblies and allows security policy to recognize particular builds of an assembly,
even when the assembly version numbers have not changed. &lt;/em&gt;
&lt;/p&gt;
&lt;/blockquote&gt;&lt;blockquote&gt;
&lt;p&gt;
&lt;em&gt;A hash value represents a unique value that corresponds to a particular set of
bytes. Rather than referring to an assembly by name, version, or other designation,
a hash value designates the assembly without ambiguity. Names are subject to collisions
in rare cases where the same name is given to completely different code. Different
variations of code can accidentally be marked with the same version. However, even
changing a single bit results in a very different hash value. &lt;/em&gt;
&lt;/p&gt;
&lt;/blockquote&gt;&lt;blockquote&gt;
&lt;p&gt;
&lt;em&gt;Hash values are a cryptographically secure way to refer to specific assemblies
in policy without the use of digital signatures. A secure hash algorithm is designed
so that it is computationally infeasible to construct a different assembly with the
identical hash value by either an accidental or malicious attempt. By default, evidence
from the SHA1 and MD5 hash algorithms is supported, although any hash algorithm can
be used through GenerateHash. &lt;/em&gt;
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Who wrote the code : 
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
Is the assembly Strongly Named? If so, what is the Strong Name? 
&lt;/li&gt;
&lt;li&gt;
Who is the publisher of the assembly? Is it digitally signed? 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Evidence is where CAS starts. It is the who, what, where and why of your code. Let's
talk about the about the different types of evidence. 
&lt;/p&gt;
&lt;p&gt;
The assembly loader works with the first four parts of the evidence, the Site, URL,
ZONE, and Application directory. All four of these are derived by the CODEBASE URL.
The URL evidence is the simplest since it is just be the URI of the assembly. The
site evidence is derived from the URL. If the URL of the assembly is http://www.DotNetDoc.com/downloads/samplestuff.dll
then the Site evidence will be www.DotNetDoc.com. But if the assembly is file based
(C:\MyStuff\AndThings\samplestuff.dll) then this evidence will be blank. The Zone
evidence also comes from the URL but is divided into five possible Zones : 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
My Computer – All code loaded from local file system 
&lt;/li&gt;
&lt;li&gt;
Intranet – All code loaded off of a remote file system using mapped drives 
&lt;/li&gt;
&lt;li&gt;
Trusted – IE Mapped Trusted Sites 
&lt;/li&gt;
&lt;li&gt;
Internet – All code loaded off the internet 
&lt;/li&gt;
&lt;li&gt;
Not Trusted – IE Mapped Not Trusted Sites 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The final location-based evidence is ApplicationDirectory. This evidence specifies
the base directory for running the application. This is usually used to grant special
permissions to assemblies that are run from the same location as the base application. 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p style="background: white"&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.dotnetdoc.com/aggbug.ashx?id=c851f63b-65a6-41c7-9764-4587511dd7fa" /&gt;</description>
      <comments>http://www.dotnetdoc.com/CommentView,guid,c851f63b-65a6-41c7-9764-4587511dd7fa.aspx</comments>
      <category>Security</category>
    </item>
  </channel>
</rss>