<?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>Decrypt my World : LSASS</title><link>http://blogs.msdn.com/alejacma/archive/tags/LSASS/default.aspx</link><description>Tags: LSASS</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>How to verify if password meets complexity requirements programmatically</title><link>http://blogs.msdn.com/alejacma/archive/2008/06/10/how-to-verify-if-password-meets-complexity-requirements-programmatically.aspx</link><pubDate>Tue, 10 Jun 2008 05:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8437802</guid><dc:creator>alejacma</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/alejacma/comments/8437802.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alejacma/commentrss.aspx?PostID=8437802</wfw:commentRss><description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;Some&amp;nbsp;customers asked me in the past if there was any &lt;STRONG&gt;API&lt;/STRONG&gt; to&amp;nbsp;verify if a &lt;STRONG&gt;password&lt;/STRONG&gt; meets Windows&amp;nbsp;&lt;STRONG&gt;complexity requirements&lt;/STRONG&gt;. Unfortunately there is no such API. We could implement our own if we know the requirements of the password filter used in our machines. &lt;/P&gt;
&lt;P&gt;The default &lt;STRONG&gt;password filter&lt;/STRONG&gt; (&lt;STRONG&gt;passfilt.dll&lt;/STRONG&gt;) in Windows checks for the following:&lt;/P&gt;
&lt;P&gt;1) Not contain significant portions of the user's account name or full name.&lt;BR&gt;2) Be at least six characters in length.&lt;BR&gt;3) Contain characters from three of the following four categories: &lt;BR&gt;&amp;nbsp; a) English uppercase characters (A through Z).&lt;BR&gt;&amp;nbsp; b) English lowercase characters (a through z).&lt;BR&gt;&amp;nbsp; c) Base 10 digits (0 through 9).&lt;BR&gt;&amp;nbsp; d) Non-alphabetic characters (for example, !, $, #, %).&lt;/P&gt;
&lt;P&gt;See the following articles for details:&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://msdn2.microsoft.com/en-us/library/ms813420.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms813420.aspx"&gt;Passwords must meet complexity requirements of the installed password filter (Windows 2000)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://technet2.microsoft.com/windowsserver/en/library/c835b4b2-e082-478f-bdf9-b0faaa654fad1033.mspx?mfr=true" mce_href="http://technet2.microsoft.com/windowsserver/en/library/c835b4b2-e082-478f-bdf9-b0faaa654fad1033.mspx?mfr=true"&gt;Passwords must meet complexity requirements (Windows Server 2003)&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alex (Alejandro Campos Magencio)&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8437802" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/alejacma/archive/tags/LSASS/default.aspx">LSASS</category></item><item><title>How to debug LSASS.exe process</title><link>http://blogs.msdn.com/alejacma/archive/2007/11/13/how-to-debug-lsass-exe-process.aspx</link><pubDate>Tue, 13 Nov 2007 19:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6177145</guid><dc:creator>alejacma</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/alejacma/comments/6177145.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alejacma/commentrss.aspx?PostID=6177145</wfw:commentRss><description>&lt;P&gt;Hi, welcome back,&lt;/P&gt;
&lt;P&gt;I've been dealing these days&amp;nbsp;with an issue about a &lt;A class="" title="Custom Authentication Package" href="http://msdn2.microsoft.com/en-us/library/aa374784.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/aa374784.aspx"&gt;Custom Authentication Package&lt;/A&gt;&amp;nbsp;which was crashing &lt;STRONG&gt;LSASS.exe&lt;/STRONG&gt; process even before we had the opportunity to log on the machine. So, how can I debug the package/LSASS process&amp;nbsp;with my favorite debugger, &lt;STRONG&gt;WinDbg&lt;/STRONG&gt; (&lt;A class="" title="Debugging Tools for Windows" href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx" mce_href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx"&gt;Debugging Tools for Windows&lt;/A&gt;),&amp;nbsp;to know what's going on there?&lt;/P&gt;
&lt;P mce_keep="true"&gt;To make things easier I use two machines: a &lt;STRONG&gt;Windows XP&lt;/STRONG&gt; machine running on &lt;A class="" title="Virtual PC" href="http://www.microsoft.com/windows/products/winfamily/virtualpc/default.mspx" mce_href="http://www.microsoft.com/windows/products/winfamily/virtualpc/default.mspx"&gt;Virtual PC&lt;/A&gt;&amp;nbsp;and my &lt;STRONG&gt;Windows Vista&lt;/STRONG&gt; machine. Virtual PC makes my life much easier as I can recover the machine very easily if I "break" it. It also makes kernel debugging easier as I don't need any cables to connect the machines involved. The target package/LSASS&amp;nbsp;process&amp;nbsp;will run on WinXP, and WinDbg will run on Vista.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;1) Let's configure &lt;STRONG&gt;LSASS&lt;/STRONG&gt; on &lt;STRONG&gt;WinXP&lt;/STRONG&gt; to load and use the problematic &lt;STRONG&gt;package&lt;/STRONG&gt; (i.e. MyPackage.dll):&lt;/P&gt;
&lt;P mce_keep="true"&gt;1.1) Copy MyPackage.dll to %SystemRoot%\system32. &lt;/P&gt;
&lt;P mce_keep="true"&gt;1.2) Add "MyPackage" to the &lt;STRONG&gt;Authentication Packages &lt;/STRONG&gt;list in the &lt;STRONG&gt;\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa&lt;/STRONG&gt; registry key. &lt;/P&gt;
&lt;P mce_keep="true"&gt;2) Let's configure &lt;STRONG&gt;WinXP&lt;/STRONG&gt; to run &lt;STRONG&gt;LSASS&lt;/STRONG&gt; under a user mode debugger like &lt;STRONG&gt;NTSD.exe &lt;/STRONG&gt;(&lt;A class="" title="Debugging Tools for Windows" href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx" mce_href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx"&gt;Debugging Tools for Windows&lt;/A&gt;). We won't be able to use this debugger directly, but we will be able to use it through WinDbg working as kernel mode debugger on Vista. &lt;/P&gt;
&lt;P mce_keep="true"&gt;2.a) Set &lt;STRONG&gt;Debugger &lt;/STRONG&gt;value to REG_SZ "&lt;STRONG&gt;ntsd -d&lt;/STRONG&gt;" in &lt;STRONG&gt;HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\lsass.exe&lt;/STRONG&gt;. &lt;/P&gt;
&lt;P mce_keep="true"&gt;2.b) Instead of manipulating the&amp;nbsp;registry directly, we may use &lt;STRONG&gt;GFlags.exe&lt;/STRONG&gt; (&lt;A class="" title="Debugging Tools for Windows" href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx" mce_href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx"&gt;Debugging Tools for Windows&lt;/A&gt;) to make these changes: go to &lt;STRONG&gt;Image File&lt;/STRONG&gt; tab, enter "LSASS.exe" in &lt;STRONG&gt;Image &lt;/STRONG&gt;field, press &lt;STRONG&gt;TAB&lt;/STRONG&gt; to refresh, click on &lt;STRONG&gt;Debugger&lt;/STRONG&gt; checkbox and enter "&lt;STRONG&gt;ntsd -d&lt;/STRONG&gt;" as the debugger.&lt;/P&gt;
&lt;P mce_keep="true"&gt;After these changes NTSD will break in LSASS execution just when&amp;nbsp;LSASS is about to start (thx to &lt;STRONG&gt;-d &lt;/STRONG&gt;parameter), so we can debug it from the very beginning of its execution. Now we'll need a kernel debugger (WinDbg in our case) to control NTSD remotely.&lt;/P&gt;
&lt;P mce_keep="true"&gt;3) Let's configure &lt;STRONG&gt;WinXP&lt;/STRONG&gt; to start on debug mode and be able to attach a &lt;STRONG&gt;kernel debugger&lt;/STRONG&gt; to it:&lt;/P&gt;
&lt;P mce_keep="true"&gt;3.1) Run &lt;STRONG&gt;msconfig.exe&lt;/STRONG&gt; (&lt;A class="" title="System Configuration utility" href="http://support.microsoft.com/kb/310560/en-us" mce_href="http://support.microsoft.com/kb/310560/en-us"&gt;System Configuration utility&lt;/A&gt;), go to &lt;STRONG&gt;BOOT.INI&lt;/STRONG&gt; tab, click on &lt;STRONG&gt;Advanced Options...&lt;/STRONG&gt; button, and select &lt;STRONG&gt;/DEBUG&lt;/STRONG&gt;, select&amp;nbsp;&amp;amp;&amp;nbsp;set&amp;nbsp;&lt;STRONG&gt;/DEBUGPORT= &lt;/STRONG&gt;to &lt;STRONG&gt;COM1:&lt;/STRONG&gt;,&amp;nbsp;and select &amp;amp; set &lt;STRONG&gt;/BAUDRATE=&lt;/STRONG&gt; to &lt;STRONG&gt;115200&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P mce_keep="true"&gt;3.2) On &lt;STRONG&gt;Virtual PC&lt;/STRONG&gt; go to &lt;STRONG&gt;Edit &amp;gt; Settings&lt;/STRONG&gt; menu option, select &lt;STRONG&gt;COM1&lt;/STRONG&gt; and set it to a &lt;STRONG&gt;Named pipe&lt;/STRONG&gt; called i.e. &lt;STRONG&gt;\\.\pipe\machinename&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Now our WinXP is prepared to be debugged. We can restart it now. We will see that WinXP hangs before showing the logon screen. NTSD has broken in LSASS, and because LSASS is not executing, WinXP won't start either. NTSD is now waiting for our debugging commands, but we will need WinDbg to send those commands to it.&lt;/P&gt;
&lt;P mce_keep="true"&gt;4) Let's configure &lt;STRONG&gt;WinDbg&lt;/STRONG&gt; on &lt;STRONG&gt;Vista&lt;/STRONG&gt; to do &lt;STRONG&gt;kernel debugging&lt;/STRONG&gt; on WinXP:&lt;/P&gt;
&lt;P mce_keep="true"&gt;On &lt;STRONG&gt;WinDbg&lt;/STRONG&gt; go to &lt;STRONG&gt;File &amp;gt; Kernel Debug...&lt;/STRONG&gt; menu option, select &lt;STRONG&gt;COM &lt;/STRONG&gt;tab, check &lt;STRONG&gt;Pipe &lt;/STRONG&gt;checkbox, set &lt;STRONG&gt;Baud Rate&lt;/STRONG&gt; to &lt;STRONG&gt;115200&lt;/STRONG&gt; and &lt;STRONG&gt;Port&lt;/STRONG&gt; to &lt;STRONG&gt;\\.\pipe\machinename&lt;/STRONG&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;(the same we used on Virtual PC). When we click &lt;STRONG&gt;OK&lt;/STRONG&gt; WinDbg will connect to WinXP as its kernel debugger. &lt;/P&gt;
&lt;P mce_keep="true"&gt;When WinDbg connects to WinXP and WinLogon is about to start, WinDbg shows the prompt of NTSD ("&lt;STRONG&gt;Input&amp;gt;&lt;/STRONG&gt;"). We will now be able to send commands to NTSD, like &lt;STRONG&gt;bp&lt;/STRONG&gt; to set a breakpoint, etc.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Please take a look to "&lt;STRONG&gt;Controlling the User-Mode Debugger from the Kernel Debugger&lt;/STRONG&gt;" topic on WinDbg's help for more info on how to control NTSD from WinDbg.&lt;/P&gt;
&lt;P mce_keep="true"&gt;We will now be able to do user mode (thx to NTSD) and kernel mode debugging at the same time with WinDbg.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Note: I had some issues to load the right symbols (.pdb files), because I couldn't set &lt;STRONG&gt;.sympath&lt;/STRONG&gt; on NTSD to c:\symbols, for instance. So I did the following: I took a dump of LSASS process with &lt;STRONG&gt;.dump &lt;/STRONG&gt;command, I opened the dump and loaded all the symbols I needed (i.e. lsasrv.pdb, lsass.pdb, kernel32.pdb, ntdll.pdb and MyPackage.pdb). I copied all those symbols to System32 folder on XP, and after that NTSD was able to find them without setting its .sympath.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Note: We may debug CSRSS and WinLogon processes following the same principles. Take a look to "&lt;STRONG&gt;Debugging CSRSS with NTSD&lt;/STRONG&gt;" and "&lt;STRONG&gt;Debugging WinLogon with NTSD&lt;/STRONG&gt;" topics on WinDbg's help.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alex&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6177145" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/alejacma/archive/tags/WinDbg/default.aspx">WinDbg</category><category domain="http://blogs.msdn.com/alejacma/archive/tags/Debugging/default.aspx">Debugging</category><category domain="http://blogs.msdn.com/alejacma/archive/tags/NTSD/default.aspx">NTSD</category><category domain="http://blogs.msdn.com/alejacma/archive/tags/LSASS/default.aspx">LSASS</category></item></channel></rss>