<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.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>Tales from the Crypto : Windows Vista</title><link>http://msmvps.com/blogs/alunj/archive/tags/Windows+Vista/default.aspx</link><description>Tags: Windows Vista</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Why .NET apps keep crashing on your Tablet PC</title><link>http://msmvps.com/blogs/alunj/archive/2009/11/07/1738299.aspx</link><pubDate>Sat, 07 Nov 2009 23:24:29 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1738299</guid><dc:creator>Alun Jones</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/rsscomments.aspx?PostID=1738299</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/commentapi.aspx?PostID=1738299</wfw:comment><comments>http://msmvps.com/blogs/alunj/archive/2009/11/07/1738299.aspx#comments</comments><description>&lt;p&gt;I’ve been struggling with this issue for some time.&lt;/p&gt;  &lt;p&gt;I have a small, simple .NET application I wrote in Visual C# a few months ago – I’ve tentatively titled it “&lt;a href="http://www.wftpd.com/ifetch.html"&gt;iFetch&lt;/a&gt;”, because it fetches radio shows from the &lt;a href="http://www.bbc.co.uk/iplayer/radio"&gt;BBC iPlayer&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;It really is very little more than a simple data grid view that displays the details of the shows and allows users to select them for downloading and later listening.&lt;/p&gt;  &lt;p&gt;Despite that, I’ve had some terrible trouble with it. Sometimes it’ll work perfectly, other times it’ll just suddenly crash, and apparently without warning and for different reasons – sometimes when I click on a row, other times when I select to sort on a column heading.&lt;/p&gt;  &lt;p&gt;The crash seems to be intermittent, but doesn’t reproduce on other computers; even computers of the same configuration.&lt;/p&gt;  &lt;p&gt;For those who want technical details, here we go – the crash is a System.StackOverflowException error, and appears to be due to an unchecked infinite recursion in System.Windows.Forms.dll!System.Windows.Forms.DataGridViewRow.DataGridViewRowAccessibleObject.Bounds.get().&lt;/p&gt;  &lt;p&gt;The clue here is that this is a “DataGridViewRow&lt;strong&gt;AccessibleObject”&lt;/strong&gt; – not a mere DataGridViewRow. These “AccessibleObject” versions of common .NET components only come into existence and spread their effect when an “accessibility application” is active on the system. Apparently, in addition to text-to-speech readers, braille devices, etc, a Tablet – whether external like mine, or internal like those in a Tablet PC – classifies as an accessibility application.&lt;/p&gt;  &lt;p&gt;That’s why this bug was intermittent for me – sometimes I had my external graphics tablet plugged in, other times I didn’t. To make matters worse, it seems to only trigger when one or more rows in the DataGrid are hidden.&lt;/p&gt;  &lt;p&gt;If you get this error, first try checking to see if Microsoft have fixed the flaw – check for .NET service packs – and then, if there is no direct fix for the flaw, try either unplugging your tablet, if you can, or temporarily stop the Tablet PC Input Service, while running the program.&lt;/p&gt;  &lt;p&gt;So far, I have received no feedback from Microsoft about when this will be fixed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1738299" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/alunj/archive/tags/Miscellany+-+not+security/default.aspx">Miscellany - not security</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Vista/default.aspx">Windows Vista</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Alun_2700_s+code/default.aspx">Alun's code</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+7/default.aspx">Windows 7</category></item><item><title>Running out of disk space? How’s your logs?</title><link>http://msmvps.com/blogs/alunj/archive/2008/12/25/1657730.aspx</link><pubDate>Thu, 25 Dec 2008 21:52:25 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1657730</guid><dc:creator>Alun Jones</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/rsscomments.aspx?PostID=1657730</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/commentapi.aspx?PostID=1657730</wfw:comment><comments>http://msmvps.com/blogs/alunj/archive/2008/12/25/1657730.aspx#comments</comments><description>&lt;p&gt; I ran out of disk space today.&lt;/p&gt;  &lt;p&gt;This is not entirely a new issue for me, because I like to listen to &lt;a href="http://www.bbc.co.uk/iplayer/radio"&gt;BBC Radio&lt;/a&gt; from back home, and my only way to do that is to download the shows overnight so I can listen to them the next day. [I’m not allowed that sort of bandwidth at work]&lt;/p&gt;  &lt;p&gt;I start troubleshooting this in the obvious way – where are my largest individual files, and are they useful? Windows Vista’s Search is great for this – you can ask for files over a certain number of bytes:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/alunj.RunningoutofdiskspaceHowsyourlogs_5F00_E9F8/Image_2D00_0244_5F00_2.png"&gt;&lt;img title="Image-0244" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" height="604" alt="Image-0244" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/alunj.RunningoutofdiskspaceHowsyourlogs_5F00_E9F8/Image_2D00_0244_5F00_thumb.png" width="804" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Whoa, over a gigabyte in that mysterious file called “setupapi.app.log”? Ah, but it’s in that C:\Windows\inf directory that I really shouldn’t mess with, so I’d better check to see that it’s alright to get rid of the file. Let’s see what the Microsoft Support Knowledge Base has to offer on the subject of huge files created by the Setup API.&lt;/p&gt;  &lt;p&gt;&lt;a title="http://support.microsoft.com/default.aspx/kb/958909" href="http://support.microsoft.com/default.aspx/kb/958909"&gt;http://support.microsoft.com/default.aspx/kb/958909&lt;/a&gt; - “It may take a long time to log on to a Windows Vista-based computer that has antivirus software installed” – well, I haven’t really noticed that logons are that slow, and I don’t actually have antivirus software installed. But visiting the article, I see that this is only the first half of the title. The full title is:&lt;/p&gt;  &lt;h3&gt;It may take a long time to log on to a Windows Vista-based computer that has antivirus software installed, and you may notice that the file size of the Setupapi.app.log file is very large&lt;/h3&gt;  &lt;p&gt;So, to use a medical metaphor here, the large setupapi.app.log is the internal haemorrhaging caused by some injury or illness, and the slow logon (or in my case, the inability to use my disk space) is the externally visible symptom – the loss of consciousness, the fainting fit, the going-into-shock. Now that we’ve got the diagnosis, let’s see if the KB article has anything useful to say.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“This problem occurs because the verbose logging policy for the Setupapi.app.log file in Windows Vista is set to the most verbose setting (0x20000FFFF).&lt;/p&gt;    &lt;p&gt;“…&lt;/p&gt;    &lt;p&gt;“To work around this problem, remove or adjust the value of the following registry entry:     &lt;br /&gt;&lt;b&gt;HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Setup\LogLevel&lt;/b&gt;”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Hmm… my value is set to 0x20000000. What value should it be?&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“Type 0x00000020 in the &lt;strong&gt;Value data&lt;/strong&gt; box.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;OK, that’s a little pedantic – instead, how about you click the “Hexadecimal” radio button, and enter “20”:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/alunj.RunningoutofdiskspaceHowsyourlogs_5F00_E9F8/Image_2D00_0245_5F00_2.png"&gt;&lt;img title="Image-0245" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" height="207" alt="Image-0245" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/alunj.RunningoutofdiskspaceHowsyourlogs_5F00_E9F8/Image_2D00_0245_5F00_thumb.png" width="349" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;There is a hotfix mentioned in the article, but I rarely like to apply hotfixes to my machine if I am sure that the workaround will suffice. I may revisit the hotfix if I can’t see this work to reduce my log file size.&lt;/p&gt;  &lt;p&gt;So, how did this happen? How did the setting get put to such a bizarre value?&lt;/p&gt;  &lt;p&gt;Quite frankly, I don’t know – and as long as the problem goes away, I’ll just put it down to one of the many programs that I’ve installed or uninstalled. Judging from the fact that this log seems to have been in detail mode ever since November 2007, it’s likely that this setting was chosen (either by me or Microsoft) to gauge how successful the new install of Vista was going.&lt;/p&gt;  &lt;p&gt;I now have a gigabyte of my file-space left, and I can go and download “&lt;a href="http://www.bbc.co.uk/iplayer/episode/b007jqsz/Crisp_and_Even_Brightly/"&gt;Crisp and Even, Brightly&lt;/a&gt;”, one of my favourite Christmas shows from Radio 4. I only wish I could get the TV, because there are some excellent BBC shows that never make it across to this side of the Atlantic – and I just can’t wait for Doctor Who Season 4 – the next Doctor (or is he?), Cybermen, and a Victorian Christmas.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1657730" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/alunj/archive/tags/Programmer+Hubris/default.aspx">Programmer Hubris</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Miscellany+-+not+security/default.aspx">Miscellany - not security</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Vista/default.aspx">Windows Vista</category></item><item><title>Redmond Report says “Vista Kernel Flawed”</title><link>http://msmvps.com/blogs/alunj/archive/2008/12/09/1656353.aspx</link><pubDate>Wed, 10 Dec 2008 04:52:22 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1656353</guid><dc:creator>Alun Jones</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/rsscomments.aspx?PostID=1656353</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/commentapi.aspx?PostID=1656353</wfw:comment><comments>http://msmvps.com/blogs/alunj/archive/2008/12/09/1656353.aspx#comments</comments><description>&lt;p&gt;This is just some lovely reporting:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://redmondmag.com/news/article.asp?editorialsid=10415"&gt;Vista Kernel Ready To Pop?&lt;/a&gt; &lt;/p&gt;    &lt;p&gt;Vista, due largely to its lockdown of user rights, is far more secure than XP. But it&amp;#39;s not 100 percent safe. In fact, the kernel itself has an issue that could lead to buffer overflow attacks, or so says security company Phion.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Well, that&amp;#39;s hardly surprising, we know how common buffer overflow attacks are, and how difficult they are to prevent. Go on...&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;The exploit, which does require admin privileges, is pretty well-documented by Phion. And there&amp;#39;s no patch -- just a workaround from the company. Hmm. Is Phion looking for new customers?&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Uh... if the &amp;#39;exploit&amp;#39; needs admin privileges to start with, exactly how is it an &amp;quot;exploit&amp;quot;? It&amp;#39;s a &lt;u&gt;bug&lt;/u&gt;. By the time you have admin privileges, you can replace the operating system with one that does your bidding anyway, so how is it an &amp;#39;exploit&amp;#39; that you can do so without replacing the OS core?&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Pre-announcing this kind of flaw is like giving bullets to insurgents before our soldiers have a chance to put on helmets and bulletproof vests: dangerous.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;No, it&amp;#39;s rather like suggesting that there&amp;#39;s a flaw in that if the Commander-in-Chief is secretly supporting the terrorist cause, he can order our soldiers to be needlessly sent into a dangerous war zone without sufficient arms or armour.&lt;/p&gt;  &lt;p&gt;There are other bugs where I would agree that it’s important to avoid announcing the flaw before the vendor has been given a reasonable chance to fix it for find a workaround – this isn’t that case, though.&lt;/p&gt;  &lt;p&gt;The flaw in question &lt;u&gt;is&lt;/u&gt; worth noting, though, in that it&amp;#39;s something that can be abused by members of the Network Operators group - and there are many sites that put users into this group simply so that they can turn off or on the wireless networking card on their laptops (for those that don&amp;#39;t have a simple hardware switch). So, while Microsoft may assert that &amp;quot;Network Operators are just like administrators&amp;quot;, there are many ordinary users who have been dropped into the Network Operators group.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1656353" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/alunj/archive/tags/General+Security/default.aspx">General Security</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Vista/default.aspx">Windows Vista</category></item><item><title>Windows 7 officially has a name</title><link>http://msmvps.com/blogs/alunj/archive/2008/10/14/1650805.aspx</link><pubDate>Tue, 14 Oct 2008 17:41:39 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1650805</guid><dc:creator>Alun Jones</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/rsscomments.aspx?PostID=1650805</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/commentapi.aspx?PostID=1650805</wfw:comment><comments>http://msmvps.com/blogs/alunj/archive/2008/10/14/1650805.aspx#comments</comments><description>&lt;p&gt;So, what’s the scoop?&lt;/p&gt;  &lt;p&gt;It’s going to be called “&lt;a href="http://windowsvistablog.com/blogs/windowsvista/archive/2008/10/13/introducing-windows-7.aspx"&gt;Windows 7&lt;/a&gt;”, according to Mike Nash posting at the &lt;a href="http://windowsvistablog.com/blogs/windowsvista/"&gt;Windows Vista Blog&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/presspass/images/exec/web/nash-2.jpg"&gt;&lt;img style="display:inline;margin-left:0px;margin-right:0px;" alt="Mike Nash" src="http://www.microsoft.com/presspass/images/exec/thumbnails/nash-2.jpg" align="left" /&gt;&lt;/a&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/alunj.Windows7officiallyhasaname_5F00_9242/image_5F00_2.png"&gt;&lt;img title="image" style="border-right:0px;border-top:0px;display:inline;margin-left:0px;border-left:0px;margin-right:0px;border-bottom:0px;" height="102" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/alunj.Windows7officiallyhasaname_5F00_9242/image_5F00_thumb.png" width="84" align="left" border="0" /&gt;&lt;/a&gt;[Is it just me, or does Mike Nash look a little like the chef who got into trouble for inflating his resume in the opening credits to “&lt;a href="http://www.foodnetwork.com/robert-irvine/index.html"&gt;Dinner: Impossible&lt;/a&gt;”? ]&lt;/p&gt;  &lt;p&gt;How sneaky of Microsoft, to fool us into thinking that “Windows 7” was just the code name, when in fact it was also the release name!&lt;/p&gt;  &lt;p&gt;Me, I think it’s because there was just no good way to include hints of the code-name in the final release name, like Microsoft have done in the past.&lt;/p&gt;  &lt;p&gt;Think about it – “Cairo” spawned “Windows XP” – the Greek letters chi and rho are written: “ΧΡ” (lower-case is “χρ”) (if you don’t have the Greek font, that looks almost indistinguishable from “XP”). I’ll always think of it as “Windows No Parking”.&lt;/p&gt;  &lt;p&gt;Windows 6 became Windows Vista – get it, six is “vi” in roman numerals?&lt;/p&gt;  &lt;p&gt;So, Windows 7 should have been Windows Viista. Or maybe the name could have made obscure art-house movie references, and been called “A Vee and two ones”. Ah, but anything with VII in it might be perilously close to Intel’s VIIV product (currently residing in our “where are they now” file).&lt;/p&gt;  &lt;p&gt;Perhaps this should make us think back to the last time a Windows client operating system was referred to by the word “Windows” followed by its version number – yes, “Windows 7” is designed to hearken back to “Windows 3.11”. Ah, yes, those were the days, indeed.&lt;/p&gt;  &lt;p&gt;I can’t wait to see what’s coming in Windows 7, particularly things like Multi-touch support (though I have yet to purchase a system that has even single touch support).&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Seven also marks Windows’ transition from an acid into a base.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1650805" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/alunj/archive/tags/Bad+names/default.aspx">Bad names</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Miscellany+-+not+security/default.aspx">Miscellany - not security</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Vista/default.aspx">Windows Vista</category></item><item><title>HTML Help in MFC</title><link>http://msmvps.com/blogs/alunj/archive/2008/10/12/1650663.aspx</link><pubDate>Mon, 13 Oct 2008 04:36:11 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1650663</guid><dc:creator>Alun Jones</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/rsscomments.aspx?PostID=1650663</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/commentapi.aspx?PostID=1650663</wfw:comment><comments>http://msmvps.com/blogs/alunj/archive/2008/10/12/1650663.aspx#comments</comments><description>&lt;p&gt;I recently got around to converting an old MFC project from WinHelp format to HTML Help. Mostly this was to satisfy customers who are using Windows Vista or Windows Server 2008, but who don’t want to install WinHlp32 from Microsoft. (If you do want to install WinHlp32, you can find it for &lt;a href="http://www.microsoft.com/downloads/info.aspx?u=%2fdownloads%2fdetails.aspx%3fFamilyID%3d6ebcfad9-d3f5-4365-8070-334cd175d4bb"&gt;Windows Vista&lt;/a&gt; or &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=0468fefd-b54f-4c57-8340-c6dd2ec20c0a"&gt;Windows Server 2008&lt;/a&gt; at Microsoft’s download site.]&lt;/p&gt;  &lt;p&gt;Here’s a quick round trip of how I did it:&lt;/p&gt;  &lt;p&gt;1. Convert the help file – yeah, this is the hard part, but there are plenty of tools, including Microsoft’s HTML Help Editor, that will do the job for you. Editing the help file in HTML format can be a little bit of a challenge, too, but many times your favourite HTML editor can be made to do the job for you.&lt;/p&gt;  &lt;p&gt;2. Call EnableHtmlHelp() from the CWinApp-derived class’ constructor.&lt;/p&gt;  &lt;p&gt;3. Remove the line ON_COMMAND(ID_HELP_USING, CWinApp::OnHelpUsing), if you have it - there is no HELP_HELPONHELP topic in HTML.&lt;/p&gt;  &lt;p&gt;4. Add the following function:&lt;/p&gt;  &lt;p&gt;void CWftpdApp::HelpKeyWord(LPCSTR sKeyword)    &lt;br /&gt;{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; HH_AKLINK akLink;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; switch (GetHelpMode())     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; case afxHTMLHelp:     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; akLink.cbStruct = sizeof(HH_AKLINK);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; akLink.fReserved=FALSE;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; akLink.fIndexOnFail=TRUE;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; akLink.pszKeywords=sKeyword;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; akLink.pszMsgText=(CString)&amp;quot;Failed to find information in the help file on &amp;quot; + sKeyword;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; akLink.pszMsgTitle=&amp;quot;HTML Help Error&amp;quot;;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; akLink.pszWindow=NULL;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; AfxGetApp()-&amp;gt;HtmlHelp((DWORD_PTR)&amp;amp;akLink,HH_KEYWORD_LOOKUP);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; break;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; case afxWinHelp:     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; AfxGetApp()-&amp;gt;WinHelp((long)(char *)sKeyword,HELP_KEY);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; break;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;} &lt;/p&gt;  &lt;p&gt;5. Change your keyword help calls to call this new function:&lt;/p&gt;  &lt;p&gt;((CWftpdApp *)AfxGetApp()-&amp;gt;WinHelp((long)(char *)&amp;quot;Registering&amp;quot;);&lt;/p&gt;  &lt;p&gt;Becomes:&lt;/p&gt;  &lt;p&gt;HelpKeyWord(&amp;quot;Registering&amp;quot;,HELP_KEY); &lt;/p&gt;  &lt;p&gt;6. If you want to trace calls to the WinHelp function to watch what contexts are being created, trap WinHelpInternal: &lt;/p&gt;  &lt;p&gt;void CWftpdApp::WinHelpInternal(DWORD_PTR dwData, UINT nCmd)    &lt;br /&gt;{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; TRACE(&amp;quot;Executing WinHelp with Cmd=%d, dwData=%d (%x)\r\n&amp;quot;,nCmd,dwData,dwData);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; CWinApp::WinHelpInternal(dwData,nCmd);     &lt;br /&gt;} &lt;/p&gt;  &lt;p&gt;This trace comes in really, really (and I mean REALLY) handy when you are trying to debug “Failed to load help” errors. It will tell you what numeric ID is being used, and you can compare that to your ALIAS file.&lt;/p&gt;  &lt;p&gt;7. If your code gives a dialog box that reads:&lt;/p&gt;  &lt;p&gt;---------------------------    &lt;br /&gt;HTML Help Author Message     &lt;br /&gt;---------------------------     &lt;br /&gt;HH_HELP_CONTEXT called without a [MAP] section.     &lt;br /&gt;---------------------------     &lt;br /&gt;OK&amp;#160;&amp;#160; &lt;br /&gt;--------------------------- &lt;/p&gt;  &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/alunj.ContextSensitiveHelpinMFC_5F00_F17F/image_5F00_2.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="156" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/alunj.ContextSensitiveHelpinMFC_5F00_F17F/image_5F00_thumb.png" width="347" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;What it means is that the HTML Help API could not find the [MAP] &lt;u&gt;or&lt;/u&gt; the [ALIAS] section - without an [ALIAS] section, but with a [MAP] section, this message still will appear.&lt;/p&gt;  &lt;p&gt;8. Don’t edit the ALIAS or MAP sections of your help file in HTML Help Editor – Microsoft has a long-standing bug here that makes it crash (losing much of your unsaved work, of course) unpredictably when editing these sections. Edit the HHP file by hand to work on these sections.&lt;/p&gt;  &lt;p&gt;9. Most of your MAP section entries are automatically generated by the compiler, as .HM files, which hold macros appropriate for the specific control in the right dialog. Simply include the right HM file, and all you will need to do is create the right ALIAS mappings.&lt;/p&gt;  &lt;p&gt;10. The MFC calls to HtmlHelp discard error returns from the function, so there’s really no good troubleshooting to go on when debugging access to help file entries.&lt;/p&gt;  &lt;p&gt;Let me know if any of these helpful hints prove to be of use to you, or if you need any further clarification.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1650663" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/alunj/archive/tags/Programmer+Hubris/default.aspx">Programmer Hubris</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Miscellany+-+not+security/default.aspx">Miscellany - not security</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Vista/default.aspx">Windows Vista</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Alun_2700_s+code/default.aspx">Alun's code</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category></item><item><title>Weak point against Vista</title><link>http://msmvps.com/blogs/alunj/archive/2008/10/11/1650592.aspx</link><pubDate>Sun, 12 Oct 2008 00:49:06 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1650592</guid><dc:creator>Alun Jones</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/rsscomments.aspx?PostID=1650592</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/commentapi.aspx?PostID=1650592</wfw:comment><comments>http://msmvps.com/blogs/alunj/archive/2008/10/11/1650592.aspx#comments</comments><description>&lt;p&gt;First rule of demonstrative writing – lead off with an undeniable example of the point you’re trying to make.&lt;/p&gt;  &lt;p&gt;Case in point – Dan Lyons’ article in &lt;a href="http://www.newsweek.com"&gt;NewsWeek&lt;/a&gt; on “&lt;a title="A Gloomy Vista for Microsoft" href="http://www.newsweek.com/id/160064"&gt;A Gloomy Vista for Microsoft&lt;/a&gt;”, meant to be a piece defining how bad Vista is.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“Last year I was meeting with the CEO of a PC company who offered to give me a demo of his company&amp;#39;s gorgeous new top-of- the-line notebook, a machine that cost several thousand dollars and came loaded with &lt;a href="http://www.newsweek.com/related.aspx?subject=Microsoft+Windows+Vista"&gt;Windows Vista&lt;/a&gt;, the latest version of &lt;a href="http://www.newsweek.com/related.aspx?subject=Microsoft+Corporation"&gt;Microsoft&lt;/a&gt;&amp;#39;s operating system. He flipped open the laptop, pressed the power button, and … nothing. We waited. And waited. It was excruciating. He tried control-alt-delete. He tried holding down the power button. Finally he removed the battery and snapped it back into place. The machine started up—slowly—while the CEO sat there fuming.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Um, yeah, OK, that sounds bad and all, but seriously, if you’re pressing the power button on a turned-off machine and nothing’s happening, that’s hardware. And if you blame hardware faults on the operating system, well, that’s just a CEO trying to ignore the fact that his hardware system and its developers aren’t providing a totally balanced view of their work.&lt;/p&gt;  &lt;p&gt;So, let’s carry on reading. What else is a problem with Vista?&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“It was sluggish. It had trouble going to sleep and waking up. It wouldn&amp;#39;t work with some printers and accessories.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I didn’t see “sluggish”, but then again, I bought a higher spec machine than my three-year-old laptop in order to run Vista, because it’s a significant update to the OS. Many of its major features expect there to be lots of memory and a fast 3D video card.&lt;/p&gt;  &lt;p&gt;The “trouble going to sleep and waking up” part I definitely had some experience with – but then, I have those problems in XP, too: over 1MB in my machine, and XP decided it was going to turn my laptop bag into a pizza oven – to judge from the popularity of my blog post on the issue, I’m far from alone in this. Laptop manufacturers really haven’t had the best of luck in XP or Vista persuading individual devices – let alone the whole system – that it’s nighty-night time, or that it’s time to wake up when you punch the “wake-up” key. Recent updates from Lenovo made my life a little easier, but the machine will still sometimes go to sleep never to wake up again. Really irritating when I’m in the middle of working as the bus arrives at its destination and I have to press the sleep button, praying that the machine will make it through the nap. And I can guarantee to hang the system if I press the sleep button and then close the lid.&lt;/p&gt;  &lt;p&gt;And, as for printers and accessories, it’s clear that any number of device drivers weren’t actually used for any significant length of time in the Vista environment, or they’d have shown their incompatible designs. My HP printer, for instance, pops up this ugly dialog whenever I print from Internet Explorer:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/alunj.WeakpointagainstVista_5F00_114D9/Image_2D00_0216_5F00_2.png"&gt;&lt;img title="hpmup081.bin isn&amp;#39;t signed" style="border-top-width:0px;display:block;border-left-width:0px;float:none;border-bottom-width:0px;margin-left:auto;margin-right:auto;border-right-width:0px;" height="296" alt="hpmup081.bin isn&amp;#39;t signed" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/alunj.WeakpointagainstVista_5F00_114D9/Image_2D00_0216_5F00_thumb.png" width="481" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now, I don’t know much about drivers, but I suspect that this could be fixed by signing the driver. My other HP printer continually offers up a new version of its drivers on Windows Update, and then the installation refuses to start, because the printer isn’t plugged in to my machine. Well, of course not, it’s a network printer.&lt;/p&gt;  &lt;p&gt;As has been pointed out by numerous other writers, XP had this same sort of flack when it released (although I don’t remember it going on for quite this long), and then as now, most of the problems were to do with software and hardware developers who weren’t paying even limited attention to the statements Microsoft put out as to features that were deprecated (i.e. made obsolete, going away, or otherwise disappearing).&lt;/p&gt;  &lt;p&gt;Of course, my wife hates Vista, and at some point I’ll be able to point you to her ideas on the topic, because she has some actually &lt;strong&gt;&lt;u&gt;valid&lt;/u&gt;&lt;/strong&gt; arguments as to why Vista sucks. And none of those arguments are represented in Dan Lyons’ Newsweek article.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1650592" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/alunj/archive/tags/Miscellany+-+not+security/default.aspx">Miscellany - not security</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Vista/default.aspx">Windows Vista</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/What+my+wife+knows/default.aspx">What my wife knows</category></item><item><title>My MP3 player demands to administer my system</title><link>http://msmvps.com/blogs/alunj/archive/2008/08/25/1645798.aspx</link><pubDate>Tue, 26 Aug 2008 06:22:35 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1645798</guid><dc:creator>Alun Jones</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/rsscomments.aspx?PostID=1645798</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/commentapi.aspx?PostID=1645798</wfw:comment><comments>http://msmvps.com/blogs/alunj/archive/2008/08/25/1645798.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/alunj.MyMP3playerdemandstoadministermysystem_5F00_A099/Sansa_5F00_ewatchandpen_5F00_COLOR_5F00_2.jpg"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;margin:0px 25px 10px 0px;border-right-width:0px;" height="244" alt="Sansa_ewatchandpen_COLOR" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/alunj.MyMP3playerdemandstoadministermysystem_5F00_A099/Sansa_5F00_ewatchandpen_5F00_COLOR_5F00_thumb.jpg" width="244" align="left" border="0" /&gt;&lt;/a&gt; Thanks to the excellent &lt;a href="http://www.woot.com"&gt;http://www.woot.com&lt;/a&gt;, I upgraded to a new MP3 player - this one, the &lt;a href="http://www.sandisk.com/sansa/#/product-6/"&gt;Sansa e250&lt;/a&gt; from &lt;a href="http://sandisk.com"&gt;SanDisk&lt;/a&gt;, has a little screen and shows video at an almost completely unacceptably small resolution. But I don&amp;#39;t mind that, I didn&amp;#39;t really buy it for the video. I don&amp;#39;t mind the big fat &amp;quot;REFURB&amp;quot; label stuck on the back, nor do I really mind all that much that it&amp;#39;s already lost a screw from the back.&lt;/p&gt; &lt;p&gt;What I do mind is that the developers of the software accompanying this player haven&amp;#39;t figured out that I might want to use it as a consumer device, rather than an Information Technology Administration Tool. Quite honestly, I can&amp;#39;t see how a media player - even if you count its ability to do video the size of my thumb - can be used to administer my system, but clearly that&amp;#39;s the intent of the designers, because the software all insists on running as administrator.&lt;/p&gt; &lt;p&gt;The software at fault is at least the following:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Sansa Dispatcher - runs at logon, insists on running as administrator, therefore gets blocked on my Vista system. I&amp;#39;m still not quite sure what it&amp;#39;s supposed to do, because I can use the Sansa acceptably well without this tool running, and when I do run it unblocked as admin, it does nothing more useful than causing my laptop to repeatedly crash with a blue-screen of death. Not very impressive.  &lt;li&gt;Sansa Media Converter - allegedly this is required to put photos and videos onto the device - this, too, requires that I run it as an administrator (why? all it&amp;#39;s supposed to do is convert movies and graphics from one format to another, and then copy them to the USB drive that the Sansa pretends to be when plugged in)  &lt;li&gt;As if that wasn&amp;#39;t infuriating enough, the Sansa Media Converter requires Apple QuickTime, my old nemesis. Yes, that means I&amp;#39;m back on the &lt;a href="http://msmvps.com/blogs/alunj/archive/2008/05/09/1618641.aspx"&gt;Apple Update&lt;/a&gt; thrill-ride to distraction.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;It almost makes me want to wipe the firmware in the device and replace it with the Open Source software &amp;quot;&lt;a href="http://www.rockbox.org/"&gt;Rock Box&lt;/a&gt;&amp;quot;. Maybe then I can use ordinary tools to move my media onto the device, as an ordinary user.&lt;/p&gt; &lt;p&gt;We developers clearly have a loooong way to go before we grasp this concept that &amp;quot;administrator means the guy who makes changes to the configuration of the operating system&amp;quot;, and &amp;quot;standard user means the guy who spends his life actually using the operating system&amp;quot;.&lt;/p&gt; &lt;p&gt;I would love to be able to sort this out with technical support, but they insist on not talking to me in email, but requiring me to log on to a third party &amp;quot;eBox&amp;quot; from &amp;quot;customernation.com&amp;quot; - which sends out exhortations to visit your eBox as soon as Sansa&amp;#39;s support has put a message in it. These invites come with your user name and password - over unencrypted email. Nice.&lt;/p&gt; &lt;p&gt;I&amp;#39;d tell you what&amp;#39;s in my eBox, and what Sansa&amp;#39;s support said, but I haven&amp;#39;t been able to keep a connection up long enough for the painfully slow customernation.com web site to actually display anything. This is not a pleasant customer experience.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1645798" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/alunj/archive/tags/General+Security/default.aspx">General Security</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Programmer+Hubris/default.aspx">Programmer Hubris</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Vista/default.aspx">Windows Vista</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/What+my+wife+knows/default.aspx">What my wife knows</category></item><item><title>Kaminsky Black-Hat Webcast: "By Any Other Name: DNS has doomed us all."</title><link>http://msmvps.com/blogs/alunj/archive/2008/07/25/1642098.aspx</link><pubDate>Fri, 25 Jul 2008 09:03:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1642098</guid><dc:creator>Alun Jones</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/rsscomments.aspx?PostID=1642098</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/commentapi.aspx?PostID=1642098</wfw:comment><comments>http://msmvps.com/blogs/alunj/archive/2008/07/25/1642098.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/alunj/Rose1_5F00_2.png"&gt;&lt;img border="0" align="left" width="200" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/alunj/Rose1_5F00_thumb.png" alt="By any other name..." height="200" style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" /&gt;&lt;/a&gt; Okay, so the talk&amp;rsquo;s official title was &amp;ldquo;&lt;em&gt;&lt;a href="http://tinyurl.com/6hr3tw" title="View the webcast"&gt;Dan Kaminsky&amp;rsquo;s DNS Discovery: The Massive, Multi-Vendor Issue and the Massive, Multi-Vendor Fix&lt;/a&gt;&lt;/em&gt;&amp;rdquo;. &lt;/p&gt;
&lt;p&gt;Arcane details of TCP are something of a hobby of mine, so I attended the &lt;a href="http://tinyurl.com/6hr3tw"&gt;webcast&lt;/a&gt; to see what Dan had to say. &lt;/p&gt;
&lt;h3&gt;The Past is Prologue&lt;/h3&gt;
&lt;p&gt;A little history first &amp;ndash; six months ago, Dan Kaminsky found something so horrifying in the bowels of DNS that he actually kept quiet about it. He contacted DNS vendors &amp;ndash; OS manufacturers, router developers, BIND authors, and the like &amp;ndash; and brought them all together in a soundproofed room on the Microsoft campus to tell them all about what he&amp;rsquo;d discovered. &lt;/p&gt;
&lt;p&gt;Everyone was sworn to secrecy, and consensus was reached that the best way to fix the problem would be to give vendors six months to release a coordinated set of patches, and then &lt;a href="http://www.doxpara.com/"&gt;Dan Kaminsky&lt;/a&gt; would tell us all at BlackHat what he&amp;rsquo;d found. &lt;/p&gt;
&lt;p&gt;Until then, he &lt;a href="http://www.doxpara.com/?p=1162" title="An Astonishing Collaboration"&gt;asked the security community&lt;/a&gt;, don&amp;rsquo;t guess in public, and don&amp;rsquo;t release the information if you know it. &lt;/p&gt;
&lt;h3&gt;Now is the winter of our DNS content (A records and the like)&lt;/h3&gt;
&lt;p&gt;Fast forward a few months, and we have a patch. I don&amp;rsquo;t think the patch was reverse-engineered, but there was &lt;a href="http://msmvps.com/blogs/alunj/archive/2008/07/21/1641696.aspx" title="Whoops - Information Wanted to be Free Again"&gt;enough public guessing going on that someone accidentally slipped and leaked the information&lt;/a&gt; &amp;ndash; now the whole world knows. &lt;/p&gt;
&lt;p&gt;Kaminsky confirmed this in today&amp;rsquo;s &lt;a href="http://tinyurl.com/6hr3tw"&gt;webcast&lt;/a&gt;, detailing how the attack works, to forge the address of www.example.com: &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Attacker persuades victim to ask for 1.example.com &lt;/li&gt;
&lt;li&gt;Victim&amp;rsquo;s DNS server queries for an A record for 1.example.com &lt;/li&gt;
&lt;li&gt;Attacker forges a response that says &amp;ldquo;I don&amp;rsquo;t know 1.example.com, but the DNS server at www.example.com knows, and it&amp;rsquo;s at 1.2.3.4&amp;rdquo; &lt;/li&gt;
&lt;li&gt;Victim&amp;rsquo;s DNS server accepts this response, queries 1.2.3.4 for 1.example.com, and now the attacker knows that the victim can be directed to www.example.com at 1.2.3.4, allowing the attacker to steal cookies, represent as a trusted web site, etc, etc. &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Note that this is a simple description of the new behavior that Kaminsky found &amp;ndash; step 3 allows the DNS server&amp;rsquo;s cache to be poisoned with a mapping for www.example.com to 1.2.3.4, even if it was already cached from a previously successful search. &lt;/p&gt;
&lt;p&gt;If that was all that Kaminsky could do, even on an unpatched server, he&amp;rsquo;d have a 1 in 65535 chance of guessing the transaction ID to make his forgery succeed. However, old known behaviours simply make it easier for the attacker to make the forgery work: &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Because the attacker tells the victim to search for a site, the attacker controls when the race with the authoritative DNS server starts. &lt;/li&gt;
&lt;li&gt;The attacker can tell the victim to search several times, and can forge several possible responses, using the birthday paradox to be more likely to guess the transaction ID (and source port), so that his forged response is accepted. &lt;/li&gt;
&lt;li&gt;Because this attack overwrites cached entries, the attacker can try again and again (picture a site with a million 1-pixel images each causing a different DNS query) until he is successful. Stuffing the cache won&amp;rsquo;t protect you. &lt;/li&gt;
&lt;li&gt;The attacker can insert an obscenely huge TTL (time-to-live) on the faked entry, so that it remains in cache until the DNS service is flushed or restarted. &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Kaminsky&amp;rsquo;s tests indicate that a DNS server&amp;rsquo;s cache can be poisoned in this way in under ten seconds. There are metasploit plugins that &amp;lsquo;demonstrate&amp;rsquo; this&amp;nbsp; (or, as with all things metasploit, can be used to exploit systems). &lt;/p&gt;
&lt;p&gt;The patch, by randomizing the source port of the DNS resolver, raises the difficulty of this attack by a few orders of magnitude. &lt;/p&gt;
&lt;p&gt;The long-term fix, Kaminsky said, is to push for the implementation of DNSSEC, a cryptographically-signed DNS system, wherein you refuse to pass on or accept information that isn&amp;rsquo;t signed by the authoritative host. &lt;/p&gt;
&lt;h3&gt;A port, a port, my domain for a port&lt;/h3&gt;
&lt;p&gt;One novel wrinkle that Kaminsky hadn&amp;rsquo;t anticipated is that even after application of the patch to DNS servers, some NATs apparently remove the randomness in the source port that was added to make the attack harder. To quote Kaminsky &amp;ldquo;whoops, sorry Linksys&amp;rdquo; (although Cisco was one of the companies he notified of the DNS flaw, and they now own Linksys). Such de-randomising NATs essentially remove the usefulness of the patch. &lt;/p&gt;
&lt;p&gt;Patching is not completely without its flaws, however &amp;ndash; Kaminsky didn&amp;rsquo;t mention some of the issues that have been occurring because of these patches: &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;ZoneAlarm decided that DNS queries from random source ports must be a sign of attack, and denied all such queries, essentially disconnecting the Internet from users of ZoneAlarm. I guess I can learn to live with that. &lt;/li&gt;
&lt;li&gt;BIND doesn&amp;rsquo;t check when binding to a random port to see if that port is already in use &amp;ndash; as a result, when the named server sends out a DNS query, there&amp;rsquo;s a chance the response packet will come back to a service that isn&amp;rsquo;t expecting it. Because the outgoing query punches a return hole in most firewalls, this could mean that a service blocked by the firewall from receiving Internet traffic is now opened up to the Internet. The workaround is to set the avoid-udp-v4-ports configuration setting, listing any ports that named shouldn&amp;rsquo;t use. &lt;/li&gt;
&lt;li&gt;&lt;a href="http://msmvps.com/blogs/alunj/archive/2008/07/19/1641409.aspx" title="DNS Server Binds to 2500 Ports"&gt;Windows&amp;rsquo; DNS service takes a different tack&lt;/a&gt;, binding to 2500 (the number is configurable) random ports on startup. As with BIND, these ports might conflict with other services; different from BIND, however, is the behavior &amp;ndash; since the ports are already bound by the DNS server, those other services (starting later than DNS, because most IP components require it) are now unable to bind to that port. As with BIND, the workaround is to tell the DNS server which ports not to use. The registry entry &lt;a href="http://support.microsoft.com/kb/812873" title="Microsoft&amp;#39;s KB on reserving UDP ports"&gt;ReservedPorts&lt;/a&gt; will do this. &lt;/li&gt;
&lt;li&gt;Users are being advised to point their DNS server entries to OpenDNS. Single point of failure, anyone? &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Metrics and statistics: &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;When Kaminsky&amp;rsquo;s &lt;a href="http://www.doxpara.com/" title="Click &amp;quot;Check my DNS&amp;quot;"&gt;vulnerability detection tool&lt;/a&gt; was first made available at doxpara.com, 80+% of all checks indicated that the DNS server was vulnerable. This last week, 52% of all checks showed vulnerable servers. Patches are getting installed. &lt;/li&gt;
&lt;li&gt;The attack is noisy &amp;ndash; output from the metasploit framework showed &amp;ldquo;poisoning successful after 13250 attempts&amp;rdquo; &amp;ndash; that&amp;rsquo;s thirteen thousand DNS queries and 260,000 forged DNS responses. IDS and IPS tools should have signatures for this attack, and may be able to repel boarders. &lt;/li&gt;
&lt;li&gt;Metasploit exploits for this are at &lt;a href="http://www.caughq.org/exploits/CAU-EX-2008-0003.txt"&gt;http://www.caughq.org/exploits/CAU-EX-2008-0003.txt&lt;/a&gt; if you want to research it further. &lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Tomorrow, and tomorrow, and tomorrow...&lt;/h3&gt;
&lt;p&gt;The overall message of the webcast is this: &lt;/p&gt;
&lt;p&gt;This attack is real, and traditional defences of using a high TTL will not protect you. Patching is the way to go. If you can&amp;rsquo;t patch, configure those unpatched DNS servers to forward to a local new (patched) DNS server, or an external patched server like OpenDNS. Scan your site for unexpected DNS servers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1642098" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/alunj/archive/tags/General+Security/default.aspx">General Security</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Vista/default.aspx">Windows Vista</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/TCP_2F00_IP/default.aspx">TCP/IP</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category></item><item><title>Whoops - Information Wanted to be Free Again.</title><link>http://msmvps.com/blogs/alunj/archive/2008/07/21/1641696.aspx</link><pubDate>Tue, 22 Jul 2008 05:09:51 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1641696</guid><dc:creator>Alun Jones</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/rsscomments.aspx?PostID=1641696</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/commentapi.aspx?PostID=1641696</wfw:comment><comments>http://msmvps.com/blogs/alunj/archive/2008/07/21/1641696.aspx#comments</comments><description>&lt;p&gt;&lt;/p&gt; &lt;p&gt;Picture the scene at Security Blogs R Us:&lt;/p&gt; &lt;p&gt;&amp;quot;We&amp;#39;re so freakin&amp;#39; clever, we&amp;#39;ve figured out Dan Kaminsky&amp;#39;s DNS vulnerability&amp;quot;&lt;/p&gt; &lt;p&gt;&amp;quot;Yeah, but what if someone else figures it out - won&amp;#39;t we look stupid if we post second to them?&amp;quot;&lt;/p&gt; &lt;p&gt;&amp;quot;You&amp;#39;re right - but we gave Dan our word we wouldn&amp;#39;t publish.&amp;quot;&lt;/p&gt; &lt;p&gt;&amp;quot;So we won&amp;#39;t publish, but we&amp;#39;ll have a blog article ready to go if someone else spills the beans, so that we can prove that we knew all about it anyway.&amp;quot;&lt;/p&gt; &lt;p&gt;&amp;quot;Yeah, but we&amp;#39;d better be careful not to publish it accidentally.&amp;quot;&lt;/p&gt; &lt;p&gt;&amp;gt;&amp;gt;WHOOP, WHOOP, WHOOP&amp;lt;&amp;lt;&lt;/p&gt; &lt;p&gt;&amp;quot;What was that?&amp;quot;&lt;/p&gt; &lt;p&gt;&amp;quot;The blog alert - someone else is beating us to the punch as we speak.&amp;quot;&lt;/p&gt; &lt;p&gt;&amp;quot;Publish or perish! Damn the torpedoes - false beard ahead!&amp;quot;&lt;/p&gt; &lt;p&gt;&amp;quot;What? Are you downloading those dodgy foreign-dubbed pirated anime series off BitTorrent through the company network again?&amp;quot;&lt;/p&gt; &lt;p&gt;&amp;quot;Yes - I found a way around your filters.&amp;quot;&lt;/p&gt; &lt;p&gt;&amp;quot;Good man.&amp;quot;&lt;/p&gt; &lt;hr /&gt;  &lt;p&gt;It&amp;#39;s true (okay, except for all of the made-up dialog above), a blog at one of the security vulnerability research crews (ahem, Matasano) did the unthinkable and rushed a blog entry out on the basis that they thought someone else (ahem, Halvar Flake) was beating them to it. And now we all know. The genie is out of the bag, the cat has been spilled, and the beans are out of the bottle.&lt;/p&gt; &lt;p&gt;Now we all know how to spoof DNS.&lt;/p&gt; &lt;p&gt;Okay, so Matasano pulled the blog pretty quickly, but by then it had already been copied to server upon server, and some of those copies are held by people who don&amp;#39;t want to take the information off the Internet.&lt;/p&gt; &lt;p&gt;Clearly, Information Wants To Be Free.&lt;/p&gt; &lt;hr /&gt;   &lt;p&gt;There&amp;#39;s an expression I never quite got the hang of - &amp;quot;Information Wants To Be Free&amp;quot;, cry the free software guys (who believe that software is information, rather than expression, which is a different argument entirely) - and the sole argument they have for this is that once information is freed, it&amp;#39;s impossible to unfree it. A secret once told is no longer a secret.&lt;/p&gt; &lt;p&gt;There&amp;#39;s an allusion to the way in which liquid &amp;#39;wants to be at its lowest level&amp;#39; (unless it&amp;#39;s liquid helium, which tends to climb up the sides of the beaker when you&amp;#39;re not looking), in that if you can&amp;#39;t easily put something back to where it used to be, then where it used to be is not where it wants to be.&lt;/p&gt; &lt;p&gt;So, information wants to be free, and Richard Stallmann&amp;#39;s bicycle tyre wants to have a puncture.&lt;/p&gt; &lt;p&gt; &lt;hr /&gt;  But back to the DNS issue.&lt;/p&gt; &lt;p&gt;I can immediately think of only one extra piece of advice I&amp;#39;d have given to the teams patching this on top of what I said in my previous blog, and that&amp;#39;s something that, in testing, I find the Windows Server 2003 DNS server was doing anyway.&lt;/p&gt; &lt;p&gt;So, that&amp;#39;s alright then.&lt;/p&gt; &lt;p&gt;Well, not entirely - I do have some minor misgivings that I hope I&amp;#39;ve raised to the right people.&lt;/p&gt; &lt;p&gt;But in answer to something that was asked on the newsgroups, no I don&amp;#39;t think you should hold off patching - the patch has some manual elements to it, in that you have to make sure the DNS server doesn&amp;#39;t impinge on your existing UDP services (and most of you won&amp;#39;t have that many), but patching is really a whole lot better than the situation you could find yourself in if you don&amp;#39;t patch.&lt;/p&gt; &lt;p&gt;And Dan, if you&amp;#39;re reading this - hi - great job in getting the big players to all work together, and quite frankly, the secrecy lasted longer than I expected it to. Good job, and thanks for trying to let us all get ourselves patched before your moment of glory at BlackHat.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1641696" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/alunj/archive/tags/General+Security/default.aspx">General Security</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Vista/default.aspx">Windows Vista</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/TCP_2F00_IP/default.aspx">TCP/IP</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category></item><item><title>DNS Server Reserves 2500 Ports.</title><link>http://msmvps.com/blogs/alunj/archive/2008/07/19/1641409.aspx</link><pubDate>Sat, 19 Jul 2008 07:02:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1641409</guid><dc:creator>Alun Jones</dc:creator><slash:comments>14</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/rsscomments.aspx?PostID=1641409</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/commentapi.aspx?PostID=1641409</wfw:comment><comments>http://msmvps.com/blogs/alunj/archive/2008/07/19/1641409.aspx#comments</comments><description>&lt;p&gt;After applying the patch for &lt;a href="http://www.microsoft.com/technet/security/bulletin/ms08-037.mspx" title="Microsoft Security Bulletin MS08-037 - Important: Vulnerabilities in DNS Could Allow Spoofing (953230)"&gt;MS08-037&lt;/a&gt; - &lt;a href="http://support.microsoft.com/default.aspx/kb/953230" title="MS08-037: Vulnerabilities in DNS could allow spoofing"&gt;KB 953230&lt;/a&gt; (the multi-OS DNS flaw found by &lt;a href="http://www.doxpara.com/" title="DoxPara Research - Dan Kaminsky&amp;#39;s blog."&gt;Dan Kaminski&lt;/a&gt;), you may notice your Windows Server 2003 machine gets a little greedy. At least, mine sucks up 2500 - yes, that&amp;#39;s two thousand five hundred - UDP sockets sitting there apparently waiting for incoming packets.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/alunj/Image_2D00_0219_5F00_2.png"&gt;&lt;img border="0" width="515" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/alunj/Image_2D00_0219_5F00_thumb.png" alt="Output of &amp;#39;netstat -bona -p udp&amp;#39; command, showing ports bound by DNS.EXE" height="436" style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is, apparently, one of those behaviours sure to be listed in the knowledge base as &amp;quot;this behavior is by design&amp;quot; - a description that graces some of the more entertaining elements of the Microsoft KB.&lt;/p&gt;
&lt;p&gt;Why does this happen? I can only guess. But here&amp;#39;s my best guess.&lt;/p&gt;
&lt;p&gt;The fix to DNS, implemented across multiple platforms, was to decrease the chance of an attacker faking a DNS response, by increasing the randomness in the DNS requests that has to be copied back in a response.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know how this was implemented on other platforms, but I do know that it&amp;#39;s already been reported that BIND&amp;#39;s implementation is slower than it used to be (hardly a surprise, making random numbers is always slower than simply counting up) - and maybe that&amp;#39;s what Microsoft tried to forestall in the way that they create the random sockets.&lt;/p&gt;
&lt;p&gt;Instead of creating a socket and binding it to a random source port at the time of the request, Microsoft&amp;#39;s patched DNS creates 2500 sockets, each bound to a random source port, at the time that the DNS service is started up. This way, perhaps they&amp;#39;re avoiding the performance hit that BIND has been criticised for.&lt;/p&gt;
&lt;p&gt;There are, of course, other services that also use a UDP port. ActiveSync&amp;#39;s connection to Exchange, IPsec, IAS, etc, etc. Are they affected?&lt;/p&gt;
&lt;p&gt;Sometimes.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.technet.com/sbs/archive/2008/07/17/some-services-may-fail-to-start-or-may-not-work-properly-after-installing-ms08-037-951746-and-951748.aspx" title="SBS Blog: Some Services May Fail to Start or May Not Work Properly After Installing MS08-037 (951746 and 951748)"&gt;Randomly, and without warning or predictability&lt;/a&gt;. Because hey, the DNS server is picking ports randomly and unpredictably.&lt;/p&gt;
&lt;p&gt;[&lt;strong&gt;Workaround&lt;/strong&gt;: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\ReservedPorts is a registry setting that lists multiple port ranges that will not be used when binding an ephemeral socket. The DNS server will obey these reservations, and not bind a socket to ports specified in this list. More explanation in the blog linked above, or at &lt;a href="http://support.microsoft.com/kb/812873"&gt;http://support.microsoft.com/kb/812873&lt;/a&gt;]&lt;/p&gt;
&lt;p&gt;DNS, you see, is a fundamental underpinning of TCP/IP services, and as such needs to start up before most other TCP/IP based services. So if it picks the port you want, it gets first pick, and it holds onto that port, preventing your application from binding to it.&lt;/p&gt;
&lt;p&gt;This just doesn&amp;#39;t seem like a fix written by someone who &amp;#39;gets&amp;#39; TCP/IP. Perhaps I&amp;#39;m missing something that explains why the DNS server in Windows Server 2003 works this way, but I would be inclined to take the performance hit of binding and rebinding in order to find an unused random port number, rather than binding before everyone else in an attempt to pre-empt other applications&amp;#39; need for a port.&lt;/p&gt;
&lt;p&gt;There are a couple of reasons I say this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Seriously, how many Windows Server 2003 users out there have such a high-capacity DNS server that they will notice the performance hit?&lt;/li&gt;
&lt;li&gt;Most Windows Server 2003-based DNS servers are small caching servers for businesses, rather than Internet infrastructure servers responsible for huge numbers of requests per second - even if you implement this port-stealing method, it shouldn&amp;#39;t be the default, because the majority of users just don&amp;#39;t need that performance.&lt;/li&gt;
&lt;li&gt;If you do need the performance, get another server to handle incoming requests. Because the cost of having your DNS server&amp;#39;s cache poisoned is considerably greater than the cost of increasing the number of servers in your pool, if you&amp;#39;re providing major DNS service to that many customers.&lt;/li&gt;
&lt;li&gt;A major DNS service provider will be running fewer services that would pre-empt a DNS server request to bind to a random port, whereas systems running several UDP-based services are going to need less performance on their outgoing DNS requests.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I&amp;#39;d love to know if I&amp;#39;m missing something here, but I really hope that Microsoft produces a new version of the DNS patch soon, that doesn&amp;#39;t fill your netstat -a output with so many bound and idle sockets, each of which takes up a small piece of nonpaged pool memory (that means real memory, not virtual memory).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1641409" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/alunj/archive/tags/General+Security/default.aspx">General Security</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Vista/default.aspx">Windows Vista</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/TCP_2F00_IP/default.aspx">TCP/IP</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category></item><item><title>Vistafy Me.</title><link>http://msmvps.com/blogs/alunj/archive/2008/07/10/1640321.aspx</link><pubDate>Fri, 11 Jul 2008 05:07:25 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1640321</guid><dc:creator>Alun Jones</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/rsscomments.aspx?PostID=1640321</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/commentapi.aspx?PostID=1640321</wfw:comment><comments>http://msmvps.com/blogs/alunj/archive/2008/07/10/1640321.aspx#comments</comments><description>&lt;p&gt;I have a little time over the next couple of weeks to devote to developing &lt;a title="WFTPD by Texas Imperial Software" href="http://www.wftpd.com/"&gt;WFTPD&lt;/a&gt; a little further.&lt;/p&gt; &lt;p&gt;This is a good thing, as it&amp;#39;s way past time that I brought it into Vista&amp;#39;s world.&lt;/p&gt; &lt;p&gt;I&amp;#39;ve been very proud that over the last several years, I have never had to re-write my code in order to make it work on a new version of Windows. Unlike other developers, when a new version of Windows comes along, I can run my software on that new version without changes, and get the same functionality.&lt;/p&gt; &lt;p&gt;The same is not true of developers who like to use undocumented features, because those are generally the features that die in new releases and service packs. After all, since they&amp;#39;re undocumented, nobody should be using them, right? No, seriously, you shouldn&amp;#39;t be using those undocumented features.&lt;/p&gt; &lt;p&gt;So, &lt;a title="WFTPD by Texas Imperial Software" href="http://www.wftpd.com/wftpdreg.htm"&gt;WFTPD&lt;/a&gt; and &lt;a href="http://www.wftpd.com/wftpdpro.htm"&gt;WFTPD Pro&lt;/a&gt; run in Windows Vista and Windows Server 2008.&lt;/p&gt; &lt;p&gt;But that&amp;#39;s not enough. With each new version of Windows, there are better ways of doing things and new features to exploit. With Windows Vista and Windows Server 2008, there are also a few deprecated older behaviours that I can see are holding WFTPD and WFTPD Pro down.&lt;/p&gt; &lt;p&gt;I&amp;#39;m creating a plan to &amp;quot;Vistafy&amp;quot; these programs, so that they&amp;#39;ll continue to be relevant and current.&lt;/p&gt; &lt;p&gt;Here&amp;#39;s my list of significant changes to make over the next couple of weeks:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Convert the Help file from WinHelp to HTML Help. &lt;/li&gt; &lt;ul&gt; &lt;li&gt;WinHelp is not supported in Vista - you can download a WinHelp version, but it&amp;#39;s far better to support the one format of Help file that Windows uses. So, I&amp;#39;m converting from WinHelp to HTML Help.&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;Changing the Control Panel Applet for WFTPD Pro.&lt;/li&gt; &lt;ul&gt; &lt;li&gt;CPL files still work in Windows Vista, but they&amp;#39;re considered &amp;#39;old&amp;#39;, and there&amp;#39;s an ugly user experience when it comes to making them elevate - run as administrator. &lt;li&gt;There are two or three ways to go here -&lt;/li&gt; &lt;ol&gt; &lt;li&gt;one is to create an EXE wrapper that calls the old CPL file. That&amp;#39;s fairly cheap, and will probably be the first version. &lt;li&gt;Another is to write an MMC plugin. That&amp;#39;s a fair amount of work, and requires some thought and design. That&amp;#39;s going to take more than a couple of weeks. &lt;li&gt;A third option is to create some form of web-based interface. I don&amp;#39;t want to go that way, because I don&amp;#39;t want to require my users to install IIS or some other web server.&lt;/li&gt;&lt;/ol&gt; &lt;li&gt;So, first blush it seems will be to wrap the existing interface, and secondly I&amp;#39;ll be investigating what an MMC should look like.&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;Support for IPv6.&lt;/li&gt; &lt;ul&gt; &lt;li&gt;I already have this implemented in a trial version, but have yet to fully wire it up to a user interface that I&amp;#39;m willing to unleash on the world. So that&amp;#39;s on the cards for the next release.&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;Multiple languages&lt;/li&gt; &lt;ul&gt; &lt;li&gt;There are two elements to support for multiple languages in FTP:&lt;/li&gt; &lt;ol&gt; &lt;li&gt;File names in non-Latin character sets &lt;li&gt;Text messages in languages other than English&lt;/li&gt;&lt;/ol&gt; &lt;li&gt;The first, file names in different character sets, will be achieved sooner than the second. If the second ever occurs, it will be because customers are sufficiently interested to ask me specifically to do it.&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;SSL Client Certificate authentication&lt;/li&gt; &lt;ul&gt; &lt;li&gt;SSL Client Certificate Auth has been in place for years - it&amp;#39;s a secret feature. The IIS guys warned me off developing it, saying &amp;quot;that&amp;#39;s really hard, don&amp;#39;t try and do anything with client certs&amp;quot;. &lt;li&gt;I didn&amp;#39;t have the heart to tell them I had the feature working already (but without an interface), and that it simply required a little patience.&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;Install under Local Service and Network Service accounts &lt;li&gt;Build in Visual Studio 2008, to get maximum protection using new compiler features.&lt;/li&gt; &lt;ul&gt; &lt;li&gt;/analyze, Address Space Layout Randomisation, SAL - all designed to catch my occasional mistakes.&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt; &lt;p&gt;As I work on each of these items, I&amp;#39;ll be sure to document any interesting behaviours I find along the way. My first article will be on converting your WinHelp-using MFC project to using HTML Help, with minimal changes to your code, and in such a way that you can back-pedal if you have to.&lt;/p&gt; &lt;p&gt;Of course, I also have a couple of side projects - because I&amp;#39;ve been downloading a lot from BBC 7, I&amp;#39;ve been writing a program to store the program titles and descriptions with the MP3 files, so that they show up properly on the MP3 player. ID3Edit - an inspired name - allows me to add descriptions to these files.&lt;/p&gt; &lt;p&gt;Another side-project of mine is an EFS tool. I may use some time to work on that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1640321" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/alunj/archive/tags/FTP/default.aspx">FTP</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Vista/default.aspx">Windows Vista</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/What+my+wife+knows/default.aspx">What my wife knows</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Alun_2700_s+code/default.aspx">Alun's code</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category></item><item><title>The difference between liking and hating UAC?</title><link>http://msmvps.com/blogs/alunj/archive/2008/06/10/1633852.aspx</link><pubDate>Wed, 11 Jun 2008 04:17:51 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1633852</guid><dc:creator>Alun Jones</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/rsscomments.aspx?PostID=1633852</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/commentapi.aspx?PostID=1633852</wfw:comment><comments>http://msmvps.com/blogs/alunj/archive/2008/06/10/1633852.aspx#comments</comments><description>&lt;p&gt;&lt;/p&gt; &lt;p&gt;Totally unscientifically, I have carried out a poll of people who like UAC (okay, a few security geeks like myself), and those who hate UAC - mostly my wife.&lt;/p&gt; &lt;p&gt;Something struck me as both a surprising common factor, and also a rather obvious explanation of why the two opinions are so polarised.&lt;/p&gt; &lt;p&gt;[Note for the pedants - yes, I&amp;#39;m using the term &amp;quot;UAC&amp;quot; here to mean &amp;quot;Elevation&amp;quot; - there are other portions of UAC that I&amp;#39;m not discussing, such as Protected Mode in Internet Explorer, and so on.]&lt;/p&gt; &lt;h3&gt;We use UAC for different purposes&lt;/h3&gt; &lt;h4&gt;UAC-lovers&lt;/h4&gt; &lt;p&gt;The UAC-lover seems to have &amp;#39;got least-privilege religion&amp;#39; at least several years ago, and runs most of the time as a standard, restricted user. Most UAC-lovers do not seem to be &amp;quot;Administering the system all the time&amp;quot; types.&lt;/p&gt; &lt;p&gt;As a result, they use UAC as a means to elevate privilege on those occasions when they need to do something administrative, or when they need to run a program that has not yet been coded to run with least privilege.&lt;/p&gt; &lt;p&gt;When they&amp;#39;re doing something administrative, they&amp;#39;re comparing the UAC &amp;quot;Over-the-shoulder&amp;quot; (OTS) prompt against the methods that used to be available to them:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Log off and back on - to do this, you have to close out all your applications, saving the documents you were working on, log off, log on as the administrator account, do the admin thing, log off, and log back on as your regular account.  &lt;li&gt;Fast User Switching (FUS) - not available on a domain, and anything &lt;u&gt;but&lt;/u&gt; fast. The only advantage it has over logging out and back in is that you maintain your application state in the restricted user - the documents are still open, the programs are still running, etc.  &lt;li&gt;RunAs - this used to be how you elevate in Windows prior to Vista, but now you have to find another tool to do the same job for you, because RunAs won&amp;#39;t elevate your session even if you provide it with administrator credentials. [I use Jesper&amp;#39;s Elevate Explorer Tools from the Windows Server 2008 Security Resource Kit.]&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Given these as alternatives, it&amp;#39;s no wonder that UAC and OTS elevation prompts are considered better.&lt;/p&gt; &lt;h4&gt;UAC-haters&lt;/h4&gt; &lt;p&gt;The UAC-hater is fundamentally disinterested in least-privilege, at least as it applies to users. Least-privilege is an obvious and good programming strategy, a program shouldn&amp;#39;t ask for more privileges than it needs, but to this user, that&amp;#39;s something that the programmers should care about.&lt;/p&gt; &lt;p&gt;This user wants to be instantly, and automatically, elevated whenever she calls on a feature that would require it. This is how she&amp;#39;s used to running the computer, because she&amp;#39;s always called on to do administrative tasks - and she&amp;#39;s careful and knowledgeable enough to have avoided causing damage through doing so.&lt;/p&gt; &lt;p&gt;To this user, UAC is an impediment to that process - now, instead of merely running the administrative tool she wants, she has to ask to be allowed to run it as administrator.&lt;/p&gt; &lt;p&gt;With UAC set to automatically elevate for administrators, however, she&amp;#39;s far happier. Still not perfectly happy, because there are still occasions when she has to ask specifically to run elevated - when the program is capable of running as non-administrator, for instance. Such programs run as non-administrator by default, and don&amp;#39;t elevate themselves. These programs are irritating to such a user.&lt;/p&gt; &lt;p&gt;Typically, such programs appear to break when run with UAC disabled (or set to automatically elevate) - they fail to run, sometimes with bizarre error messages, often just crashing through failure to execute some action that the developers expected would succeed.&lt;/p&gt; &lt;p&gt;Other causes of breakage could be when an application is registered to a user, and the licence information is written to a file in the Program Files folder - when you&amp;#39;re running under UAC&amp;#39;s protection, files in the Program Files folder may be virtualised (i.e. the program thinks it&amp;#39;s accessing the file in the Program Files folder, but it&amp;#39;s really accessing a file in the user&amp;#39;s home directory tree), and when you&amp;#39;re running elevated, those same file accesses are not virtualised.&lt;/p&gt; &lt;p&gt;So, voila, instant loss of licence information, saved settings, or any number of other files that the program expected to find in Program Files.&lt;/p&gt; &lt;h3&gt;&lt;/h3&gt; &lt;h3&gt;What can we learn from this?&lt;/h3&gt; &lt;p&gt;So, the message is clear - for installations with administrators who like the system to let them be administrators, don&amp;#39;t disable UAC, make UAC elevate silently for administrators instead.&lt;/p&gt; &lt;p&gt;This system works, too, for the restricted users. It allows them to operate as restricted users, except when they absolutely know they need to elevate. Over-the-shoulder elevation prompting is still available for them, should they need it.&lt;/p&gt; &lt;h3&gt;What still needs to be fixed?&lt;/h3&gt; &lt;p&gt;What this option doesn&amp;#39;t do is cover what appears to be Microsoft&amp;#39;s reason for creating the elevation prompts in the first place. Without UAC prompting at random points, the administrators in control of a system have no clear sign that they&amp;#39;ve just fired up &amp;quot;Mary Kate and Ashley&amp;#39;s Dance Party of the Century&amp;quot; only to be forced to run it as an administrator.&lt;/p&gt; &lt;p&gt;Even supposing you figure out that there&amp;#39;s a program you&amp;#39;re using which doesn&amp;#39;t adequately run in restricted user mode, or which doesn&amp;#39;t elevate itself where necessary, where can you go to get assistance from the developers of the application?&lt;/p&gt; &lt;p&gt;Call support?&lt;/p&gt; &lt;p&gt;Microsoft&amp;#39;s own support is an example of how off-putting such a process can be. Microsoft Money refused to update on one of our systems, and I eventually determined it was because the update needed to be elevated, but was expecting to find some files that were virtualised by UAC. It failed with a meaningless error message. To call support costs $25 for Microsoft to even pick up the phone - and if the support tech believes that this is an &amp;quot;advanced&amp;quot; issue, he may charge about ten times that much. Perhaps later, after they realise the problem is their own fault, Microsoft will refund you the money - but many small businesses and individual users don&amp;#39;t have that sort of money to loan to Microsoft, or other vendors.&lt;/p&gt; &lt;p&gt;So, is there any good way to persuade developers to quit their bone-headed &amp;quot;start with most privilege&amp;quot; behaviour? Maybe Visual Studio and compilation tools should refuse to run in an administrator session. Okay, so perhaps that&amp;#39;s not tenable, because there are development projects that do require you to be an administrator, because you&amp;#39;re developing something administrative - but what measure would make developers do the right thing for security (and for their users) naturally?&lt;/p&gt; &lt;p&gt;File and registry virtualisation appears to be a messy kludge on top of the sledge-hammer of UAC elevation, whose primary design goal appears to be to irritate end-users enough to persuade developers to stop doing the kind of things that requires virtualisation as a workaround, and the kind of things that requires administrator accounts in the first place.&lt;/p&gt; &lt;p&gt;Perhaps it&amp;#39;s time that, instead of kludging for these bad developers, Microsoft simply said &amp;quot;It stops. Now.&amp;quot; - if it&amp;#39;s not registered (at install time, or by manifest) as an administration tool, it doesn&amp;#39;t get administrative access - or virtualised access to HKLM or Program Files. Yes, that will mean admins will have two links to regedit, and similar tools - one to run in an administrator&amp;#39;s session, giving access to HKLM, another to run in their user&amp;#39;s session, giving access to HKCU.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1633852" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/alunj/archive/tags/General+Security/default.aspx">General Security</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Vista/default.aspx">Windows Vista</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/What+my+wife+knows/default.aspx">What my wife knows</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/UAC/default.aspx">UAC</category></item><item><title>UAC - The Emperor's New Clothes</title><link>http://msmvps.com/blogs/alunj/archive/2008/04/24/1603407.aspx</link><pubDate>Thu, 24 Apr 2008 23:47:38 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1603407</guid><dc:creator>Alun Jones</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/rsscomments.aspx?PostID=1603407</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/commentapi.aspx?PostID=1603407</wfw:comment><comments>http://msmvps.com/blogs/alunj/archive/2008/04/24/1603407.aspx#comments</comments><description>&lt;p&gt;I heard a complaint the other day about UAC - User Account Control - that was new to me.&lt;/p&gt; &lt;p&gt;Let&amp;#39;s face it, as a Security MVP, I hear a lot of complaints about UAC - not least from my wife, who isn&amp;#39;t happy with the idea that she can be logged on as an administrator, but she isn&amp;#39;t really an administrator until she specifically asks to be an administrator, and then specifically approves her request to become an administrator.&lt;/p&gt; &lt;p&gt;My wife is the kind of user that UAC was not written for. She&amp;#39;s a capable administrator (our home domain has redundant DCs, DHCP servers with non-overlapping scopes, and I could go on and on), and she doesn&amp;#39;t make the sort of mistakes that UAC is supposed to protect users from.&lt;/p&gt; &lt;p&gt;My wife also does not appreciate the sense that Microsoft is using the users as a fulcrum for providing leverage to change developers to writing code for non-admin users. She doesn&amp;#39;t believe that the vendors will change as a result of this, and the only effect will be that users get annoyed.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;But not me.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;I like UAC - I think it&amp;#39;s great that developers are finally being forced to think about how their software should work in the world of least privilege. &lt;/p&gt; &lt;p&gt;So, as you can imagine, I thought I&amp;#39;d heard just about every last complaint there is about UAC. But then a new one arrived in my inbox from a friend I&amp;#39;ll call Chris.&lt;/p&gt; &lt;h3&gt;&amp;quot;Why should I pretend to be different people to use my own PC?&amp;quot;&lt;/h3&gt; &lt;p&gt;I must admit, the question stunned me.&lt;/p&gt; &lt;p&gt;Obviously, what Chris is talking about is the idea that you are strongly &amp;quot;encouraged&amp;quot; (or &amp;quot;strong-armed&amp;quot;, if you prefer) by UAC to work in (at least) two different security contexts - the first, your regular user context, and the second, your administrator context.&lt;/p&gt; &lt;p&gt;Chris has a point - you&amp;#39;re one person, you shouldn&amp;#39;t have to pretend to be two. And it&amp;#39;s your computer, it should do what you tell it to. Those two are axiomatic, and I&amp;#39;m not about to argue with them - but it sounds like I should do, if I&amp;#39;m going to answer his question while still loving UAC.&lt;/p&gt; &lt;p&gt;No, I&amp;#39;m going to argue with his basic premise that user accounts correspond to individual people. They correspond more accurately - particularly in UAC - to clothing.&lt;/p&gt; &lt;p&gt;Windows before NT, or more accurately, not based on the NT line, had no separation between user contexts / accounts. Even the logon was a joke - prompted for user name and password, but if you hit Escape instead, you&amp;#39;d be logged on anyway. Windows 9x and ME, then, were the equivalent of being naked.&lt;/p&gt; &lt;p&gt;In Windows NT, and the versions derived from it, user contexts are separated from one another by a software wall, a &amp;quot;Security Boundary&amp;quot;. There were a couple of different levels of user access, the most common distinctions being between a Standard (or &amp;quot;Restricted&amp;quot;) User, a Power User, and an Administrator.&lt;/p&gt; &lt;p&gt;Most people want to be the Administrator. That&amp;#39;s the account with all the power, after all. And if they don&amp;#39;t want to be the Administrator, they&amp;#39;d like to be at least &lt;u&gt;an&lt;/u&gt; administrator. There&amp;#39;s not really much difference between the two, but there&amp;#39;s a lot of difference between them and a Standard User.&lt;/p&gt; &lt;p&gt;Standard Users can&amp;#39;t set the clock back, they can&amp;#39;t clear logs out, they can&amp;#39;t do any number of things that might erase their tracks. Standard Users can&amp;#39;t install software for everyone on the system, they can&amp;#39;t update the operating system or its global settings, and they can&amp;#39;t run the Thomas the Tank Engine Print Studio. [One of those is a problem that needs fixing.]&lt;/p&gt; &lt;p&gt;So, really, a Standard User is much like the driver of a car, and an administrator is rather like the mechanic. I&amp;#39;ve often appealed to a different meme, and suggested that the administrator privilege should be called &amp;quot;janitor&amp;quot;, so as to make it less appealing - it really is all about being given the keys to the boiler room and the trash compactor.&lt;/p&gt; &lt;h3&gt;It&amp;#39;s about wearing dungarees rather than your business suit.&lt;/h3&gt; &lt;p&gt;You wear dungarees when working on the engine of your car, partly because you don&amp;#39;t want oil drops on your white shirt, but also partly so your tie doesn&amp;#39;t get wrapped around the spinning transmission and throttle you. You don&amp;#39;t wear the dungarees to work partly because you&amp;#39;d lose respect for the way you look, but also because you don&amp;#39;t want to spread that oil and grease around the office.&lt;/p&gt; &lt;p&gt;It&amp;#39;s not about pretending to be different people, it&amp;#39;s about wearing clothes suited to the task. An administrator account gives you carte blanche to mess with the system, and should only be used when you&amp;#39;re messing with the system (and under the assumption that you know what you&amp;#39;re doing!); a Standard User account prevents you from doing a lot of things, but the things you&amp;#39;re prevented from doing are basically those things that most users don&amp;#39;t actually have any need to do.&lt;/p&gt; &lt;p&gt;You&amp;#39;re not pretending to be a different person, you&amp;#39;re pretending to be a system administrator, rather than a user. Just like when I pretend to be a mechanic or a gardener, I put on my scungy jeans and stained and torn shirts, and when I pretend to be an employee, I dress a little smarter than that.  &lt;p&gt;When you&amp;#39;re acting as a user, you should have user privileges, and when you&amp;#39;re acting as an administrator, you should have administrative privileges. We&amp;#39;ve gotten so used to wearing our dungarees to the board-room that we think they&amp;#39;re a business suit.  &lt;p&gt;So while UAC prompts to provide a user account aren&amp;#39;t right for my wife (she&amp;#39;s in &amp;#39;dungarees-mode&amp;#39; when it comes to computers), for most users, they&amp;#39;re a way to remind you that you&amp;#39;re about to enter the janitor&amp;#39;s secret domain.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1603407" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/alunj/archive/tags/General+Security/default.aspx">General Security</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Things+I+Learned+At+Microsoft/default.aspx">Things I Learned At Microsoft</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Vista/default.aspx">Windows Vista</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/What+my+wife+knows/default.aspx">What my wife knows</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category></item><item><title>CS-RCS Pro on Vista</title><link>http://msmvps.com/blogs/alunj/archive/2008/02/26/1525222.aspx</link><pubDate>Tue, 26 Feb 2008 19:55:06 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1525222</guid><dc:creator>Alun Jones</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/rsscomments.aspx?PostID=1525222</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/commentapi.aspx?PostID=1525222</wfw:comment><comments>http://msmvps.com/blogs/alunj/archive/2008/02/26/1525222.aspx#comments</comments><description>&lt;p&gt;I&amp;#39;ve been trying back and forth to get &lt;a href="http://www.componentsoftware.com"&gt;CS-RCS Pro&lt;/a&gt;, a version control suite, to work on Windows Vista.&lt;/p&gt; &lt;p&gt;I like CS-RCS Pro for a number of reasons:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Files stored in CS-RCS Pro are kept in a simple format, open and well-documented. As a result, if I ever have to move away from CS-RCS Pro (say, for instance, if they go out of business, or stop supporting it), I stand a good chance of reconstructing my versioning information completely in whatever product I move to, if only by re-creating files at each epoch and then checking them in to the new tool.  &lt;li&gt;CS-RCS Pro integrates with Visual Studio. I can check files in and out while I&amp;#39;m editing them.  &lt;li&gt;CS-RCS Pro integrates with Explorer, as a Shell Extension, so that you can right-click on source files, and check them in from there.  &lt;li&gt;Of course, most important is that for single users, it&amp;#39;s free.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;But that last point is the cause of a big problem.&lt;/p&gt; &lt;p&gt;Here&amp;#39;s the sequence I have to deal with:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;I have the single-user version of CS-RCS Pro.  &lt;li&gt;I use best practices for development of secure applications, particularly as regards running my software &lt;u&gt;and&lt;/u&gt; my development tools as a restricted user unless it is strictly necessary to become an admin to test admin-level features, or to install / uninstall software or services, or to debug code that is running a different user context from my own.  &lt;li&gt;CS-RCS Pro insists that the user who installs it is also the user who runs it.  &lt;li&gt;CS-RCS Pro must be installed by an administrator.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;I had originally intended to follow the appropriate installation practice for an enterprise application - that it should be installed by a recognised administrator, and then any post-install setup to customise for the end-user would be carried out by that end-user for themselves.&lt;/p&gt; &lt;p&gt;This didn&amp;#39;t work, as CS-RCS Pro configured the version control tree to be used by the administrative user, making it impossible for my restricted user to access the files.&lt;/p&gt; &lt;p&gt;I tried simply editing the ownerships and ACLs - that didn&amp;#39;t work - and then to additionally edit the configuration files, where it mentioned the name of my administrative user. That worked for a short while, but I noticed that every time I used MSTSC - Remote Console - also known as the Terminal Services Client - to access the system, the shell extension that CS-RCS Pro installs took up 100% CPU, and required that I restart Explorer. There are still a few applications that don&amp;#39;t work well when you kill Explorer from underneath them, and so this was somewhat of an untenable position.&lt;/p&gt; &lt;p&gt;Besides, this was an awful lot of effort to go through in order to get version control going.&lt;/p&gt; &lt;p&gt;Finally, it hit me how I should do this properly. It&amp;#39;s not clean and it&amp;#39;s not clever, and ComponentSoftware, the folks behind CS-RCS Pro, should consider how to change their installer to avoid this issue.&lt;/p&gt; &lt;p&gt;The simple five-step process is as follows - let&amp;#39;s say Wayne, an administrator, wants to install the software for Sharon, a restricted user:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Wayne adds Sharon to the Local Administrators group on the machine to which Wayne will be installing CS-RCS Pro.  &lt;li&gt;Wayne logs on as Sharon (*)  &lt;li&gt;Wayne installs the application.  &lt;li&gt;Wayne logs off Sharon&amp;#39;s account.  &lt;li&gt;Wayne removes Sharon from the Local Administrators group.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;(*) Note that asterisk - that&amp;#39;s the troubling part. Actually, step 1 is troubling too, but only because Sharon may have other processes trying to log in with elevated rights, should they ever be granted.&lt;/p&gt; &lt;p&gt;Step 2 requires either that Wayne allows his user, restricted though she is meant to be, to log on as an administrator - what if she quickly runs some tool that you don&amp;#39;t want her to run?&lt;/p&gt; &lt;p&gt;Okay, so you drag her away from the console immediately after she types her password - but what if she&amp;#39;s got startup items to add an administrative user on her behalf, or simply to stay in memory (as a service, say) and run with those enhanced privileges, to allow exploit later?&lt;/p&gt; &lt;p&gt;Alright, so what&amp;#39;s the safest way? The only good way I can think of is this:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Wayne resets Sharon&amp;#39;s password.  &lt;li&gt;Wayne adds Sharon&amp;#39;s account to Local Administrators. Note that Sharon can&amp;#39;t log on at this point.  &lt;li&gt;From a command prompt in Wayne&amp;#39;s restricted user account, Wayne uses the &lt;em&gt;runas&lt;/em&gt; command to execute the installation script in Sharon&amp;#39;s new administrative context. Runas reduces, and possibly eliminates, the chance that this administrative context will have the ability to run Sharon&amp;#39;s own code (unless the installation script does so).  &lt;li&gt;Wayne removes Sharon from the Local Administrators account.  &lt;li&gt;Wayne sets Sharon&amp;#39;s account to force a password change after the next logon.  &lt;li&gt;Wayne tells Sharon her new password.  &lt;li&gt;If this is not a domain environment, Sharon must change her password back to what it used to be, so that it is possible for her to access her protected data.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Some of you are probably reading this and wondering why I bother - after all, in many environments, developers insist on running as administrator all the time, because their development tools don&amp;#39;t support anything else.&lt;/p&gt; &lt;p&gt;Well, it&amp;#39;s time your developers - and their tools - grew up. Yes, I can quote, just as any other developer can, a number of cases where administrative access is required - although many developers actually get this wrong. You can run Visual Studio 2005 as a non-administrator. You can debug your own code running in your own logon session as a non-administrator.&lt;/p&gt; &lt;p&gt;Developers are very often the only people to run some sections of the code that they build, until it reaches the hands of the users. As such, developers need to spend as much time as possible, when they run their code, working in the same kind of user context as their users will have.&lt;/p&gt; &lt;p&gt;In general, developers should follow the same principle as other administrators - their day-to-day tasks (e-mail, web browsing, and yes, development) should be done in restricted user accounts; administrative user accounts should be available, but their use should be restricted to those operations which absolutely require administrative access, and those operations should be reviewed often enough to ensure that they need administrative access. Tools and environments grow and change, and a tool which yesterday required administrative access may run tomorrow without. LogonUser, for instance, used to require complete system access - today it can be called by any user.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1525222" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/alunj/archive/tags/General+Security/default.aspx">General Security</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Programmer+Hubris/default.aspx">Programmer Hubris</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Vista/default.aspx">Windows Vista</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/UAC/default.aspx">UAC</category></item><item><title>Vista's Secret Windows Firewall hole</title><link>http://msmvps.com/blogs/alunj/archive/2008/01/24/1479415.aspx</link><pubDate>Fri, 25 Jan 2008 05:19:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1479415</guid><dc:creator>Alun Jones</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/rsscomments.aspx?PostID=1479415</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/commentapi.aspx?PostID=1479415</wfw:comment><comments>http://msmvps.com/blogs/alunj/archive/2008/01/24/1479415.aspx#comments</comments><description>&lt;p&gt;First, the good news - it&amp;#39;s not a flaw in the operation of Windows Firewall on Windows Vista. It&amp;#39;s a design feature, it makes sense, and it fits in with the principle that the firewall should keep out unsolicited traffic. It&amp;#39;s not really a hole, but I thought I&amp;#39;d grab your attention.&lt;/p&gt;
&lt;p&gt;The symptom first came up in a Usenet posting (thanks, Jesper, for bringing me in) about Vista and a third-party FTP client:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When I do a directory listing, and a PORT command is issued, and the &lt;br /&gt;server attempts to connect, it works, but at the same time a dialogue &lt;br /&gt;appears telling me it&amp;#39;s blocked, and I can keep blocking or unblock. &lt;br /&gt;I choose keep blocking but it doesn&amp;#39;t actually block it once.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Here&amp;#39;s how it looks. 
&lt;p&gt;First, if you haven&amp;#39;t got a third-party FTP client let&amp;#39;s fake it, by copying Microsoft&amp;#39;s command-line FTP client from the Windows System32 directory to another directory: 
&lt;blockquote&gt;
&lt;p&gt;C:\users\MyMe&amp;gt; copy %windir%\system32\ftp.exe&lt;br /&gt;1 file(s) copied.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The FTP client will not display prompts to you, but that&amp;#39;s a minor issue - if it upsets you, try downloading a third-party client and trying it. 
&lt;p&gt;Anyway, here we go - let&amp;#39;s try the issue in question: 
&lt;ul&gt;
&lt;li&gt;Type &lt;strong&gt;ftp ftp.microsoft.com&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;After you see the &amp;quot;220&amp;quot; greeting message, enter &lt;strong&gt;ftp&lt;/strong&gt; as the user - press enter.&lt;/li&gt;
&lt;li&gt;Now you&amp;#39;re prompted for a password - enter anything and press enter.&lt;/li&gt;
&lt;li&gt;Once you&amp;#39;re logged on, enter &lt;strong&gt;dir&lt;/strong&gt; - again, press enter.&lt;/li&gt;
&lt;li&gt;You&amp;#39;ll see the directory listing succeed, but you&amp;#39;ll also see a warning that a connection is being blocked:&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://msmvps.com/blogs/alunj/WindowsLiveWriter/VistasWindowsFirewallSecret_11770/image-0063_2.png"&gt;&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="571" alt="image-0063" src="http://msmvps.com/blogs/alunj/WindowsLiveWriter/VistasWindowsFirewallSecret_11770/image-0063_thumb.png" width="999" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;em&gt;Wow - that&amp;#39;s freaky - at the same time you&amp;#39;re being told that the connection used for the file listing will be blocked, it allows the connection through!&lt;/em&gt; 
&lt;p&gt;What&amp;#39;s more, even if you specify &lt;strong&gt;Keep Blocking&lt;/strong&gt;, and then go issue another &lt;strong&gt;dir&lt;/strong&gt; command, that one succeeds. 
&lt;p&gt;&lt;em&gt;Huh? And why on earth did you make me use a copy of FTP?&lt;/em&gt; 
&lt;p&gt;Let&amp;#39;s go look at the Windows Advanced Firewall Rules for Inbound, and see if this sheds any light: 
&lt;p&gt;[That means click the Start button, type &lt;strong&gt;Firewall&lt;/strong&gt; into the search box, and right-click on &lt;strong&gt;Windows Firewall with Advanced Security&lt;/strong&gt; - select &lt;strong&gt;Run as Administrator&lt;/strong&gt; 
&lt;p&gt;and accept the elevation prompt from UAC. If you don&amp;#39;t have an elevation prompt, then you should really re-enable UAC. Now select &lt;strong&gt;Inbound Rules&lt;/strong&gt; in the left-hand pane]&lt;/p&gt;
&lt;p&gt;Me, I&amp;#39;ve got a few rules labeled &lt;strong&gt;File Transfer Program&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msmvps.com/blogs/alunj/WindowsLiveWriter/VistasWindowsFirewallSecret_11770/Image-0064_2.png"&gt;&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="348" alt="Image-0064" src="http://msmvps.com/blogs/alunj/WindowsLiveWriter/VistasWindowsFirewallSecret_11770/Image-0064_thumb.png" width="829" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;That first (and fourth) rule is set to block any listening ports opened by the &lt;strong&gt;File Transfer Program&lt;/strong&gt; in &lt;strong&gt;C:\users\myme\ftp.exe&lt;/strong&gt;, the second two seem to be allowing any listening ports created by the one in &lt;strong&gt;C:\windows\system32\ftp.exe&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Obviously, that&amp;#39;s why I asked you to copy &lt;strong&gt;ftp.exe&lt;/strong&gt; to a new directory, so that any previous allowance by the firewall rules wouldn&amp;#39;t get in the way.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;So what&amp;#39;s happening here? Is the &amp;quot;&lt;strong&gt;Allow&lt;/strong&gt;&amp;quot; rule somehow overriding the &amp;quot;&lt;strong&gt;Block&lt;/strong&gt;&amp;quot; rule, even though it&amp;#39;s not dealing with the same executable?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;We can test that simply by deleting both sets of rules - go ahead and do that, I&amp;#39;ll wait for you.&lt;/p&gt;
&lt;p&gt;Didn&amp;#39;t make a bit of difference, did it? It still allowed the traffic, then prompted you if you wanted to block it. Even if you selected to &amp;quot;&lt;strong&gt;Keep Blocking&lt;/strong&gt;&amp;quot;, the next and subsequent transfers still worked, right?&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Okay - let&amp;#39;s consult the Big Book of Knowledge (alright, what I can vaguely remember after mumbleteen years in the networking world). Some routers and firewalls use an Application Layer Gateway (ALG) to translate FTP commands, and open ports. Is that what&amp;#39;s going on here?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s take a peek at the services on this machine (as an administrator, run &lt;strong&gt;services.msc&lt;/strong&gt;):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msmvps.com/blogs/alunj/WindowsLiveWriter/VistasWindowsFirewallSecret_11770/Image-0065_2.png"&gt;&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="353" alt="Image-0065" src="http://msmvps.com/blogs/alunj/WindowsLiveWriter/VistasWindowsFirewallSecret_11770/Image-0065_thumb.png" width="784" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;em&gt;Bingo - there it is, the &lt;strong&gt;Application Layer Gateway Service&lt;/strong&gt;. And when you have &lt;strong&gt;Internet Connection Sharing&lt;/strong&gt; running, that&amp;#39;s what translates IP addresses in FTP commands for you, and what opens up port mappings and holes in the NAT that ICS hosts.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Oh, but wait a moment - what&amp;#39;s that in the &amp;quot;&lt;strong&gt;Status&lt;/strong&gt;&amp;quot; column?&lt;/p&gt;
&lt;p&gt;That&amp;#39;s right, nothing. This service isn&amp;#39;t running.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Something must be happening to open this port up - it&amp;#39;s not just a case of &amp;quot;port left open&amp;quot;, nor is it an outbound port. Those ports are closed tight until the FTP client starts listening for incoming data connections, and then they&amp;#39;re opened up.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s where I go into MVP-mode, and start searching in all the nooks and crannies of the web and whatever documentation it holds.&lt;/p&gt;
&lt;p&gt;Net result - Windows Firewall in Windows Vista includes something called a &amp;quot;connection inspection engine&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Sounds like something from &amp;quot;&lt;/em&gt;&lt;a title="Conjunction junction, what&amp;#39;s your function?" href="http://en.wikipedia.org/wiki/Conjunction_Junction"&gt;&lt;em&gt;Schoolhouse Rock&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&amp;quot;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;No, seriously, there&amp;#39;s a &amp;quot;connection inspection engine&amp;quot; for FTP - if you connect to port 21, the firewall monitors your communications on that channel, looking for PORT commands. When it finds one, it opens up a hole in the firewall for the incoming data connection.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;So why the scary dialog warning that something&amp;#39;s going to block traffic?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Probably because the dialog pops up whenever an application starts listening, whereas the connection inspection engine only opens a hole when it sees a PORT command. And an FTP client can&amp;#39;t actually give the PORT command until it&amp;#39;s started listening.&lt;/p&gt;
&lt;p&gt;So, the process goes something like this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Start the FTP client.&lt;/li&gt;
&lt;li&gt;Connect to the FTP server on port 21, waking up the connection inspection engine.&lt;/li&gt;
&lt;li&gt;Log on, then type &lt;strong&gt;dir&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;The FTP client knows that it needs to open a data connection.&lt;/li&gt;
&lt;li&gt;To start the data connection, the FTP client binds to port 0, and starts listening.&lt;/li&gt;
&lt;li&gt;The firewall says &amp;quot;Oh no, an unknown program has started listening - better warn them that they won&amp;#39;t get any traffic.&amp;quot;&lt;/li&gt;
&lt;li&gt;The FTP client checks what port it actually got, and sends a matching PORT command.&lt;/li&gt;
&lt;li&gt;The connection inspection engine says &amp;quot;PORT command? That&amp;#39;s my cue!&amp;quot; and opens a hole in the firewall to incoming data connections.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Well, that&amp;#39;s easy, but what if I don&amp;#39;t ever want to do an FTP connection? How do I stop this from becoming a potential hacker tool?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Okay, apart from the obvious - that if a hacker could connect out to a server on port 21, nothing&amp;#39;s stopping that hacker from transferring data in - you might want to cripple this functionality.&lt;/p&gt;
&lt;p&gt;No problem - just set the following DWORD registry value to 1:&lt;/p&gt;
&lt;p&gt;HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ SharedAccess \ Parameters \ FirewallPolicy \ DisableStatefulFTP&lt;/p&gt;
&lt;p&gt;The default setting for this value on Windows Vista is 0. [It remains to be seen what value will be the default on Windows Server 2008]&lt;/p&gt;
&lt;p&gt;&lt;em&gt;How could Microsoft make this better?&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I&amp;#39;d really like to see this documented. Just so that it&amp;#39;s not a surprise to anyone.&lt;/li&gt;
&lt;li&gt;I&amp;#39;d like to know how many other connection inspection engines there are (at least one, judging from the DisableStatefulPPTP value - but I don&amp;#39;t know enough about PPTP to know how that affects operation).&lt;/li&gt;
&lt;li&gt;I&amp;#39;d like to know if I can add my own connection inspection engine to the firewall.&lt;/li&gt;
&lt;li&gt;Above all, I&amp;#39;d like to do away with the rather confusing and clumsy &amp;quot;We&amp;#39;re going to block your incoming ... wait, what just happened?&amp;quot; dialog. If the connection inspection engine is monitoring a command channel, and the process that owns the socket for that command channel starts listening, perhaps we could wait a quarter of a second for a PORT command before calling this a blocked connection?&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Finally, is this a vulnerability, a hole, or anything outside the correct operation of a firewall?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;No, because the firewall is documented as blocking unsolicited incoming connections - and by any reasonable definition, the data connection requested by a PORT command is solicited.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1479415" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/alunj/archive/tags/General+Security/default.aspx">General Security</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/FTP/default.aspx">FTP</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Vista/default.aspx">Windows Vista</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/TCP_2F00_IP/default.aspx">TCP/IP</category></item><item><title>Waiting for Vista SP1?</title><link>http://msmvps.com/blogs/alunj/archive/2008/01/17/1468300.aspx</link><pubDate>Fri, 18 Jan 2008 05:24:31 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1468300</guid><dc:creator>Alun Jones</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/rsscomments.aspx?PostID=1468300</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/commentapi.aspx?PostID=1468300</wfw:comment><comments>http://msmvps.com/blogs/alunj/archive/2008/01/17/1468300.aspx#comments</comments><description>&lt;p&gt;In a previous article, I wrote about how to sound stupid by saying &amp;quot;&lt;a title="Let&amp;#39;s just wait for Service Pack 1" href="http://msmvps.com/blogs/alunj/archive/2007/08/30/1147398.aspx"&gt;let&amp;#39;s wait for Service Pack 1 before we deploy Windows Vista&lt;/a&gt;&amp;quot;.&lt;/p&gt; &lt;p&gt;Now here are a few ways to sound clever, by pointing to specific &lt;a title="Overview of Windows Vista Service Pack 1" href="http://technet2.microsoft.com/WindowsVista/en/library/417467e7-7845-46d4-85f1-dd471fbc0de91033.mspx"&gt;issues that will be fixed by Windows Vista SP1&lt;/a&gt;.&lt;/p&gt; &lt;ul&gt; &lt;li&gt;GPMC.MSC (the Group Policy Management Console) gets removed, and the Group Policy Editor will default to editing the local group policy only. Okay, that&amp;#39;s not really an advantage - but you will be able to download a newer group policy editor later.&lt;/li&gt; &lt;li&gt;Allows Remote Desktop Protocol (RDP) files to be signed. Complains when they aren&amp;#39;t (though this does cause a problem for Remote Web Workplace users in SBS land, because there&amp;#39;s no way to actually sign the RDP files!)&lt;/li&gt; &lt;li&gt;Improved cryptographic random number generator, leveraging the TPM if you have one on your computer. (Not sure there was that much wrong with the old one... but this one&amp;#39;s better, and more ... cryptographicky)&lt;/li&gt; &lt;li&gt;BDE + TPM + USB + PIN - need I say more? Oh, okay then - for the truly security paranoid, you can use Bitlocker Drive Encryption with the Trusted Platform Module, and have it require a USB key &lt;u&gt;and&lt;/u&gt; a PIN before the system will start.&lt;/li&gt; &lt;li&gt;Also with BitLocker, there is support for encryption of drives other than the main boot volume (which is the volume that has the system software on it, not the system drive, which is the one you boot from). Still can&amp;#39;t encrypt the system drive - because that would be just plain stupid.&lt;/li&gt; &lt;li&gt;Performance improvements - really, what&amp;#39;s not to like with an update that makes your computer go faster?&lt;/li&gt; &lt;li&gt;exFAT file system for flash memory storage - you probably haven&amp;#39;t exactly been drooling about this.&lt;/li&gt; &lt;li&gt;SSTP - allows VPN over HTTPS to Windows Server 2008 systems. Yeah, because if you&amp;#39;re holding off installing Vista until SP1 ships, you&amp;#39;ve got loads of those ready to use, right?&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;I don&amp;#39;t know - were any of those features worth waiting for? I know there&amp;#39;s performance and reliability improvements, but those are somewhat nebulous and indistinct.&lt;/p&gt; &lt;p&gt;My advice is still to test Vista as it shipped, test Vista with the Service Pack 1 Release Candidate - report bugs to Microsoft quickly, before they lock it down - and then when SP1 releases, and then test with Vista SP1 RTM when it comes out... and stop letting vendors get away with saying that &amp;quot;all you need to do to run our software on Vista is to disable UAC, or make all users administrator&amp;quot; - that&amp;#39;s just plain bad.&lt;/p&gt; &lt;p&gt;What do I wish was in SP1?&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Some provision for solving the EFS incompatibility between XP and Vista (maybe XP SP3 will help, I don&amp;#39;t know)&lt;/li&gt; &lt;li&gt;The ability for a standard user to back up his own files, including EFS encrypted files, so that a user can export encrypted data to removable physical media (like a CD-R). Too much data still travels unencrypted, and it might help to have the ability to put encrypted files on CD-Rs using only what comes with the OS.&lt;/li&gt; &lt;li&gt;A server administration toolkit that allows me to administer Windows versions 2000, 2003 and 2008 from Vista.&lt;/li&gt; &lt;li&gt;An ability to switch sound output devices on already-running applications. When my wife comes into the office, I want to stop using the built-in speakers and start using the Bluetooth headset, so that she can&amp;#39;t hear me playing Halo.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;So, tell me, what are you waiting for?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1468300" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/alunj/archive/tags/Things+I+Learned+At+Microsoft/default.aspx">Things I Learned At Microsoft</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Miscellany+-+not+security/default.aspx">Miscellany - not security</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Vista/default.aspx">Windows Vista</category></item><item><title>Why you don't run as root</title><link>http://msmvps.com/blogs/alunj/archive/2008/01/11/1457310.aspx</link><pubDate>Sat, 12 Jan 2008 05:03:12 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1457310</guid><dc:creator>Alun Jones</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/rsscomments.aspx?PostID=1457310</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/commentapi.aspx?PostID=1457310</wfw:comment><comments>http://msmvps.com/blogs/alunj/archive/2008/01/11/1457310.aspx#comments</comments><description>&lt;p&gt;[... or administrator, or whatever]&lt;/p&gt; &lt;p&gt;I like Roger Grimes, he&amp;#39;s a nice guy, and he generally makes me think about what he has to say. That&amp;#39;s a good thing, because otherwise he&amp;#39;d either be part of the same choir as me, or he&amp;#39;d be the sort of guy whose ideas I dismiss with a wave of the paw and a barely audible &amp;quot;Pah.&amp;quot;&lt;/p&gt; &lt;p&gt;Today, though, I think he&amp;#39;s missing something fundamental - and perhaps you are too.&lt;/p&gt; &lt;p&gt;He writes in the &lt;a title="InfoWorld Security Adviser - Why UAC will not work." href="http://www.infoworld.com/article/08/01/11/02OPsecadvise-user-account-control_1.html"&gt;InfoWorld Security Adviser column that &amp;quot;UAC will not work&amp;quot;&lt;/a&gt;, on the simple basis that malware can still do all the things it wants to do without having to execute under a privileged account.&lt;/p&gt; &lt;p&gt;That&amp;#39;s true, and it always will be - the day that a computer can see my attempt to &amp;quot;delete the Johnson account, and forward that instruction to the following addresses&amp;quot;, and determine whether it&amp;#39;s malicious or appropriate, is the day when the computer can do the whole job for me, by simply choosing all possible actions and seeing which are malicious and which are appropriate.&lt;/p&gt; &lt;p&gt;However, what I can rely on, if the malware has been held out of privileged accounts, is the integrity of the system, and (unless they were prone to activating the same malware) the other users on that system. [By system, I may mean one machine or several networked together to perform a function.]&lt;/p&gt; &lt;p&gt;So while it&amp;#39;s true that the old cross-platform virus &amp;quot;forward this message to everyone in your address book, then delete all your data&amp;quot; is still going to function if the user stays out of administrator roles, at least the operation of the system can be restored, as well as whatever data has been backed up.&lt;/p&gt; &lt;p&gt;You don&amp;#39;t run as a restricted user to prevent viruses from happening - you run as a restricted user to prevent viruses from happening to the people and systems with whom you work. You run as a restricted user, so that when some system falls over, you can say &amp;quot;it couldn&amp;#39;t possibly have been me&amp;quot;. You run as a restricted user because if there is a bug in the program you run, its effects will be limited to only that portion of the OS and its data to which you are restricted.&lt;/p&gt; &lt;p&gt;Sure, least privilege is somewhat of an artificial construct - but the alternative is that users get more privileges than they need. That quickly boils down to &amp;quot;everyone can do anything&amp;quot;.&lt;/p&gt; &lt;p&gt;I&amp;#39;ve been on that kind of a network before, and when we found one guy&amp;#39;s stash of truly offensive porn (this wasn&amp;#39;t the occasional Rubens painting) on the server, we had no way of finding out who it was, let alone punishing them by firing them. The company I worked for was fortunate that whoever found it didn&amp;#39;t sue for fostering the creation of a hostile workplace.&lt;/p&gt; &lt;p&gt;So, no, UAC won&amp;#39;t stop malware - but then that&amp;#39;s not its purpose. It&amp;#39;s purely a beneficial, incidental, and temporary side-effect that it will stop much of today&amp;#39;s malware.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1457310" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/alunj/archive/tags/General+Security/default.aspx">General Security</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Things+I+Learned+At+Microsoft/default.aspx">Things I Learned At Microsoft</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Vista/default.aspx">Windows Vista</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/What+my+wife+knows/default.aspx">What my wife knows</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/UAC/default.aspx">UAC</category></item><item><title>Is a NAT a security device?</title><link>http://msmvps.com/blogs/alunj/archive/2007/12/29/1425918.aspx</link><pubDate>Sat, 29 Dec 2007 19:23:12 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1425918</guid><dc:creator>Alun Jones</dc:creator><slash:comments>7</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/rsscomments.aspx?PostID=1425918</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/commentapi.aspx?PostID=1425918</wfw:comment><comments>http://msmvps.com/blogs/alunj/archive/2007/12/29/1425918.aspx#comments</comments><description>&lt;p&gt;I&amp;#39;ve been working lately on a couple of IPv6-related projects. First, there&amp;#39;s a chapter for an upcoming book, and second, there&amp;#39;s the effort to make WFTPD and WFTPD Pro work on IPv6, since it&amp;#39;s enabled by default in Windows Vista and Windows Server 2008 [more on that in a future post].&lt;/p&gt; &lt;p&gt;A big argument to my mind, as an old-school Internet user, for enabling IPv6 is that every one of your hosts becomes a fully-fledged Internet participant, like it used to be with IPv4 back in the &amp;#39;90s.&lt;/p&gt; &lt;p&gt;What do I mean by that?&lt;/p&gt; &lt;p&gt;I mean that every machine is reachable at its own address on every port that it chooses to open, rather than requiring someone to tinker with a NAT to open port mappings for specific applications.&lt;/p&gt; &lt;p&gt;IPv6 removes the need for a NAT at all.&lt;/p&gt; &lt;p&gt;Wow. To a security professional, that&amp;#39;s a shocking statement. It feels rather like saying that living in a tent removes the need for locks. How on earth do you protect your stuff without a NAT?&lt;/p&gt; &lt;p&gt;The answer is that a NAT was never intended to be a security device - it just happened, somewhat accidentally, that requiring address translation and port mapping to be statically configured created a security barrier.&lt;/p&gt; &lt;p&gt;Unfortunately, NATs also killed a lot of protocols (H.323 for webcams, FTP for file transfers - particularly when secured, IPsec) that quote IP addresses in their traffic.&lt;/p&gt; &lt;p&gt;To some extent this was fixed with ALGs - Application Layer Gateways - but never very satisfactorily (particularly in the case of secured FTP). What would be far better is to have a device that had the blocking advantages of a NAT, but didn&amp;#39;t require IP addresses and ports to be altered in transit.&lt;/p&gt; &lt;p&gt;There&amp;#39;s a name for such a device:&lt;/p&gt; &lt;p&gt;A firewall.&lt;/p&gt; &lt;p&gt;[Only if the firewall is configured by default to list all ports as &amp;quot;closed&amp;quot;. An open-by-default firewall is not a firewall, it&amp;#39;s a router.]&lt;/p&gt; &lt;p&gt;And a firewall is a far simpler program than a NAT (even if it&amp;#39;s in hardware, it&amp;#39;s the program&amp;#39;s simplicity that matters most). If it matches incoming traffic to ports that are opened, it allows that traffic in. If outgoing traffic occurs on a port that was closed, the firewall usually opens that port for the reverse traffic, so that clients on the inside of the firewall can get a response.&lt;/p&gt; &lt;p&gt;So, when the time comes that your network is required to transition to IPv6, don&amp;#39;t beg for an IPv6 NAT. I actually hope such a device doesn&amp;#39;t actually exist, and that nobody&amp;#39;s stupid enough to develop one. What you should insist on is an IPv6 firewall.&lt;/p&gt; &lt;p&gt;&amp;quot;But what about the problem that the layout of my network inside of the firewall will be revealed?&amp;quot; you might ask.&lt;/p&gt; &lt;p&gt;It won&amp;#39;t, because IPv6 addresses are sparsely allocated.&lt;/p&gt; &lt;p&gt;&amp;quot;How about machines that won&amp;#39;t ever need to be accessed by, or access out to, anything outside my company? What&amp;#39;s the IPv6 equivalent of an RFC 1918 address?&amp;quot;&lt;/p&gt; &lt;p&gt;No problem - there&amp;#39;s a standard for link-local and site-local (Unique Local Unicast, technically) addressing, which will never be routed outside of your site.&lt;/p&gt; &lt;p&gt;Any other reasons you&amp;#39;re clinging to the idea that a NAT is a security device?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1425918" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/alunj/archive/tags/General+Security/default.aspx">General Security</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Vista/default.aspx">Windows Vista</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/TCP_2F00_IP/default.aspx">TCP/IP</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category></item><item><title>Why complain about UAC prompts?</title><link>http://msmvps.com/blogs/alunj/archive/2007/09/03/1162833.aspx</link><pubDate>Tue, 04 Sep 2007 03:51:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1162833</guid><dc:creator>Alun Jones</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/rsscomments.aspx?PostID=1162833</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/commentapi.aspx?PostID=1162833</wfw:comment><comments>http://msmvps.com/blogs/alunj/archive/2007/09/03/1162833.aspx#comments</comments><description>&lt;p&gt;&lt;a title="Security Watch: The Long-Term Impact of User Account Control" href="http://www.microsoft.com/technet/technetmag/issues/2007/09/SecurityWatch/default.aspx"&gt;Jesper&amp;#39;s article&lt;/a&gt; in &lt;a title="TechNet Magazine" href="http://www.microsoft.com/technet/technetmag/"&gt;TechNet Magazine&lt;/a&gt; on the purpose and future of UAC in Windows Vista and beyond reminded me that there&amp;#39;s a whole slew of behaviours more annoying than UAC&amp;#39;s prompting (which, as Jesper points out, is only the most visible portion of a system-wide and company-wide approach to the future of Windows development), and which users apparently don&amp;#39;t hate enough for vendors and IT departments to cry for changes.&lt;/p&gt;
&lt;h4&gt;UAC elevation prompts from tools that shouldn&amp;#39;t need elevation. &lt;/h4&gt;
&lt;p&gt;Seriously, this is just a sign that the developer was an administrator, and the tester was an administrator, and nobody bothered to make the program work for non-administrators by removing requests for privileges that aren&amp;#39;t actually needed.&lt;/p&gt;
&lt;p&gt;So, instead of fixing the product to remove the demands for administrative rights, the developers simply added a manifest to make the software insist on elevation.&lt;/p&gt;
&lt;p&gt;If you&amp;#39;ve got non-administrative software that prompts for elevation as soon as it starts up, you should be asking your vendor whether this is their long-term fix, or whether this is just a temporary workaround while they engage in what can be a long process of removing elevation.&lt;/p&gt;
&lt;h4&gt;UAC elevation prompts for administrators running administrative tools&lt;/h4&gt;
&lt;p&gt;While performing their administration function, these users&amp;nbsp;should be in an administrator session, and should have enabled silent elevation&amp;nbsp;through Group Policy; while not performing their administration function, they should not be in an administrator session, and elevation should be disabled.&lt;/p&gt;
&lt;p&gt;While that may have been awkward and cumbersome in Windows XP and before (although &amp;quot;runas&amp;quot; goes a long way towards providing this sort of&amp;nbsp;separation), in Windows Vista, Fast User Switching is enabled for even domain-joined computers, allowing you to choose whether to be in a restricted user session or an administrative user session.&lt;/p&gt;
&lt;p&gt;Spending most of your time as a non-admin means that when someone comes looking for the admin user who infected the company with an Outlook worm, you can point to the fact that your admin account isn&amp;#39;t set up to run Outlook, so it couldn&amp;#39;t possibly be you - phew! &lt;/p&gt;
&lt;h4&gt;Requests to re-identify myself&lt;/h4&gt;
&lt;p&gt;This is the big one for me, though - why aren&amp;#39;t people complaining the same way about applications that ask the users&amp;nbsp;to authenticate themselves again?&lt;/p&gt;
&lt;p&gt;Why haven&amp;#39;t these applications been fixed to use other methods of authentication?&lt;/p&gt;
&lt;p&gt;When I fill in my time-sheet, I&amp;#39;m required to provide my user name and password. Again.&lt;/p&gt;
&lt;p&gt;When I connect to the company training web page, I&amp;#39;m required to provide my user name and password. Again.&lt;/p&gt;
&lt;p&gt;Every place I&amp;#39;ve worked, it&amp;#39;s the same thing - there&amp;#39;s a pile of applications that are necessary to, or related to&amp;nbsp;your work - whether it&amp;#39;s training, time-sheets, benefits checking, prescription filling under the company-provided insurance plan, or whatever - they&amp;#39;ve all required that I identify myself to them - again - even though I&amp;#39;ve already identified myself to the domain on this computer.&lt;/p&gt;
&lt;p&gt;Maybe this is acceptable and appropriate for those operations where you want to make sure that somebody hasn&amp;#39;t stepped in to the user&amp;#39;s cube while the user was away - but those operations&amp;nbsp;should generally be limited to unlocking the locked workstation, changing the user&amp;#39;s password, starting up an elevated process -&amp;nbsp;not routine operational work.&lt;/p&gt;
&lt;p&gt;After all, if you start requiring the user to enter their password everywhere, you&amp;#39;re teaching the user that he should be blasé about repeatedly entering his password several times during the work day - then when the phishing email comes along, with a request to log on to an external web site, that user will happily give up his user account and password (which will most likely be the same as his password on every other system he&amp;#39;s used).&lt;/p&gt;
&lt;p&gt;There are good alternatives.&lt;/p&gt;
&lt;p&gt;A couple of obvious&amp;nbsp;approaches for web-based applications are Windows Integrated Authentication (which, admittedly, does require IE and IIS), and SSL client certificates.&lt;/p&gt;
&lt;p&gt;Thick-client applications are also usable, as long as they aren&amp;#39;t against your company&amp;#39;s religion.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1162833" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/alunj/archive/tags/General+Security/default.aspx">General Security</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Programmer+Hubris/default.aspx">Programmer Hubris</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Miscellany+-+not+security/default.aspx">Miscellany - not security</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Vista/default.aspx">Windows Vista</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/What+my+wife+knows/default.aspx">What my wife knows</category></item><item><title>Let's just wait for Service Pack 1</title><link>http://msmvps.com/blogs/alunj/archive/2007/08/30/1147398.aspx</link><pubDate>Thu, 30 Aug 2007 13:08:19 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1147398</guid><dc:creator>Alun Jones</dc:creator><slash:comments>10</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/rsscomments.aspx?PostID=1147398</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/alunj/commentapi.aspx?PostID=1147398</wfw:comment><comments>http://msmvps.com/blogs/alunj/archive/2007/08/30/1147398.aspx#comments</comments><description>&lt;p&gt;Every so often, I&amp;#39;ll hear it said, and frequently not in jest, &amp;quot;let&amp;#39;s wait until Service Pack 1 before we deploy Vista&amp;quot;, or sometimes &amp;quot;Server 2008&amp;quot;.&lt;/p&gt; &lt;p&gt;While it&amp;#39;s true that &lt;a title="Announcing Windows Vista Service Pack 1 Beta" href="http://windowsvistablog.com/blogs/windowsvista/archive/2007/08/29/announcing-the-windows-vista-service-pack-1-beta.aspx"&gt;Microsoft has indeed announced plans to test, and then release, Windows Vista SP1 early in 2008&lt;/a&gt;, I have to say that I don&amp;#39;t find this thinking any smarter than the old &amp;quot;let&amp;#39;s buy IBM&amp;quot; idea, based on the &amp;quot;Nobody Ever Got Fired For Buying IBM&amp;quot; principle.&lt;/p&gt; &lt;p&gt;Even if it were true, someone&amp;#39;s eventually going to realise that if it&amp;#39;s your job to specify what the IT budget gets spent on, and you say things like &amp;quot;we&amp;#39;ll deploy it after Service Pack 1&amp;quot;, you&amp;#39;re just not acting as if you&amp;#39;re doing your job.&lt;/p&gt; &lt;p&gt;Somebody, one day, will call your bluff, and say &amp;quot;Why? What bug is a showstopper for deploying Vista RTM, and why do you believe it&amp;#39;s fixed by SP1? Why didn&amp;#39;t you find that bug out while you were beta testing the operating system? Weren&amp;#39;t you beta testing the operating system?&amp;quot;&lt;/p&gt; &lt;p&gt;And you&amp;#39;re going to look foolish, because you don&amp;#39;t have anything in particular to point to (UAC? That&amp;#39;s a bit generic - you have to say what you don&amp;#39;t like about UAC, &lt;u&gt;and&lt;/u&gt; why you think SP1 will make it all better) in order to defend your mindless parroting of &amp;quot;let&amp;#39;s wait for SP1&amp;quot;.&lt;/p&gt; &lt;p&gt;For the record, there are reasons to anticipate SP1 - it adds an SSL-based VPN capability, through the SSTP, and it allows you to encrypt multiple drives using BitLocker through the UI (you can use manage-bde.wsf to encrypt multiple drives using BitLocker from the command prompt).&lt;/p&gt; &lt;p&gt;There are other features in SP1, and you should definitely consider whether you can use those features. But there really isn&amp;#39;t any break-fix that makes it important for you to stop testing and planning to deploy Vista RTM while you wait for SP1.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1147398" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/alunj/archive/tags/Things+I+Learned+At+Microsoft/default.aspx">Things I Learned At Microsoft</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Miscellany+-+not+security/default.aspx">Miscellany - not security</category><category domain="http://msmvps.com/blogs/alunj/archive/tags/Windows+Vista/default.aspx">Windows Vista</category></item></channel></rss>