<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Alik Levin's : Sensitive Data</title><link>http://blogs.msdn.com/alikl/archive/tags/Sensitive+Data/default.aspx</link><description>Tags: Sensitive Data</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Avoid Manipulating Passwords In Memory - It Is Easy To Reveal</title><link>http://blogs.msdn.com/alikl/archive/2007/12/08/avoid-manipulating-passwords-in-memory-it-is-easy-to-reveal.aspx</link><pubDate>Sat, 08 Dec 2007 08:55:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6701111</guid><dc:creator>alikl</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/alikl/comments/6701111.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alikl/commentrss.aspx?PostID=6701111</wfw:commentRss><wfw:comment>http://blogs.msdn.com/alikl/rsscomments.aspx?PostID=6701111</wfw:comment><description>&lt;p&gt;Revealing clear text passwords in memory seems to be a trivial task. This post describes how to reveal clear text passwords and what countermeasures to apply.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Summary of steps:&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;Install WinDbg&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Attach to process or open dump file&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Load SOS .Net extensions for WinDbg&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Enumerate threads&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Enumerate objects in thread&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Dump object's values&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Countermeasures and guidelines&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;Install WinDbg&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Download and install WinDbg as described in &lt;a href="http://blogs.msdn.com/johan/archive/2007/01/11/how-to-install-windbg-and-get-your-first-memory-dump.aspx"&gt;How to install Windbg and get your first memory dump&lt;/a&gt;. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;Attach to process or open dump file&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;WinDbg can analyze both running processes and memory dumps which conveniently can be taken offsite for further investigation. I've created simple console application that accepts user name and password pair as its parameters and stores in local variables in memory:&lt;/p&gt; &lt;p&gt;&lt;font color="#0000ff"&gt;static void&lt;/font&gt; Main(&lt;font color="#0000ff"&gt;string&lt;/font&gt;[] args)&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;string&lt;/font&gt; userName = Console.ReadLine();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;string&lt;/font&gt; password = Console.ReadLine();  &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.ReadLine();&lt;br&gt;} &lt;p&gt;Compile and run the application. I called it SecretsInMemory. This is how it looks when running: &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/alikl/WindowsLiveWriter/AvoidManipulatingPasswordsInMemoryItisEa_1032B/image_12.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="89" alt="image" src="http://blogs.msdn.com/blogfiles/alikl/WindowsLiveWriter/AvoidManipulatingPasswordsInMemoryItisEa_1032B/image_thumb_5.png" width="284" border="0"&gt;&lt;/a&gt;  &lt;p&gt;Attach WinDbg to the running application by opening File-&amp;gt;Attach to a Process: &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/alikl/WindowsLiveWriter/AvoidManipulatingPasswordsInMemoryItisEa_1032B/image_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="89" alt="image" src="http://blogs.msdn.com/blogfiles/alikl/WindowsLiveWriter/AvoidManipulatingPasswordsInMemoryItisEa_1032B/image_thumb.png" width="390" border="0"&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp; &lt;p&gt;and press Ok. &lt;p&gt;Alternatively, we can create dump file - for detailed how-to refer to &lt;a href="http://blogs.msdn.com/johan/archive/2007/01/11/how-to-install-windbg-and-get-your-first-memory-dump.aspx" target="_blank"&gt;How to install Windbg and get your first memory dump&lt;/a&gt;. &lt;p&gt;To Investigate resulting dump file in WinDbg open File-&amp;gt;Open Crash Dump &lt;p&gt;&lt;strong&gt;Load SOS .Net extensions for WinDbg&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;To analyze .Net assemblies we need to load .Net extensions by typing .load sos and hitting Enter:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/alikl/WindowsLiveWriter/AvoidManipulatingPasswordsInMemoryItisEa_1032B/image_4.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="96" alt="image" src="http://blogs.msdn.com/blogfiles/alikl/WindowsLiveWriter/AvoidManipulatingPasswordsInMemoryItisEa_1032B/image_thumb_1.png" width="229" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;strong&gt;Enumerate threads&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Run !threads command to enlist available threads:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/alikl/WindowsLiveWriter/AvoidManipulatingPasswordsInMemoryItisEa_1032B/image_6.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="109" alt="image" src="http://blogs.msdn.com/blogfiles/alikl/WindowsLiveWriter/AvoidManipulatingPasswordsInMemoryItisEa_1032B/image_thumb_2.png" width="350" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;and then choose specific thread - use left most column for thread identification as follows ~[thread number goes here]s:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/alikl/WindowsLiveWriter/AvoidManipulatingPasswordsInMemoryItisEa_1032B/image_8.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="97" alt="image" src="http://blogs.msdn.com/blogfiles/alikl/WindowsLiveWriter/AvoidManipulatingPasswordsInMemoryItisEa_1032B/image_thumb_3.png" width="330" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;strong&gt;Enumerate objects in thread&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Use !dso command to dump all objects in the thread:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/alikl/WindowsLiveWriter/AvoidManipulatingPasswordsInMemoryItisEa_1032B/image_10.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="143" alt="image" src="http://blogs.msdn.com/blogfiles/alikl/WindowsLiveWriter/AvoidManipulatingPasswordsInMemoryItisEa_1032B/image_thumb_4.png" width="412" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;strong&gt;Dump object's values&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Use !do &amp;lt;object address&amp;gt; to dump specific object's values. Object address is a second column in the list generated by !dso command, the column named "Object" - just copy and paste it:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/alikl/WindowsLiveWriter/AvoidManipulatingPasswordsInMemoryItisEa_1032B/image_14.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="271" alt="image" src="http://blogs.msdn.com/blogfiles/alikl/WindowsLiveWriter/AvoidManipulatingPasswordsInMemoryItisEa_1032B/image_thumb_6.png" width="328" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;The password is revealed either by attaching to the process or analyzing a crash file that was taken offsite.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Countermeasures and guidelines&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;As rule of thumb avoid using custom built identification and authentication mechanisms and leverage those that the infrastructure offers - preferably Windows Integrated authentication. In case where all options exhausted and there is no other way but accept end user credentials, refer to the following article - &lt;a href="http://msdn2.microsoft.com/en-us/library/aa302353.aspx" target="_blank"&gt;Using Credential Management in Windows XP and Windows Server 2003&lt;/a&gt;. Techniques described in the article allow to leverage built in mechanism of accepting credentials from end user in more secure manner. It also keeps common familiar look and feel across custom application and built in Windows mechanisms leaving less room for end user confusion.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;My related posts:&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://blogs.msdn.com/alikl/archive/2007/04/11/authentication-hub.aspx"&gt;Authentication Hub&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;Other resources:&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;This post is inspired by &lt;a href="http://blogs.msdn.com/johan/archive/2007/11/13/getting-started-with-windbg-part-i.aspx" target="_blank"&gt;Getting started with windbg - part I&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://blogs.msdn.com/johan/archive/2007/11/13/getting-started-with-windbg-part-ii.aspx" target="_blank"&gt;Getting started with windbg - part II&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://kentb.blogspot.com/2007/11/windbg-sos-cheat-sheet.html" target="_blank"&gt;WinDbg + SOS Cheat Sheet&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.securityguidanceshare.com/wiki/ASP.NET_2.0_Security_Questions_and_Answers_-_Sensitive_Data" target="_blank"&gt;ASP.NET 2.0 Security Questions and Answers - Sensitive Data&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.securityguidanceshare.com/wiki/ASP.NET_2.0_Security_Questions_and_Answers_-_Authentication" target="_blank"&gt;ASP.NET 2.0 Security Questions and Answers - Authentication&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6701111" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/alikl/archive/tags/Test+Phase/default.aspx">Test Phase</category><category domain="http://blogs.msdn.com/alikl/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/alikl/archive/tags/Sensitive+Data/default.aspx">Sensitive Data</category><category domain="http://blogs.msdn.com/alikl/archive/tags/Authentication/default.aspx">Authentication</category><category domain="http://blogs.msdn.com/alikl/archive/tags/Planning+Phase/default.aspx">Planning Phase</category></item><item><title>IIS 7 Configuration File - applicationHost.config - Password Management</title><link>http://blogs.msdn.com/alikl/archive/2007/04/24/iis-7-configuration-file-applicationhost-config-password-management.aspx</link><pubDate>Tue, 24 Apr 2007 22:52:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2263745</guid><dc:creator>alikl</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/alikl/comments/2263745.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alikl/commentrss.aspx?PostID=2263745</wfw:commentRss><wfw:comment>http://blogs.msdn.com/alikl/rsscomments.aspx?PostID=2263745</wfw:comment><description>&lt;p&gt;From my learning of IIS7 I understand that IIS7's metabase is actually XML configuration file very familiar to me and similar to&amp;nbsp; ASP.NET's web.config. It is called&amp;nbsp;&lt;strong&gt;applicationHost.config&lt;/strong&gt; and sits in &lt;em&gt;C:\Windows\System32\inetsrv\config&lt;/em&gt;&lt;/p&gt; &lt;p&gt;My first interest was to see how&amp;nbsp;it manages passwords when specifying specific accounts for application pool.&lt;/p&gt; &lt;p&gt;I created demo application pool called xxxx, then I created demo account and specified my application pool to run under it. Then I navigated to&amp;nbsp;&lt;em&gt;C:\Windows\System32\inetsrv\config\applicationHost.config&lt;/em&gt; and opened it Notepad. I needed to run Notepad as administrator since UAC prevents from opening it directly into Notepad (I cannot say it about Visual Studio, which opens it gladly without running as Administrator). The following picture depicts what I found there:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/alikl/WindowsLiveWriter/IIS7_B2A0/image%7B0%7D%5B3%5D.png" atomicselection="true"&gt;&lt;img height="195" src="http://blogs.msdn.com/blogfiles/alikl/WindowsLiveWriter/IIS7_B2A0/image%7B0%7D_thumb%5B1%5D.png" width="530"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Seems like the password encrypted using RSA and the cipher was stored in the config file, not the clear text password.&lt;/p&gt; &lt;p&gt;Very cool.&lt;/p&gt; &lt;p&gt;Where&amp;nbsp;is the key? Digging deeper...&lt;/p&gt; &lt;p&gt;I learned it from:&lt;/p&gt; &lt;p&gt;&lt;a title="http://www.iis.net/News/Item.aspx?i=1174" href="http://www.iis.net/News/Item.aspx?i=1174"&gt;&lt;a title="http://www.iis.net/default.aspx?tabid=2&amp;amp;subtabid=25&amp;amp;i=992&amp;amp;p=3" href="http://www.iis.net/default.aspx?tabid=2&amp;amp;subtabid=25&amp;amp;i=992&amp;amp;p=3"&gt;http://www.iis.net/default.aspx?tabid=2&amp;amp;subtabid=25&amp;amp;i=992&amp;amp;p=3&lt;/a&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a title="http://www.iis.net/default.aspx?tabid=2&amp;amp;subtabid=25&amp;amp;i=992&amp;amp;p=4" href="http://www.iis.net/default.aspx?tabid=2&amp;amp;subtabid=25&amp;amp;i=992&amp;amp;p=4"&gt;http://www.iis.net/default.aspx?tabid=2&amp;amp;subtabid=25&amp;amp;i=992&amp;amp;p=4&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Enjoy&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2263745" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/alikl/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/alikl/archive/tags/Sensitive+Data/default.aspx">Sensitive Data</category><category domain="http://blogs.msdn.com/alikl/archive/tags/Deployment+Phase/default.aspx">Deployment Phase</category><category domain="http://blogs.msdn.com/alikl/archive/tags/IIS+7/default.aspx">IIS 7</category></item><item><title>Code Inspection - First Look For What To Look For</title><link>http://blogs.msdn.com/alikl/archive/2007/03/20/code-inspection-first-look-for-what-to-look-for.aspx</link><pubDate>Wed, 21 Mar 2007 00:13:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1921458</guid><dc:creator>alikl</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/alikl/comments/1921458.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alikl/commentrss.aspx?PostID=1921458</wfw:commentRss><wfw:comment>http://blogs.msdn.com/alikl/rsscomments.aspx?PostID=1921458</wfw:comment><description>&lt;p&gt;Reposted from &lt;a href="http://blogs.microsoft.co.il/blogs/alikl/archive/2007/01/03/Code-Inspection-_2D00_-First-Look-For-What-To-Look-For.aspx"&gt;Security Code Inspection - First Look For What To Look For&lt;/a&gt;&amp;nbsp;for further reuse on this blog.&lt;/p&gt; &lt;p&gt;I found it extremely productive to first look for strings in the code. But what strings to look for? And how to look for the strings? Looking into the source files?&lt;/p&gt; &lt;p&gt;My good friend &lt;a href="http://blogs.microsoft.co.il/blogs/alikl/archive/2006/12/29/How-They-Will-Discover-Secrets-You-Hide.aspx" target="_blank"&gt;FindStr&lt;/a&gt; is of great help here:&lt;/p&gt; &lt;p&gt;So first let's find what to look for:&lt;/p&gt; &lt;p&gt;&lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/THCMCh21.asp"&gt;Ildasm.exe secureapp.dll /text | findstr ldstr&lt;/a&gt;&lt;/p&gt; &lt;p&gt;This is what I've got using it:&lt;/p&gt; &lt;p&gt;Wouldn't it trigger you think of authorization data doing roundtrip thus vulnerable to tampering and elevation of privileges?&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/alikl/WindowsLiveWriter/CodeInspectionFirstLookForWhatToLookFor_C01E/image020.png" atomicselection="true"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="55" src="http://blogs.msdn.com/blogfiles/alikl/WindowsLiveWriter/CodeInspectionFirstLookForWhatToLookFor_C01E/image0_thumb10.png" width="568" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Wouldn't it trigger you think there is some custom authentication mechanism that potentially could be vulnerable thus enabling identity spoofing?&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/alikl/WindowsLiveWriter/CodeInspectionFirstLookForWhatToLookFor_C01E/image021.png" atomicselection="true"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="128" src="http://blogs.msdn.com/blogfiles/alikl/WindowsLiveWriter/CodeInspectionFirstLookForWhatToLookFor_C01E/image0_thumb11.png" width="325" border="0"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Wouldn't it trigger you think.....&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/blogfiles/alikl/WindowsLiveWriter/CodeInspectionFirstLookForWhatToLookFor_C01E/image022.png" atomicselection="true"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="101" src="http://blogs.msdn.com/blogfiles/alikl/WindowsLiveWriter/CodeInspectionFirstLookForWhatToLookFor_C01E/image0_thumb12.png" width="576" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;So once you have these strings you use same FindStr to find actual files to inspect:&lt;/p&gt; &lt;p&gt;findstr /S /M /I /d:c:\projects\yourweb "StringOfInterestGoesHere" *.cs &lt;/p&gt; &lt;p&gt;Cheers&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1921458" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/alikl/archive/tags/Test+Phase/default.aspx">Test Phase</category><category domain="http://blogs.msdn.com/alikl/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/alikl/archive/tags/Information+Gathering/default.aspx">Information Gathering</category><category domain="http://blogs.msdn.com/alikl/archive/tags/Sensitive+Data/default.aspx">Sensitive Data</category><category domain="http://blogs.msdn.com/alikl/archive/tags/Tools/default.aspx">Tools</category><category domain="http://blogs.msdn.com/alikl/archive/tags/Code+Inspection/default.aspx">Code Inspection</category><category domain="http://blogs.msdn.com/alikl/archive/tags/Development+Phase/default.aspx">Development Phase</category></item><item><title>SecureString Class Two Real Usages And Counting!</title><link>http://blogs.msdn.com/alikl/archive/2007/03/19/securestring-class-two-real-usages-and-counting.aspx</link><pubDate>Mon, 19 Mar 2007 18:03:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1913366</guid><dc:creator>alikl</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/alikl/comments/1913366.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alikl/commentrss.aspx?PostID=1913366</wfw:commentRss><wfw:comment>http://blogs.msdn.com/alikl/rsscomments.aspx?PostID=1913366</wfw:comment><description>&lt;p&gt;&lt;strong&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.security.securestring.aspx"&gt;SecureString Class&lt;/a&gt;&amp;nbsp; &lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;"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. This class cannot be inherited. "&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;I first was very excited about &lt;a href="http://msdn2.microsoft.com/en-us/library/system.security.securestring.aspx"&gt;SecureString&lt;/a&gt; introduced in .Net FX 2.0 but as I tried to learn it more and more I could not find real scenarios where I can apply it.&lt;/p&gt; &lt;p&gt;So here it comes:&lt;/p&gt; &lt;p&gt;1. &lt;a href="http://msdn2.microsoft.com/en-us/library/aa480470.aspx"&gt;Credential Management with the .NET Framework 2.0&lt;/a&gt;&amp;nbsp;- very detailed and useful article.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;b&gt;"Summary:&lt;/b&gt; Get an introduction to the Credential Management API that includes functions for user interface handling and lesser-known functions for managing a user's credential set. Also see a .NET class library that dramatically simplifies the task of credential management, for languages such as C# and Visual Basic .NET, and provides a more elegant and robust approach to credential management for C++ developers. (26 printed pages)"&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;2. &lt;a href="http://msdn2.microsoft.com/ms148419.aspx"&gt;X509Certificate2 (String, SecureString) &lt;/a&gt;&amp;nbsp;- got this one while reading &lt;a href="http://msdn.microsoft.com/msdnmag/issues/07/03/netsecurity/default.aspx"&gt;Support Certificates In Your Applications With The .NET Framework 2.0&lt;/a&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;"You can also load certificates from .pfx files. However, as I mentioned earlier, .pfx files can be password protected [ed. alikl - SHOULD BE, MUST BE?], and you should supply this password as a SecureString. SecureString encrypts the password internally and tries to minimize exposure of it in Memory, page files, and crash dumps"&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;More on SecureString is here on &lt;a href="http://blogs.msdn.com/shawnfa/default.aspx"&gt;.Net Security Blog&lt;/a&gt;:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/shawnfa/archive/2006/11/01/securestring-redux.aspx"&gt;SecureString Redux&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/shawnfa/archive/2004/05/27/143254.aspx"&gt;Making Strings More Secure&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Got more examples? Share please!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1913366" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/alikl/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/alikl/archive/tags/Sensitive+Data/default.aspx">Sensitive Data</category><category domain="http://blogs.msdn.com/alikl/archive/tags/Development+Phase/default.aspx">Development Phase</category><category domain="http://blogs.msdn.com/alikl/archive/tags/Implementation/default.aspx">Implementation</category></item><item><title>Google Code Search - Different Perspective</title><link>http://blogs.msdn.com/alikl/archive/2007/03/05/google-code-search-different-perspective.aspx</link><pubDate>Mon, 05 Mar 2007 23:56:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1812158</guid><dc:creator>alikl</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/alikl/comments/1812158.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alikl/commentrss.aspx?PostID=1812158</wfw:commentRss><wfw:comment>http://blogs.msdn.com/alikl/rsscomments.aspx?PostID=1812158</wfw:comment><description>&lt;p&gt;&lt;a href="http://blogs.msdn.com/bwong_ms/archive/2006/10/05/Google-launches-a-special-treat-just-for-developers.aspx"&gt;Google launches a special treat just for developers&lt;/a&gt;&amp;nbsp;...&lt;/p&gt; &lt;p&gt;&amp;nbsp;I'd like to present it&amp;nbsp;from some different perspective.&lt;/p&gt; &lt;p&gt;Imagine you provide search criteria as follows:&lt;/p&gt; &lt;p&gt;"&lt;a href="http://www.google.com/codesearch?q=%22initial+catalog%22&amp;amp;hl=en"&gt;Initial Catalog&lt;/a&gt;" - try it. What do you see?&lt;/p&gt; &lt;p&gt;More like these &lt;a href="http://portal.spidynamics.com/blogs/msutton/archive/2006/10/06/Fun-With-Google-Code-Search.aspx"&gt;here&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Doesn't it make you want to write more &lt;a href="http://msdn.com/securityengineering"&gt;secure code&lt;/a&gt;... :) ?&lt;/p&gt; &lt;p&gt;Enjoy&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1812158" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/alikl/archive/tags/Test+Phase/default.aspx">Test Phase</category><category domain="http://blogs.msdn.com/alikl/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/alikl/archive/tags/Information+Gathering/default.aspx">Information Gathering</category><category domain="http://blogs.msdn.com/alikl/archive/tags/Sensitive+Data/default.aspx">Sensitive Data</category></item></channel></rss>