<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-30313636</atom:id><lastBuildDate>Sat, 09 May 2009 18:24:55 +0000</lastBuildDate><title>ArcaneTek from LowTek</title><description></description><link>http://www.lowtek.com/blog/</link><managingEditor>noreply@blogger.com (LowTek)</managingEditor><generator>Blogger</generator><openSearch:totalResults>24</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-7529340695654617936</guid><pubDate>Tue, 02 Dec 2008 23:40:00 +0000</pubDate><atom:updated>2008-12-26T15:41:50.644-08:00</atom:updated><title>Setting charsets via IIS MIME types is harmful</title><description>&lt;p&gt;Previously, in &lt;a href="http://www.lowtek.com/blog/2006/09/setting-utf-8-character-encoding-for.html"&gt;this post&lt;/a&gt;, I recommended that webmasters tweak their IIS MIME type settings so that static HTML files would specify a charset of UTF-8. &lt;strong&gt;It turns out that this causes some problems.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The issue is that some web crawlers / search engines send an HTTP request header like the following:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Accept: text/html&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;If you’ve configured IIS MIME types to send “text/html; charset=utf-8”, this does not match “text/html”, so IIS will actually return an error (i.e. a 40x or 50x HTTP status code), and the page contents will not be returned to the crawler.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Thus, one should not do as I’ve described in &lt;/strong&gt;&lt;a href="http://www.lowtek.com/blog/2006/09/setting-utf-8-character-encoding-for.html"&gt;&lt;strong&gt;this post&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt; Oh well, looks like &lt;a href="http://www.w3.org/International/O-charset"&gt;setting the charset via a Meta Tag&lt;/a&gt; is the way to go for static HTML pages.&lt;/p&gt;  &lt;p&gt;I happened to discover this issue by running &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&amp;amp;displaylang=en"&gt;LogParser&lt;/a&gt; on my IIS log files, looking for any unexpected HTTP status codes.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-7529340695654617936?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2008/12/setting-charsets-via-iis-mime-types-is.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-3634211449173713641</guid><pubDate>Mon, 01 Dec 2008 23:25:00 +0000</pubDate><atom:updated>2008-12-26T15:27:35.068-08:00</atom:updated><title>MySpace Account Hacking</title><description>&lt;p&gt;After &lt;a href="http://www.lowtek.com/blog/2006/07/ctu-newhire-guide-to-opening-socket.html"&gt;this post&lt;/a&gt;, I get a lot of questions like:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;I think my spouse/SO/etc. is cheating on me. &lt;strong&gt;How do I hack their MySpace so I can find out what’s going on?&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;Help, someone hacked my MySpace and took over my account. &lt;strong&gt;How do I get it back?&lt;/strong&gt; (Similarly: I forgot my password or somehow it got changed, what do I do now?) &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Here’s some info from the MySpace site that may help you recover your account:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://faq.myspace.com/cgi-bin/myspace.cfg/php/enduser/std_adp.php?p_faqid=20&amp;amp;p_created=1219802471&amp;amp;p_sid=HV-hDmmj&amp;amp;p_accessibility=0&amp;amp;p_redirect=&amp;amp;p_lva=&amp;amp;p_sp=cF9zcmNoPTEmcF9zb3J0X2J5PSZwX2dyaWRzb3J0PSZwX3Jvd19jbnQ9MTcsMTcmcF9wcm9kcz0mcF9jYXRzPTAmcF9wdj0mcF9jdj0mcF9zZWFyY2hfdHlwZT1hbnN3ZXJzLnNlYXJjaF9ubCZwX3BhZ2U9MSZwX3NlYXJjaF90ZXh0PXBhc3N3b3Jk&amp;amp;p_li=&amp;amp;p_topview=1"&gt;Response to questions or concerns about compromised accounts&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://faq.myspace.com/cgi-bin/myspace.cfg/php/enduser/std_adp.php?p_faqid=5&amp;amp;p_created=1219794550&amp;amp;p_sid=HV-hDmmj&amp;amp;p_accessibility=0&amp;amp;p_redirect=&amp;amp;p_lva=&amp;amp;p_sp=cF9zcmNoPTEmcF9zb3J0X2J5PSZwX2dyaWRzb3J0PSZwX3Jvd19jbnQ9MTcsMTcmcF9wcm9kcz0mcF9jYXRzPTAmcF9wdj0mcF9jdj0mcF9zZWFyY2hfdHlwZT1hbnN3ZXJzLnNlYXJjaF9ubCZwX3BhZ2U9MSZwX3NlYXJjaF90ZXh0PXBhc3N3b3Jk&amp;amp;p_li=&amp;amp;p_topview=1"&gt;Steps to take if a user forgets their username or email address&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;For more help, please see &lt;a href="http://faq.myspace.com/cgi-bin/myspace.cfg/php/enduser/std_alp.php?p_sid=4_tfDmmj&amp;amp;p_accessibility=0&amp;amp;p_redirect=&amp;amp;p_sp=cF9zcmNoPSZwX3NvcnRfYnk9JnBfZ3JpZHNvcnQ9JnBfcm93X2NudD0xMzAsMTMwJnBfcHJvZHM9JnBfY2F0cz0mcF9wdj0mcF9jdj0mcF9zZWFyY2hfdHlwZT1hbnN3ZXJzLnNlYXJjaF9ubCZwX3BhZ2U9MQ**"&gt;MySpace Top FAQs&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-3634211449173713641?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2008/12/myspace-account-hacking.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-115934252499762316</guid><pubDate>Wed, 27 Sep 2006 07:35:00 +0000</pubDate><atom:updated>2006-09-27T15:09:44.450-07:00</atom:updated><title>Configure IIS to redirect to your preferred URL</title><description>&lt;p&gt;The preferred URL for most web sites includes "www." in the beginning of the URL (i.e. &lt;a href="http://www.w3.org/"&gt;http://www.w3.org/&lt;/a&gt;). But sites should still work if you go to the URL without the "www." (i.e. &lt;a href="http://w3.org/"&gt;http://w3.org/&lt;/a&gt;). But in that case, you don't want the user to bookmark the URL without the "www.".&lt;/p&gt; &lt;p&gt;The solution is to make the site without the "www." be a purely redirection-only site that just redirects to the site with "www.". You can do this in IIS by doing the following:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Create a new Web Site, right-click it and choose Properties, then navigate to the following dialog boxes&amp;nbsp;and configure the site to use a Host Header that doesn't contain "www.".&lt;/li&gt;&lt;/ul&gt; &lt;p align="center"&gt;&lt;img src="http://www.lowtek.com/blog/iis-redirect/iis-site-redirector-1.png"&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Switch to the Home Directory tab and make it look like the following:&lt;/li&gt;&lt;/ul&gt; &lt;p align="center"&gt;&lt;img src="http://www.lowtek.com/blog/iis-redirect/iis-site-redirector-2.png"&gt;&lt;/p&gt; &lt;p&gt;Explanation:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;The special $S and $Q syntax is explained &lt;a href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/41c238b2-1188-488f-bf2d-464383b1bb08.mspx?mfr=true"&gt;here&lt;/a&gt;. Basically, it makes it so that whatever the user specifies after the hostname (including file paths and query strings) is included in the redirection to the destination site. (BTW, that page also explained way more advanced and powerful syntax.)  &lt;li&gt;When using this special syntax, it makes sense to use "The exact URL entered above" so that IIS doesn't append anything else to the destination URL.  &lt;li&gt;"A permanent redirection for this resource" just makes IIS use a &lt;a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.2"&gt;301 Permanent Redirect&lt;/a&gt; instead of a &lt;a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.3"&gt;302 Temporary Redirect&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-115934252499762316?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2006/09/configure-iis-to-redirect-to-your.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-115925484194461265</guid><pubDate>Tue, 26 Sep 2006 07:14:00 +0000</pubDate><atom:updated>2006-09-26T00:14:01.980-07:00</atom:updated><title>Save web server bandwidth by fixing IIS ETags</title><description>&lt;p&gt;When you request a static file from a web site powered by IIS, IIS will return HTTP headers like the following:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;HTTP/1.1 200 OK&lt;br&gt;Content-Length: 4835&lt;br&gt;Content-Type: text/html; charset=utf-8&lt;br&gt;Content-Location: http://servername/index.html&lt;br&gt;Last-Modified: Tue, 26 Sep 2006 03:35:29 GMT&lt;br&gt;Accept-Ranges: bytes&lt;br&gt;&lt;strong&gt;ETag: "704349d01ce1c61:d05"&lt;/strong&gt;&lt;br&gt;Server: Microsoft-IIS/6.0&lt;br&gt;X-Powered-By: ASP.NET&lt;br&gt;Date: Tue, 26 Sep 2006 06:29:11 GMT&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The ETag header is meant to be a unique value that describes the file being retrieved. Note the "d05" in the ETag value. If you restart IIS and request the same file, the ETag won't be "d05", but will be another value. (It appears to be the IIS metabase "change number" value).  &lt;p&gt;This change in value causes problems if you have a cluster of web servers serving up the same file content, but with different ETags. Because the same file essentially has different ETag values at different points in time, the file content may be retransmitted unnecessarily.  &lt;p&gt;To fix this problem, you can explicitly set the ETag sub-value by setting the&amp;nbsp;&lt;a href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/ef7f9d58-2a96-4bd8-8ac1-2a67b43284f1.mspx?mfr=true"&gt;MD_ETAG_CHANGENUMBER property&lt;/a&gt; in the IIS metabase. It doesn't seem possible to do this by using the adsutil.vbs script, but you can do it by manually editing the metabase.xml file, or by following these instructions: &lt;/p&gt; &lt;ul&gt; &lt;li&gt;Download and install the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=56FC92EE-A71A-4C73-B628-ADE629C89499&amp;amp;displaylang=en"&gt;IIS Resource Kit Tools&lt;/a&gt; to get the Metabase Explorer.  &lt;li&gt;Run the Metabase Explorer, navigate to COMPUTERNAME -&amp;gt; LM -&amp;gt; W3SVC, right-click it, and choose New -&amp;gt; DWORD Record. Enter the following and hit OK:&lt;/li&gt;&lt;/ul&gt; &lt;p align="center"&gt;&lt;img src="http://www.lowtek.com/blog/iis-etag/iis-etag-1.png"&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Double-click the new "2039" property that was added to the list on the right half of the window. Enter the numeric value that you'd like to use in the ETag instead of a constantly-changing value.&lt;/li&gt;&lt;/ul&gt; &lt;p align="center"&gt;&lt;img src="http://www.lowtek.com/blog/iis-etag/iis-etag-2.png"&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Switch to the General tab and make it look like the following and hit OK:&lt;/li&gt;&lt;/ul&gt; &lt;p align="center"&gt;&lt;img src="http://www.lowtek.com/blog/iis-etag/iis-etag-3.png"&gt;&lt;/p&gt; &lt;p&gt;Now IIS should use the ETag sub-value that you specified instead of of a constantly-changing value. Note that if you somehow make a server configuration change where you want the ETag value to change, you can go back into Metabase Explorer and change the value. Or, delete the "2039" property to go back to the old behavior.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-115925484194461265?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2006/09/save-web-server-bandwidth-by-fixing.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-115924886406023763</guid><pubDate>Tue, 26 Sep 2006 05:34:00 +0000</pubDate><atom:updated>2008-12-26T15:43:17.284-08:00</atom:updated><title>Setting UTF-8 character encoding for all static HTML with IIS</title><description>&lt;p&gt;&lt;strong&gt;NOTE: It is not advisable to follow these instructions for the reasons described in &lt;a href="http://www.lowtek.com/blog/2008/12/setting-charsets-via-iis-mime-types-is.html"&gt;this newer post&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you've done any programming with ASP.NET, you'll notice that by default it outputs this HTTP header:&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;HTTP/1.1 200 OK     &lt;br /&gt;Date: Tue, 26 Sep 2006 05:12:53 GMT      &lt;br /&gt;Server: Microsoft-IIS/6.0      &lt;br /&gt;X-Powered-By: ASP.NET      &lt;br /&gt;X-AspNet-Version: 2.0.50727      &lt;br /&gt;Cache-Control: private      &lt;br /&gt;&lt;strong&gt;Content-Type: text/html; charset=utf-8       &lt;br /&gt;&lt;/strong&gt;Content-Length: 21&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Note that UTF-8 is the default character encoding for ASP.NET. That's no surprise considering that W3C &lt;a href="http://www.w3.org/TR/i18n-html-tech-char/#IDAPNFO"&gt;recommends it&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;If you request a &lt;em&gt;static HTML&lt;/em&gt; file from an IIS server, the default Content-type header does not specify any charset:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;Content-Type: text/html&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;To fix this, run the IIS Manager, right-click your machine name, choose Properties, and navigate your way to this dialog box:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img src="http://www.lowtek.com/blog/iis-text-html-utf-8.png" /&gt;&lt;/p&gt;  &lt;p&gt;By default, there are 3 extensions with the Content-type of text/html: .html, .htm, .hxt. Tweak all of these to have a Content-type of &amp;quot;text/html; charset=utf-8&amp;quot;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Notes&lt;/strong&gt;:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Contrary to what &lt;a href="http://www.w3.org/International/O-HTTP-charset"&gt;this page&lt;/a&gt; says, IIS does seem to allow spaces in the MIME type value. &lt;/li&gt;    &lt;li&gt;Obviously only do this if your static HTML files are really &lt;a href="http://en.wikipedia.org/wiki/UTF-8"&gt;UTF-8&lt;/a&gt;. &lt;/li&gt;    &lt;li&gt;The cool thing about this technique is it requires no programming, no editing of HTML files, and it even works on static IIS error pages (i.e. 404, etc.).&lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-115924886406023763?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2006/09/setting-utf-8-character-encoding-for.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-115924645738469581</guid><pubDate>Tue, 26 Sep 2006 04:54:00 +0000</pubDate><atom:updated>2006-09-26T00:31:14.336-07:00</atom:updated><title>Prevent IIS from revealing your web server IP address</title><description>&lt;p&gt;If a HTTP client doesn't give a HTTP Host header when communicating with your web server, IIS 6 will output the IP address of your web server in the returned HTTP headers:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;HTTP/1.1 200 OK&lt;br&gt;Content-Length: 4835&lt;br&gt;Content-Type: text/html&lt;br&gt;Content-Location: http://&lt;strong&gt;&lt;em&gt;&amp;lt;your server IP address here&amp;gt;&lt;/em&gt;&lt;/strong&gt;/index.html&lt;br&gt;Last-Modified: Tue, 26 Sep 2006 03:35:29 GMT&lt;br&gt;Accept-Ranges: bytes&lt;br&gt;ETag: "704349d01ce1c61:1"&lt;br&gt;Server: Microsoft-IIS/6.0&lt;br&gt;X-Powered-By: ASP.NET&lt;br&gt;Date: Tue, 26 Sep 2006 04:32:57 GMT&lt;br&gt;Connection: close&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;In addition to revealing the IP in the HTTP Content-Location header, it may also display it in redirection responses in the HTTP Location header like the following:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;HTTP/1.1 301 Moved Permanently&lt;br&gt;Content-Length: 153&lt;br&gt;Content-Type: text/html&lt;br&gt;Location: http://&lt;strong&gt;&lt;em&gt;&amp;lt;your server IP address here&amp;gt;&lt;/em&gt;&lt;/strong&gt;/subdir/&lt;br&gt;Server: Microsoft-IIS/6.0&lt;br&gt;X-Powered-By: ASP.NET&lt;br&gt;Date: Tue, 26 Sep 2006 07:21:44 GMT&lt;br&gt;Connection: close&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;If you're behind a firewall or NAT, that IP address may be an internal address that you may not want to reveal to potential attackers (if they don't need it for anything legitimate, why reveal it?). To prevent IIS from revealing this info, there is a &lt;a href="http://support.microsoft.com/kb/834141/"&gt;knowledgebase article&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Tips:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;The KB article says to get a hotfix, but I was able to get it to work without installing any special hotfix.  &lt;li&gt;To do the steps in the article, you need the IIS "site identifier" number. To get that, run:&lt;br&gt;cscript %windir%\system32\iisweb.vbs /query  &lt;li&gt;Ultimately, to configure IIS to stop revealing this info, you just need to run:&lt;br&gt;cscript %SYSTEMDRIVE%\Inetpub\AdminScripts\adsutil.vbs SET W3SVC/&lt;em&gt;&amp;lt;site identifier&amp;gt;&lt;/em&gt;/SetHostName &lt;em&gt;&amp;lt;what you want shown instead of the IP&amp;gt;&lt;/em&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-115924645738469581?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2006/09/prevent-iis-from-revealing-your-web.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-115913744046372054</guid><pubDate>Sun, 24 Sep 2006 22:37:00 +0000</pubDate><atom:updated>2008-12-25T23:33:55.401-08:00</atom:updated><title>How to block an IP address on Windows Server 2003</title><description>&lt;p&gt;Sometimes you may want to prevent a specific IP address from accessing your machine or server. There's a variety of methods with pros and cons:&lt;/p&gt; &lt;h3&gt;Application Level&lt;/h3&gt; &lt;p&gt;If you really just want to prevent a specific IP from accessing a specific application on your machine, you may be able to reconfigure that app to block specific IPs. For example, if you're using IIS, you can configure it to block IPs in this window:&lt;/p&gt; &lt;p align="center"&gt;&lt;img src="http://www.lowtek.com/blog/blockip/iis-block-ip.png" /&gt;&lt;/p&gt; &lt;p&gt;Note that if you use this IIS feature, you should be aware that it prevents HTTP.SYS kernel mode caching from being used (see the last bullet on &lt;a href="http://technet2.microsoft.com/WindowsServer/en/library/0427ca16-a880-41b0-a53e-be0ec89ba3431033.mspx?mfr=true"&gt;this page&lt;/a&gt;), though most sites probably won't notice a difference.&lt;/p&gt; &lt;h3&gt;Windows Firewall&lt;/h3&gt; &lt;p&gt;The Windows Firewall control panel can be used to only allow specific IPs and IP-ranges:&lt;/p&gt; &lt;p align="center"&gt;&lt;img src="http://www.lowtek.com/blog/blockip/windows-firewall-block-ip.png" /&gt;&lt;/p&gt; &lt;p&gt;The main problem here is that this is an &lt;em&gt;Allow&lt;/em&gt; List, as opposed to a &lt;em&gt;Deny&lt;/em&gt; List. So you'll have to "invert" your IP address to accomplish a "block".&lt;/p&gt; &lt;p&gt;Tip: To prevent from locking yourself out of your machine, it may be useful to &lt;em&gt;start&lt;/em&gt; a batch file like the following &lt;em&gt;before&lt;/em&gt; you change your firewall rules:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;sleep 30&lt;br /&gt;netsh firewall set opmode DISABLE&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Provided that you have sleep.exe in your %PATH%, this will wait 30 seconds, then disable the Windows Firewall completely (just like clicking 'Off' in the Windows Firewall control panel). The idea is that if you tweak the UI and you accidentally lock yourself out, just wait 30 seconds and the firewall will be disabled. Or, if you tweaked it properly, just Ctrl-C the batch file to prevent the batch file from disabling the firewall.&lt;/p&gt; &lt;h3&gt;IPsec&lt;/h3&gt; &lt;p&gt;&lt;a href="http://forums.theplanet.com/index.php?showtopic=71208"&gt;This tutorial&lt;/a&gt; explains how to use IPsec on Windows Server 2003 to block specific IPs.&lt;/p&gt; &lt;p&gt;Additional Tips:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;If you don't want to use the MMC IP Security Policies snap-in GUI to "assign the policy", you can use this netsh command:&lt;br /&gt;netsh ipsec static set policy name="Packet Filters - Your Web Host" &lt;strong&gt;assign=yes&lt;/strong&gt;  &lt;/li&gt;&lt;li&gt;Similarly, to unassign the policy (i.e. stop using these IPsec rules), run:&lt;br /&gt;netsh ipsec static set policy name="Packet Filters - Your Web Host" &lt;strong&gt;assign=no&lt;/strong&gt;  &lt;/li&gt;&lt;li&gt;To prevent from locking yourself out of your machine, it may be useful to &lt;em&gt;start&lt;/em&gt; a batch file like the following &lt;em&gt;before&lt;/em&gt; you tweak the IPsec settings:  &lt;p&gt; &lt;/p&gt;&lt;blockquote&gt; &lt;p&gt;sleep 30&lt;br /&gt;netsh ipsec static set policy name="Packet Filters - Your Web Host" assign=no&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Provided that you have sleep.exe in your %PATH%, this will wait 30 seconds, then disable the IPsec policy (just like choosing "Un-assign" in the IP Security Policies snap-in GUI). The idea is that if you tweak the IPsec settings and you accidentally lock yourself out, just wait 30 seconds and the IPsec settings will be deactivated. Or, if you tweaked it properly, just Ctrl-C the batch file to prevent the batch file from deactivating the settings. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;If you make your IPsec block list too big, you may encounter a perf slowdown. For example, as a test, I put 7,000 IP addresses in an IPsec block list and CPU usage went through the roof when the machine was under network stress. I think in practice if you keep the number low, you won't notice any perf change so this is still a very useful technique.&lt;/li&gt;&lt;/ul&gt; &lt;h3&gt;Ask your ISP&lt;/h3&gt; &lt;p&gt;The main problems with all the approaches described above are the following:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;You're still paying for the bandwidth for all the traffic reaching your box, even if you discard it using the methods above.  &lt;/li&gt;&lt;li&gt;It still consumes resources of your machine to discard traffic.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;If you ask your ISP/webhost/colo/upstream to block IPs, they may be able to solve these issues for you, though obviously then you may lose some agility in terms of how quickly you can add/remove IPs from the blocklist, etc.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-115913744046372054?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2006/09/how-to-block-ip-address-on-windows.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-115906284371996189</guid><pubDate>Sun, 24 Sep 2006 01:54:00 +0000</pubDate><atom:updated>2006-09-23T18:54:03.743-07:00</atom:updated><title>Network Analyzers and Top Talkers for Windows</title><description>&lt;p&gt;When diagnosing networking problems, it can be useful to have two tools on hand:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;A "Top Talker" tool that will show what connections/hosts are using the most bandwidth.  &lt;li&gt;A "Network Analyzer" that will capture and decode raw packets that are sent/received.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;I recently tried out a few and here's my quick take. Really I was looking for a "network debugger" to help figure things out when things go bad.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Many of these tools use the &lt;a href="http://www.winpcap.org/"&gt;WinPcap&lt;/a&gt; kernel mode device driver. I'm typically pretty paranoid of kernel mode device drivers, but the WinPcap guys seem like they know what they're doing. If you ever want to turn off their driver, just run "net stop npf".&lt;/p&gt; &lt;h3&gt;&lt;a href="http://www.omnipeek.com/"&gt;OmniPeek Personal&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Powerful free version of WildPackets' commercial network analyzer. Has a lot of different, useful analysis views and "experts" to dig into packets, plus all analysis can be done while a capture is in progress. If you're going to only install one tool, this is probably it. OmniPeek installs its own kernel mode device driver, but at least it doesn't run unless you're actively using OmniPeek.&lt;/p&gt; &lt;h3&gt;&lt;a href="http://www.wireshark.org/"&gt;Wireshark&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Formerly known as Ethereal, this is a popular Open Source network analyzer. Very feature filled, but I found the UI to be somewhat rougher than OmniPeek. Lots of nice features though, especially reconstruction of TCP conversations and a few Top Talker views. It did seem slower to analyze than OmniPeek, even for a surprisingly small capture. Uses WinPcap.&lt;/p&gt; &lt;h3&gt;&lt;a href="http://www.nirsoft.net/utils/smsniff.html"&gt;SmartSniff&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Very clean UI with only one view of complete conversations (as opposed to individual packets). No real protocol decoding. Small and light, but not really meant to be used to dig into problems. Still, the conversation view is very easy to use. Uses WinPcap.&lt;/p&gt; &lt;h3&gt;&lt;a href="http://www.paessler.com/prtg"&gt;PRTG Traffic Grapher&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;PRTG's main focus is bandwidth consumption, so it handily solves the Top Talker scenario and has the most bandwidth reporting of all the tools I tried. Unfortunately, it has some quirks: it runs two separate processes on your machine (plus causes some Service Control Manager Event Log warnings due to this odd behavior); and, it doesn't use the regular WinPcap driver, but another instance of the driver under another name, WOEM_3_2. Ultimately, I think the OS integration could use a little more polish.&lt;/p&gt; &lt;h3&gt;&lt;a href="http://demosten.com/showtraf/"&gt;Show Traffic&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Simple, straightforward UI to show Top Talkers. Small, lightweight tool, but the UI appears to update too often, slowing things down. Uses WinPcap.&lt;/p&gt; &lt;h3&gt;&lt;a href="http://www.ntop.org"&gt;ntop&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Lots of powerful web-based bandwidth reports. The Windows version is only a limited-demo, unless you recompile it from source code or if you register the software (I couldn't exactly tell whether a donation is required or merely suggested). Or maybe &lt;a href="http://www.openxtra.co.uk/products/ntop-xtra.php"&gt;this version&lt;/a&gt; doesn't have these requirements (but do you really want to run a non-official version?). Uses WinPcap.&lt;/p&gt; &lt;h2&gt;Conclusion&lt;/h2&gt; &lt;p&gt;For now I'm going to go with &lt;a href="http://www.omnipeek.com/"&gt;OmniPeek Personal&lt;/a&gt; as a real swiss-army knife to investigate any problem. As a backup, I'll install &lt;a href="http://www.winpcap.org/"&gt;WinPcap&lt;/a&gt; ahead of time in case I want to run one of the other tools. :-)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-115906284371996189?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2006/09/network-analyzers-and-top-talkers-for.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-115904678900106026</guid><pubDate>Sat, 23 Sep 2006 21:26:00 +0000</pubDate><atom:updated>2006-09-23T14:26:29.006-07:00</atom:updated><title>Viewing your kernel mode device drivers</title><description>&lt;p&gt;Poor quality kernel mode device drivers can cause system instability or crashes. You can view the kernel mode device drivers used on your system by doing the following:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Start Menu -&amp;gt; Run -&amp;gt; msinfo32  &lt;li&gt;Go to System Summary -&amp;gt; Software Environment -&amp;gt; System Drivers&lt;/li&gt;&lt;/ul&gt; &lt;p align="center"&gt;&lt;a href="http://www.lowtek.com/blog/msinfo32-drivers.png"&gt;&lt;img src="http://www.lowtek.com/blog/msinfo32-drivers.png" width="400" height="244"&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-115904678900106026?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2006/09/viewing-your-kernel-mode-device.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-115904495207534384</guid><pubDate>Sat, 23 Sep 2006 20:55:00 +0000</pubDate><atom:updated>2006-09-23T13:55:52.080-07:00</atom:updated><title>Speed up your Internet by limiting your upload speed with WinTC</title><description>&lt;p&gt;Are you sick of reading bogus "speed up your Internet" tweaking instructions? Instead of bogus instructions, here's some actual &lt;em&gt;free &lt;/em&gt;techniques that can be &lt;em&gt;experimentally tested&lt;/em&gt; to see that they really work.&lt;/p&gt; &lt;p&gt;First, here's the benchmark that shows bad performance:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;On two of your machines hooked up to the Internet, upload a file on both machines. i.e. Send an email with a big file attached, upload a file to some web site, etc.  &lt;li&gt;While that's running on both machines, try to ping some close server on the Internet. For example, I ping a nearby university. You'll notice that the ping-times are 10x worse when both machines are uploading than when they're not uploading.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;The instructions below explain how to use &lt;a href="http://hp.vector.co.jp/authors/VA027031/wintc/"&gt;WinTC&lt;/a&gt; to limit the upload of the two machines so that your ping times will improve (i.e. when I do this, my ping times return back to their normal range even while the uploading is going on). Follow the instructions on both machines:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Follow &lt;a href="http://technet2.microsoft.com/WindowsServer/en/library/a9b9d7f3-ff08-4c49-b8a7-b92e9ce080101033.mspx?mfr=true"&gt;these instructions&lt;/a&gt; to install the QoS Packet Scheduler on your system. Most likely you already have this (you'll probably already see it listed when you follow the instructions).  &lt;li&gt;Download WinTC from &lt;a href="http://hp.vector.co.jp/authors/VA027031/wintc/"&gt;this site&lt;/a&gt;. Expand the files to somewhere convenient like %ProgramFiles%\wintc  &lt;li&gt;Run the following to create a NT Service on your machine that will apply the bandwidth rules we're about to configure:&lt;br&gt;wintc -kc  &lt;li&gt;Edit the wintc.conf file to have contents like the following:  &lt;p&gt; &lt;blockquote&gt; &lt;p&gt;# Uncomment this line if you only want this to apply&lt;br&gt;# to your first network adapter. You may need to&lt;br&gt;# use something like this if you have a network&lt;br&gt;# adapter that is disconnected. Run wintc -i&lt;br&gt;# to see the number-to-NIC mapping that&lt;br&gt;# WinTC uses.&lt;br&gt;#&lt;br&gt;#default_netif = 0&lt;br&gt;&lt;br&gt;# This limits all upload on the machine to 20K/sec.&lt;br&gt;# You may have to tweak this for your particular&lt;br&gt;#&amp;nbsp;connection.&lt;br&gt;define_flow = myflow 20K prio=3&lt;br&gt;define_filter = myfilter srcport=0/0&lt;br&gt;assign_filter = myfilter myflow&lt;/p&gt;&lt;/blockquote&gt; &lt;li&gt;Run services.msc and configure the WinTC service to Startup type: Manual if you don't want WinTC's bandwidth rules to automatically apply at startup.  &lt;li&gt;Run the following to start the WinTC service to enable its bandwidth control rules:&lt;br&gt;net start wintc  &lt;li&gt;Note that any error output will be saved to the event.log file in the directory where you put the WinTC files.  &lt;li&gt;When you want to disable WinTC's bandwidth control rules, just run:&lt;br&gt;net stop wintc&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Once you've got that setup on both machines, try the benchmark scenario described at the beginning of the document. If you don't see a major improvement, try reducing the upload until you see an improvement. Once you see an improvement, it's trivial to run "net stop wintc" and then see how the performance decreases in a few seconds. Then run "net start wintc" to re-enable the rules and watch performance increase, etc. etc.&lt;/p&gt; &lt;h5&gt;Further Tweaking Tips&lt;/h5&gt; &lt;ul&gt; &lt;li&gt;To make changes to the config, edit the wintc.conf file, then run net stop wintc, then net start wintc.  &lt;li&gt;To prevent from hosing yourself, you may want to write a small batch file that does the following:  &lt;p&gt; &lt;blockquote&gt; &lt;p&gt;net start wintc&lt;br&gt;sleep 30&lt;br&gt;net stop wintc&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;This will only use the WinTC rules for 30 seconds (presuming you have sleep.exe in your %PATH% :-)). Thus, if you write a bad rule that kills your network access, it'll only kill it for 30 seconds instead of permanently locking you out of your system. (Obviously, this is most useful when you don't have physical access to your machine where you're using the rules)&lt;/p&gt; &lt;li&gt;Don't forget to check event.log for any error messages.  &lt;li&gt;When the WinTC NT Service is running, run wintc -i -v for verbose information on what rules are in use.  &lt;li&gt;The sample wintc.conf file above limits all traffic, including LAN traffic. The wintc_en.txt file that comes with WinTC explains more advanced syntax to allow full-speed for LAN traffic, but to limit Internet traffic. &lt;li&gt;WinTC can also be used on web servers,&amp;nbsp;dedicated servers, colocation servers, etc. to limit bandwidth from excessive users, etc.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-115904495207534384?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2006/09/speed-up-your-internet-by-limiting.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-115881258223773233</guid><pubDate>Thu, 21 Sep 2006 04:23:00 +0000</pubDate><atom:updated>2006-09-23T12:57:22.093-07:00</atom:updated><title>Making Secure Network Connections with stunnel</title><description>&lt;p&gt;&lt;a href="http://stunnel.mirt.net/"&gt;Stunnel&lt;/a&gt; is a tool that allows one to encapsulate existing protocols in a secure tunnel. This is similar to how one can do&amp;nbsp;port forwarding with ssh.&amp;nbsp;In addition to preventing the tunnel from being eavesdropped upon, it can also require that both ends be authenticated (i.e. each side can only connect if it proves who it is). The following is a tutorial to secure an example&amp;nbsp;service on port 123 on Windows using stunnel.&lt;/p&gt; &lt;p&gt;On both machines:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Download the stunnel installer from &lt;a href="ftp://stunnel.mirt.net/stunnel/"&gt;this site&lt;/a&gt; and install it.  &lt;li&gt;Download OpenSSL from &lt;a href="ftp://stunnel.mirt.net/stunnel/openssl/"&gt;this site&lt;/a&gt; and copy it somewhere on your machine (i.e. put it in %ProgramFiles%\OpenSSL or somewhere convenient). Get the latest version you can find. You need openssl.exe, libeay32.dll, libssl32.dll, zlib1.dll, etc.  &lt;li&gt;Get a reasonable OpenSSL.cnf from somewhere, for example &lt;a href="http://tud.at/programm/openssl.cnf"&gt;this site&lt;/a&gt;. Save it to where you put OpenSSL.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;On the server&amp;nbsp;machine that has an unsecured service that you want to secure with stunnel:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Make a directory to contain stunnel configuration files.  &lt;li&gt;cd to the directory that contains OpenSSL.  &lt;li&gt;Run:&lt;br&gt;openssl req -config openssl.cnf -new -newkey rsa:1024 -days 3650 -nodes -x509 -keyout "&amp;lt;dir you made&amp;gt;\stunnel.server.pem" -out "&amp;lt;dir you made&amp;gt;\stunnel.server.pem"  &lt;li&gt;Answer the questions that it prompts you with. The data you enter will be stored in&amp;nbsp;the&amp;nbsp;certificate files you're making (and it'll be displayed in stunnel when you make connections with stunnel), so it is useful to make this text descriptive.  &lt;li&gt;In the directory that you created, create a stunnel.server.conf file with these contents:  &lt;p&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;cert = &amp;lt;full path to stunnel.server.pem file in the dir you made&amp;gt;  &lt;p&gt;&amp;nbsp;  &lt;p&gt;; Some performance tunings  &lt;p&gt;socket = l:TCP_NODELAY=1  &lt;p&gt;socket = r:TCP_NODELAY=1  &lt;p&gt;&amp;nbsp;  &lt;p&gt;verify = 3  &lt;p&gt;CAfile = &amp;lt;full path to stunnel.client.pem in the dir you made&amp;gt;  &lt;p&gt;&amp;nbsp;  &lt;p&gt;[myservice]&lt;br&gt;accept=124&lt;br&gt;connect=123&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The full paths must not be quoted and must not contain spaces. You may have to specify short-filenames like C:\docume~1\SomeUs~1\MyDocu~1\stunnel.client.pem, etc.&lt;/p&gt; &lt;li&gt;Make sure to block port 123 using your firewall so that no one can directly talk to the unencrypted service directly. Also, make sure to open up port 124&amp;nbsp;which is the port that stunnel will listen on.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;On the client machine that will connect to the server over the tunnel:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Make a directory to contain stunnel configuration files.  &lt;li&gt;cd to the directory that contains OpenSSL.  &lt;li&gt;Run:&lt;br&gt;openssl req -config openssl.cnf -new -newkey rsa:1024 -days 3650 -nodes -x509 -keyout "&amp;lt;dir you made&amp;gt;\stunnel.client.pem" -out "&amp;lt;dir you made&amp;gt;\stunnel.client.pem"  &lt;li&gt;Answer the questions that it prompts you with.  &lt;li&gt;In the directory that you created, create a stunnel.client.conf file with these contents:  &lt;p&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;cert = &amp;lt;full path to stunnel.client.pem file in the dir you made&amp;gt;  &lt;p&gt;&amp;nbsp;  &lt;p&gt;; Some performance tunings&lt;br&gt;socket = l:TCP_NODELAY=1&lt;br&gt;socket = r:TCP_NODELAY=1  &lt;p&gt;&amp;nbsp;  &lt;p&gt;verify = 3  &lt;p&gt;CAfile = &amp;lt;full path to stunnel.server.pem in the dir you made&amp;gt;  &lt;p&gt;&amp;nbsp;  &lt;p&gt;; Use it for client mode&lt;br&gt;client = yes  &lt;p&gt;&amp;nbsp;  &lt;p&gt;[myservice]&lt;br&gt;; this accept should be local only&lt;br&gt;accept = 127.0.0.1:123&lt;br&gt;connect = &amp;lt;hostname or IP addr of server machine&amp;gt;:124 &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Again, the full paths must not be quoted or have spaces.&lt;/p&gt; &lt;li&gt;Securely copy the stunnel.server.pem file you created on the other machine to this machine, and put it in the directory you created on this machine.  &lt;li&gt;Start stunnel.exe on the client with:&lt;br&gt;"%ProgramFiles%\stunnel\stunnel.exe" &amp;lt;full path to stunnel.client.conf&amp;gt;&lt;br&gt;Again, the full path must not be quoted or have spaces.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;On the server machine:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Securely copy the stunnel.client.pem file you created to the server machine and put it in the directory you created on that server machine.  &lt;li&gt;Start stunnel.exe on the server with:&lt;br&gt;"%ProgramFiles%\stunnel\stunnel.exe" &amp;lt;full path to stunnel.server.conf&amp;gt;&lt;br&gt;Again, the full path must not be quoted or have spaces.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Now everything is setup, so on the client machine you can just connect to localhost:123 and you'll really be connected to port 123 on the server machine, all via stunnel connections. &lt;/p&gt; &lt;h5&gt;Explanations&lt;/h5&gt; &lt;ul&gt; &lt;li&gt;By using verify=3 and specifying the CAfile options, it causes the server to validate the client and the client to validate the server. Only if they know each other (have each other's .pem files) is a connection made.  &lt;li&gt;Once you block port 123 on the server with your firewall, the only exposed port is port 124 on the server and it only allows encrypted communication with known clients.  &lt;li&gt;The way connecting works is your real client software connects to localhost:123. That is the 'client' instance of stunnel which connects to server:124 over an encrypted channel. Then the 'server' instance of stunnel connects unencrypted to server:123 (which is really on the same machine as the server).&lt;/li&gt;&lt;/ul&gt; &lt;h5&gt;Security Best Practices&lt;/h5&gt; &lt;ul&gt; &lt;li&gt;When running stunnel on the server, run it as a low-privileged user (i.e. non-Administrator).  &lt;li&gt;Configure the Windows Firewall to only allow connections to the stunnel server from specific IP addresses, if possible.  &lt;li&gt;When you don't need the tunnel up, don't run the stunnel server process.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-115881258223773233?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2006/09/making-secure-network-connections-with.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-115838654627138949</guid><pubDate>Sat, 16 Sep 2006 06:02:00 +0000</pubDate><atom:updated>2006-09-15T23:02:26.336-07:00</atom:updated><title>CPU Stress Tool Roundup</title><description>&lt;p&gt;When putting together a new machine, it's a good idea to stress test the CPU (including all its cores) and get it to generate as much heat as possible. Here's some tools I've used&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://users.bigpond.net.au/cpuburn/"&gt;CPU Burn-in&lt;/a&gt;&lt;br&gt;&lt;br&gt;This tool is specially designed to make the CPU emit as much heat as possible. Run one instance for each logical processor on your machine.&lt;br&gt;&amp;nbsp;  &lt;li&gt;&lt;a href="http://sp2004.fre3.com/beta/beta2.htm"&gt;Stress Prime 2004 Orthos Edition&lt;/a&gt;&lt;br&gt;&lt;br&gt;Prime95 is well-known to be a CPU stability stress tester. This is based on Prime95, but conveniently stresses all your logical processors in one package.&lt;br&gt;&amp;nbsp;  &lt;li&gt;&lt;a href="http://www.xtremesystems.com/pi/"&gt;Super PI Mod&lt;/a&gt;&lt;br&gt;&lt;br&gt;Yet another stress tool. &lt;a href="http://forums.anandtech.com/messageview.aspx?catid=28&amp;amp;threadid=1901991"&gt;Here's some same instructions&lt;/a&gt; on using it to stress multiple cores.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-115838654627138949?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2006/09/cpu-stress-tool-roundup.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-115838494517711335</guid><pubDate>Sat, 16 Sep 2006 05:35:00 +0000</pubDate><atom:updated>2006-09-15T22:35:45.240-07:00</atom:updated><title>Test your Web Server Performance with WCAT</title><description>&lt;p&gt;This is a quick tutorial on how to use WCAT to benchmark a web server. First, get the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=56fc92ee-a71a-4c73-b628-ade629c89499&amp;amp;DisplayLang=en"&gt;IIS 6.0 Resource Kit&lt;/a&gt; which includes the WCAT Client and Controller. Then, on your client machines that will help simulate load, do the following:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Install the Resource Kit you just downloaded (you don't need to install it on your web server).  &lt;li&gt;Run "%ProgramFiles%\IIS Resources\WCAT Client\client.reg" to tweak some TCP/IP registry settings that will enable the client machines to make &lt;em&gt;a lot&lt;/em&gt; of connections per second, etc. Again, you don't need to do this on the web server itself.  &lt;li&gt;Pick one of the client machines to be the "controller" and run the following on each machine (including the controller itself):&lt;br&gt;&lt;br&gt;cd /d "%ProgramFiles%\IIS Resources\WCAT Client"&lt;br&gt;clientloop.cmd &amp;lt;hostname or IP of controller machine&amp;gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;On the controller machine, create a script.ubr file with the following contents:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;[Configuration]&lt;br&gt;WarmupTime&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;5s&lt;br&gt;# Set this to the total number of client machines&lt;br&gt;NumClientMachines&amp;nbsp;&amp;nbsp; 2&lt;br&gt;MaxRecvBuffer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 64K&lt;br&gt;CooldownTime&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5s&lt;br&gt;ThinkTime&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;br&gt;# Set this to how many clients each actual&amp;nbsp;machine should simulate&lt;br&gt;NumClientThreads&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;br&gt;Duration&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30s&lt;br&gt;Comment&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; script.ubr script&lt;br&gt;CloseMethod&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RESET&lt;br&gt;ConnectEx&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TRUE&lt;br&gt;AsynchronousWait&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TRUE&lt;br&gt;&lt;br&gt;[Script]&lt;br&gt;# Try benchmarks with this TRUE or FALSE&lt;br&gt;SET KeepAlive = FALSE&lt;br&gt;SET Port = 80&lt;br&gt;&lt;br&gt;NEW TRANSACTION&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; classId = 1&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Weight = 100&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NEW REQUEST HTTP&lt;br&gt;# Set this to the file to request from the server&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;URL = "/"&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;To run the benchmark, run the following on the controller machine:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;"%ProgramFiles%\IIS Resources\WCAT Controller\wcctl.exe" -a &amp;lt;web server hostname or IP address&amp;gt; -z &amp;lt;path to script.ubr&amp;gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;During the test, information will be output from wcctl.exe and also on the client machines. When the test is complete, a summary will be written to "%ProgramFiles%\IIS Resources\WCAT Controller\wcctl.exe.log.log" on the controller machine.&lt;/p&gt; &lt;p&gt;Tips:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;To benchmark static file requests, but not using kernel caching, try accessing a directory URL like "/subdir/" instead of "/subdir/default.htm". Accessing "/subdir/" does not use kernel caching, but accessing "/subdir/default.htm" does use kernel caching. &lt;a href="http://support.microsoft.com/?id=817445"&gt;More info&lt;/a&gt;.  &lt;li&gt;When benchmarking ASP.NET, try with and without Page Output Caching. When benchmarking Page Output Caching, try changing the VaryByParam value.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-115838494517711335?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2006/09/test-your-web-server-performance-with.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-115830700060433145</guid><pubDate>Fri, 15 Sep 2006 07:56:00 +0000</pubDate><atom:updated>2008-12-26T15:52:10.224-08:00</atom:updated><title>Test your Network Performance with ntttcp</title><description>&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: ntttcp is available for download &lt;a href="http://www.microsoft.com/whdc/device/network/TCP_tool.mspx"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;This is a short tutorial on how to use the industry-standard ntttcp tool to bandwidth test a machine's network adapter (aka NIC), drivers, etc. I've used the process below to successfully test 100Mbps Fast Ethernet setups. The test simply simultaneously sends and receives data as fast as possible between two machines. With solid hardware and software, you should get pretty close to the theoretical max of 100Mbps both directions, simultaneously.&lt;/p&gt;  &lt;p&gt;First, obtain ntttcp from &lt;a href="http://www.microsoft.com/whdc/device/network/TCP_tool.mspx"&gt;this site&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Setup both of your machines, by doing the following on both:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Copy ntttcpr.exe and ntttcps.exe to the machine(ntttcpr.exe and ntttcps.exe are just renamed versions of the ntttcp_&amp;lt;arch&amp;gt;.exe file from the download above).&lt;/li&gt;    &lt;li&gt;Configure the Windows Firewall to allow incoming connections to ntttcpr.exe at least on your local subnet. &lt;/li&gt;    &lt;li&gt;Configure Task Manager's Networking tab to include the following columns:      &lt;ul&gt;       &lt;li&gt;Bytes Sent Throughput &lt;/li&gt;        &lt;li&gt;Bytes Received Throughput &lt;/li&gt;        &lt;li&gt;Bytes Sent/Interval &lt;/li&gt;        &lt;li&gt;Bytes Received/Interval&lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Run the following commands to get ntttcpr listening on each machine:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;On machine A, run:      &lt;ul&gt;       &lt;li&gt;ntttcpr -p 5001 -w -m 1,0,&amp;lt;ip of machine A&amp;gt; -v -a 4 &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;On machine B, run:      &lt;ul&gt;       &lt;li&gt;ntttcpr -p 5101 -w -m 1,0,&amp;lt;ip of machine B&amp;gt; -v -a 4&lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Start the following commands approximately simultaneously on both machines to start the test:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;On machine A, run:      &lt;ul&gt;       &lt;li&gt;ntttcps -p 5101 -w -m 1,0,&amp;lt;ip of machine B&amp;gt; -v -a 4 &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;On machine B, run:      &lt;ul&gt;       &lt;li&gt;ntttcps -p 5001 -w -m 1,0,&amp;lt;ip of machine A&amp;gt; -v -a 4&lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;TIP&lt;/strong&gt;: When running ntttcps.exe, make sure you don't run it by giving a complex, full-path.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;In other words, when running it, don't run it with a command line like the following:&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &amp;quot;C:\dir with spaces\ntttcps.exe&amp;quot; -p 5001 ... &amp;lt;other args&amp;gt;&lt;/p&gt;    &lt;p&gt;Instead, try to run it with something simpler like:&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; ntttcps -p 5001 ... &amp;lt;other args&amp;gt;&lt;/p&gt;    &lt;p&gt;If you run it with a complex, full-path, you may encounter a bug in ntttcps where it thinks it is ntttcpr and it won't run correctly.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Anyway, while the commands are running, view Task Manager's Networking tab. Both &amp;quot;Bytes Sent Throughput&amp;quot; and &amp;quot;Bytes Received Throughput&amp;quot; should be at least 80-95% for each. Similarly, the &amp;quot;Bytes Sent/Interval&amp;quot; and &amp;quot;Bytes Received/Interval&amp;quot; should be at least 10,000,000 bytes each (for 100Mbps Fast Ethernet).&lt;/p&gt;  &lt;p&gt;I was able to get such performance with cheap commodity machines, network cards, and network switches. On one machine, I could get about 85% throughput receiving, but only 25% throughput sending, when sending and receiving simultaneously. Needless to say, I switched to a better network adapter. :-)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-115830700060433145?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2006/09/test-your-network-performance-with.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-115795348988432853</guid><pubDate>Mon, 11 Sep 2006 05:44:00 +0000</pubDate><atom:updated>2006-09-10T22:44:53.816-07:00</atom:updated><title>Newegg's reasonable customer service refunds me $5</title><description>&lt;p&gt;The other day I ordered two &lt;a href="http://www.newegg.com/Product/Product.asp?Item=N82E16822148144"&gt;Seagate 250GB SATA drives&lt;/a&gt; from &lt;a href="http://www.newegg.com/"&gt;Newegg.com&lt;/a&gt; for $79.99 each, but I forgot to use the &lt;a href="http://www.fatwallet.com/t/18/635806/"&gt;BUYBARRACUDA&lt;/a&gt; discount code which takes $5 off the order. I contacted Newegg Customer Support via their web site and told them that I've been a customer since 2001, plus I've spent over $1,000 at Newegg, including&amp;nbsp;the $1,000 order where I bought the drives.&lt;/p&gt; &lt;p&gt;A few hours later, they emailed me back telling me that they'd refund $5 to my credit card! Thanks Newegg!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-115795348988432853?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2006/09/neweggs-reasonable-customer-service.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-115793248896379587</guid><pubDate>Sun, 10 Sep 2006 23:54:00 +0000</pubDate><atom:updated>2006-09-10T16:54:48.990-07:00</atom:updated><title>Diagnosing a hung system with Windows Server 2003's Emergency Management Services</title><description>&lt;p&gt;The other day I setup &lt;a href="http://technet2.microsoft.com/WindowsServer/en/library/3a7d4464-75f1-41df-93d8-d3fb705ccbd01033.mspx?mfr=true"&gt;Emergency Management Services&lt;/a&gt; on one of my machines. The idea is that you connect your machine to another machine via their COM ports, using a null modem cable. Then, from the other machine you can type in some limited commands when the system becomes unresponsive via normal routes (i.e. Remote Desktop/Terminal Services).&lt;/p&gt; &lt;p&gt;The OS setup involves using &lt;a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;317521"&gt;bootcfg.exe&lt;/a&gt; to edit the boot.ini file to add a few switches. Once that is setup, when you boot the OS, the following will come over the serial port:&lt;/p&gt; &lt;blockquote&gt;&lt;pre&gt;&lt;p&gt;Computer is booting, SAC started and initialized.&lt;p&gt;&lt;br /&gt;&lt;p&gt;Use the "ch -?" command for information about using channels.&lt;br&gt;Use the "?" command for general help. &lt;br /&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;SAC&amp;gt;&lt;br&gt;EVENT: The CMD command is now available.&lt;br&gt;SAC&amp;gt;&lt;/p&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;Enter ? and press return for help:&lt;/p&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;p&gt;SAC&amp;gt;?&lt;br&gt;ch                   Channel management commands. Use ch -? for more help.&lt;br&gt;cmd                  Create a Command Prompt channel.&lt;br&gt;d                    Dump the current kernel log.&lt;br&gt;f                    Toggle detailed or abbreviated tlist info.&lt;br&gt;?                    or help Display this list.&lt;br&gt;i                    List all IP network numbers and their IP addresses.&lt;br&gt;i &amp;lt;#&amp;gt; &amp;lt;ip&amp;gt; &amp;lt;subnet&amp;gt; &amp;lt;gateway&amp;gt; Set IP addr., subnet and gateway.&lt;br&gt;id                   Display the computer identification information.&lt;br&gt;k &amp;lt;pid&amp;gt;              Kill the given process.&lt;br&gt;l &amp;lt;pid&amp;gt;              Lower the priority of a process to the lowest possible.&lt;br&gt;lock                 Lock access to Command Prompt channels.&lt;br&gt;m &amp;lt;pid&amp;gt; &amp;lt;MB-allow&amp;gt;   Limit the memory usage of a process to &amp;lt;MB-allow&amp;gt;.&lt;br&gt;p                    Toggle paging the display.&lt;br&gt;r &amp;lt;pid&amp;gt;              Raise the priority of a process by one.&lt;br&gt;s                    Display the current time and date (24 hour clock used).&lt;br&gt;s mm/dd/yyyy hh:mm   Set the current time and date (24 hour clock used).&lt;br&gt;t                    Tlist.&lt;br&gt;restart              Restart the system immediately.&lt;br&gt;shutdown             Shutdown the system immediately.&lt;br&gt;crashdump            Crash the system. You must have crash dump enabled.&lt;/p&gt;&lt;p&gt;SAC&amp;gt;&lt;/p&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;At this point during my investigation my machine was inaccessible from the network, so I entered 'i' for IP address info:&lt;/p&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;SAC&amp;gt;i&lt;br&gt;Could not retrieve IP Address(es).&lt;p&gt;&lt;/p&gt;&lt;/pre&gt;&lt;/blockquote&gt;Hmm, that was really suspicious because a few minutes ago I was successfully using Remote Desktop with the machine. So then I figured I'd try to get a Command Prompt on the machine to do further diagnosis: &lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;p&gt;SAC&amp;gt;cmd&lt;br&gt;The Command Prompt session was successfully launched.&lt;br&gt;SAC&amp;gt;&lt;br&gt;EVENT: A new channel has been created. Use "ch -?" for channel help.&lt;br&gt;Channel: Cmd0001&lt;br&gt;SAC&amp;gt; &lt;/p&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;So far so good. To access the "new channel", I pressed &amp;lt;esc&amp;gt;&amp;lt;tab&amp;gt;, which showed the following: &lt;/p&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;p&gt;Name:                  Cmd0001&lt;br&gt;Description:           Command Prompt&lt;br&gt;Type:                  VT-UTF8&lt;br&gt;Channel GUID:          ead5a758-408c-11db-998c-0030485adfcb&lt;br&gt;Application Type GUID: 63d02271-8aa4-11d5-bccf-00b0d014a2d0 &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Press &amp;lt;esc&amp;gt;&amp;lt;tab&amp;gt; for next channel.&lt;br&gt;Press &amp;lt;esc&amp;gt;&amp;lt;tab&amp;gt;0 to return to the SAC channel.&lt;br&gt;Use any other key to view this channel. &lt;/p&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;Then I pressed some key on my keyboard so that I could "view this channel". It allowed me to enter credentials:&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;p&gt;Please enter login credentials.&lt;br&gt;Username: Administrator&lt;br&gt;Domain :&lt;br&gt;Password: ******** &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Attempting to authenticate... &lt;/p&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;But then it displayed: &lt;/p&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;p&gt;The Command Console session is exiting. &lt;/p&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;??? Very strange. At this point, I thought I was stuck, so I entered "restart" to reboot the system: &lt;/p&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;p&gt;SAC&amp;gt;restart&lt;br&gt;SAC&amp;gt;SAC failed to restart the system.&lt;br&gt;Failed with status 0xC000009A. &lt;/p&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;Yikes, what is going on? It sounds like 0xC000009A means &lt;a href="http://support.microsoft.com/?kbid=142719"&gt;out of paged pool&lt;/a&gt;. So I ran the 't' command to get more info: &lt;/p&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;p&gt;SAC&amp;gt;t&lt;br&gt;memory: 2095456 kb uptime: 0 0:20:20.609 &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;PageFile: \??\C:\pagefile.sys&lt;br&gt;        Current Size: 2095104 kb  Total Used:   3528 kb   Peak Used  36040 kb &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt; Memory:2095456K Avail:1527800K  TotalWs: 323948K InRam Kernel: 1720K P: 9372K&lt;br&gt; Commit: 417392K/ 253420K Limit:4039728K Peak: 486732K  Pool N:&lt;strong&gt;&lt;font color="#0000ff"&gt;259904K&lt;/font&gt;&lt;/strong&gt; P: 9792K &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    User Time   Kernel Time    Ws   Faults  Commit Pri Hnd Thd  Pid Name&lt;br&gt;                            32864    44048                          File Cache&lt;br&gt;  0:00:00.000   0:13:18.484    28        0       0   0   0   2    0 Idle Process&lt;br&gt;  0:00:00.000   0:00:24.968   236     4626      28   8 372  68    4 System&lt;br&gt;  0:00:00.000   0:00:00.062   452      181     124  11  20   2  536 smss.exe&lt;br&gt;  0:00:00.078   0:00:00.484  3200     1438    1600  13 361  12  624 csrss.exe&lt;br&gt;  0:00:00.109   0:00:00.390  8580     2587    6032  13 476  20  664 winlogon.exe&lt;br&gt;  0:00:00.093   0:00:00.484  3328      966    1496   9 285  16  708 services.exe&lt;br&gt;  0:00:00.093   0:00:00.203  6764     1904    6900   9 393  25  720 lsass.exe&lt;br&gt;  0:00:00.015   0:00:00.000  2524      696     840   8  79   5  900 svchost.exe&lt;br&gt;  0:00:00.359   0:00:00.453  3172      859    1224   8 207  10  984 svchost.exe&lt;br&gt;  0:00:00.000   0:00:00.031  4328     1354    3732   8 133   7 1084 svchost.exe&lt;br&gt;  0:00:00.031   0:00:00.015  4792     1222    2912   8 156  13 1168 svchost.exe&lt;br&gt;  0:00:07.609   0:01:33.750&lt;strong&gt;&lt;font color="#0000ff"&gt;205392&lt;/font&gt;&lt;/strong&gt;    58331  200384   8 909  69 1184 svchost.exe&lt;br&gt;  0:00:00.000   0:00:00.015  4384     1250    3428   8 127  14 1712 spoolsv.exe&lt;br&gt;  0:00:00.015   0:00:00.031  3892     1123    1604   8 149  13 1736 msdtc.exe&lt;br&gt;  0:00:00.000   0:00:00.000  2036      505     524   8  56   2 1876 svchost.exe&lt;br&gt;  0:00:00.000   0:00:00.000  1616      397     368   8  96   3 1912 IAANTmon.exe&lt;br&gt;  0:00:00.000   0:00:00.000  1284      358     300   8  39   2 1956 svchost.exe&lt;br&gt;  0:00:00.000   0:00:02.546  3972     1044    1348   8  64   3 2040 NTService.exe&lt;br&gt;  0:00:00.015   0:00:00.140  4520     1470    2556   8 165  24  488 svchost.exe&lt;br&gt;  0:00:00.000   0:00:00.000  2696      706     740   8  75   6  212 alg.exe&lt;br&gt;  0:00:00.015   0:00:00.046  4384     1572    2464   8 119   4  432 wmiprvse.exe&lt;br&gt;  0:00:00.109   0:00:00.031  4948     1510    1724   8 162   4 1232 wmiprvse.exe&lt;br&gt;  0:00:00.453   0:00:00.359 12980     7658   12724   8 275  13 3716 HelpSvc.exe&lt;br&gt;  0:00:00.000   0:00:00.015  1576      388     368   4  16   1 3380 logon.scr&lt;/p&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;Note the huge non-paged pool size of 259904K. It's no wonder networking doesn't work and I can't even create a new cmd.exe process on the machine. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;At this point, I should have typed "crashdump" to take a full memory dump of the system to analyze later, but I forgot about that and instead I powercycled the system. :-) &lt;/p&gt;&lt;br /&gt;&lt;p&gt;But at least now I know what to look for and what to do next time.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-115793248896379587?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2006/09/diagnosing-hung-system-with-windows.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-115792726698401651</guid><pubDate>Sun, 10 Sep 2006 22:27:00 +0000</pubDate><atom:updated>2006-09-10T15:27:47.043-07:00</atom:updated><title>Logon to the Console to use Intel PROSet software in Device Manager</title><description>&lt;p&gt;&lt;strong&gt;TIP&lt;/strong&gt;: To use the &lt;a href="http://support.intel.com/support/network/sb/cs-006120.htm"&gt;Intel PROSet software&lt;/a&gt; for an Intel Networking Adapter (NIC), logon to the &lt;em&gt;console &lt;/em&gt;of the machine. If you're logging in via Remote Desktop (aka Terminal Services), pass the /console option to mstsc.exe to logon to the console session.&lt;/p&gt; &lt;p&gt;If you logon to a regular (non-console) Remote Desktop session, and go to Control Panel -&amp;gt; System -&amp;gt; Device Manager -&amp;gt; Network Adapters -&amp;gt; Intel(R) PRO/xxxx Network connection, it will display the following:&lt;/p&gt; &lt;p align="center"&gt;&lt;img src="http://www.lowtek.com/blog/intel-nic/intel-nic-non-console.png"&gt;&lt;/p&gt; &lt;p&gt;If instead you pass /console to mstsc.exe when logging in via Remote Desktop, you'll connect to the special console session and the&amp;nbsp;Intel PROSet software will be available:&lt;/p&gt; &lt;p align="center"&gt;&lt;img src="http://www.lowtek.com/blog/intel-nic/intel-nic-console.png"&gt;&lt;/p&gt; &lt;p&gt;This seems a lot easier and safer than &lt;a href="http://www.intel.com/support/network/sb/CS-020166.htm"&gt;this other solution&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-115792726698401651?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2006/09/logon-to-console-to-use-intel-proset.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-115753010396651757</guid><pubDate>Wed, 06 Sep 2006 08:08:00 +0000</pubDate><atom:updated>2006-09-06T01:09:44.006-07:00</atom:updated><title>Slipstreaming Windows Server 2003 SP1</title><description>&lt;p&gt;Here's a &lt;a href="http://www.petri.co.il/windows_2003_sp1_slipstreaming.htm"&gt;good guide&lt;/a&gt; on slipstreaming SP1 into Windows Server 2003, making a new CD that will directly install Windows Server 2003 SP1 (which is somewhat different than just installing Windows Server 2003 and applying SP1 afterwards).&lt;/p&gt; &lt;p&gt;A few tips I would add:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Update the Support Tools on the CD by getting the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=6EC50B78-8BE1-4E81-B3BE-4E7AC4F0912D&amp;amp;displaylang=en"&gt;Windows Server 2003 SP1 Support Tools&lt;/a&gt;.&lt;br&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;Update the Deployment Tools on the CD by getting the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=a34edcf2-ebfd-4f99-bbc4-e93154c332d6&amp;amp;DisplayLang=en"&gt;Windows Server 2003 SP1 Deployment Tools&lt;/a&gt;.&lt;br&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;To make a bootable CD, use &lt;a href="http://www.isobuster.com/"&gt;IsoBuster&lt;/a&gt; in conjunction with &lt;a href="http://www.nero.com"&gt;Nero&lt;/a&gt; (which probably already came with your burner) by following &lt;a href="http://www.theeldergeek.com/slipstreamed_xpsp2_cd.htm"&gt;these instructions&lt;/a&gt;. The instructions are for Windows XP SP2, but the bootable CD instructions work for Windows Server 2003 as well.&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-115753010396651757?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2006/09/slipstreaming-windows-server-2003-sp1.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-115196922000570994</guid><pubDate>Mon, 03 Jul 2006 23:20:00 +0000</pubDate><atom:updated>2006-07-03T17:12:38.046-07:00</atom:updated><title>Secret Dell hard drive diagnostics in the BIOS</title><description>My drive started to fail in my Dell PowerEdge 400SC, so Dell shipped me a new drive. I installed it and Dell Support told me to &lt;strong&gt;boot-up and repeatedly press Ctrl-Alt-D&lt;/strong&gt;. Apparently this runs some sort of built-in BIOS hard drive diagnostics.&lt;br /&gt;&lt;br /&gt;In my case, it happened to print out &lt;strong&gt;"Fail. Return Code: 4"&lt;/strong&gt;. The tech explained that this means "electrical failure".&lt;br /&gt;&lt;br /&gt;I sent back the two bad drives, Dell shipped me a new one and it seems to be running fine. If this happens again on another Dell, I'll be sure to run Ctrl-Alt-D to start...&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: Looks like this is briefly documented &lt;a href="http://support.dell.com/support/topics/global.aspx/support/dsn/en/document?c=us&amp;l=en&amp;amp;s=gen&amp;dn=1030780#3"&gt;here&lt;/a&gt;. I didn't find a list of return codes, but &lt;a href="http://forums.us.dell.com/supportforums/board/message?board.id=oplex_harddrive&amp;amp;message.id=8052&amp;query.id=0&amp;amp;c=us&amp;l=en&amp;amp;cs=&amp;amp;s=gen"&gt;Return Code 7 seems to mean "bad tracks or sectors"&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-115196922000570994?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2006/07/secret-dell-hard-drive-diagnostics-in.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-115196641124323266</guid><pubDate>Mon, 03 Jul 2006 22:13:00 +0000</pubDate><atom:updated>2006-07-04T09:41:00.403-07:00</atom:updated><title>Memory tester software roundup</title><description>I recently got 2 sticks of 1GB memory for my system so the first thing I did was test it using some free memory testing software. I'm too paranoid, so I didn't want to rely on a single app, so I tried the following:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://oca.microsoft.com/en/windiag.asp"&gt;Windows Memory Diagnostic&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.lowtek.com/blog/memorytest/wmd.png"&gt;&lt;img src="http://www.lowtek.com/blog/memorytest/wmd.png" width="425" height="266" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Direct from Microsoft's Online Crash Analysis team. My guess is that these guys spend all day long looking at uploaded Watson blue-screen dumps and they've figured out "patterns" in crashes due to flaky memory.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.memtest86.com/"&gt;Memtest86&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.lowtek.com/blog/memorytest/memtest86.png"&gt;&lt;img src="http://www.lowtek.com/blog/memorytest/memtest86.png" width="425" height="266" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Popular GPL memory testing software. One cool feature is that it'll tell you whether your memory is running in Dual Channel, whether PAT is enabled, etc. Though the screen-shot above doesn't show that probably because the screen-shot is from a virtual machine.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.memtest.org/"&gt;Memtest86+&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.lowtek.com/blog/memorytest/memtest86plus.png"&gt;&lt;img src="http://www.lowtek.com/blog/memorytest/memtest86plus.png" width="425" height="266" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;An updated version of memtest86 by more contributors.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.simmtester.com/PAGE/products/doc/docinfo.asp"&gt;DocMemory&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Years ago I used this software to detect some bad memory. I tried it again and it didn't seem to work right anymore (i.e. bizarre errors that didn't seem to be related to my memory). In fact, it even gave errors in a virtual machine.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-115196641124323266?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2006/07/memory-tester-software-roundup.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-115174266629723340</guid><pubDate>Sat, 01 Jul 2006 08:25:00 +0000</pubDate><atom:updated>2008-12-26T15:29:48.919-08:00</atom:updated><title>CTU Newhire Guide to Opening a Socket</title><description>&lt;p&gt;&lt;strong&gt;NOTE: &lt;/strong&gt;&lt;a href="http://www.lowtek.com/blog/2008/12/myspace-account-hacking.html"&gt;&lt;strong&gt;See this post for information on MySpace Account Hacking&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In &lt;a href="http://www.fox.com/24/"&gt;FOX's 24&lt;/a&gt;, whenever &lt;a href="http://www.fox.com/24/character/"&gt;Jack Bauer&lt;/a&gt; is in a pinch, resident techgeek &lt;a href="http://www.fox.com/24/character/cb.htm"&gt;Chloe O'Brien&lt;/a&gt; has to &amp;quot;&lt;strong&gt;open a socket&lt;/strong&gt;&amp;quot; or &amp;quot;&lt;strong&gt;open up a socket to the server&lt;/strong&gt;&amp;quot;. &lt;strong&gt;&lt;span style="color: rgb(0,153,0)"&gt;What does it all mean?&lt;/span&gt;&lt;/strong&gt;    &lt;br /&gt;    &lt;br /&gt;Well, I've been doing &amp;quot;network programming&amp;quot; (i.e. writing software that uses the Internet) since the 90's (I even have a &lt;a href="http://www.lowtek.com/sockets/"&gt;web site&lt;/a&gt; about it) and I'm here to set everyone straight.    &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: 130%; color: rgb(0,153,0)"&gt;Sockets, schmockets, what's the deal?&lt;/span&gt;&lt;/strong&gt;    &lt;br /&gt;    &lt;br /&gt;Just like a house has multiple &lt;strong&gt;phone numbers&lt;/strong&gt; for multiple land-lines (in a chatty house, one for uncle Bob, one for little Jimmy, one for grandma, etc.), a computer has multiple numbered &amp;quot;&lt;strong&gt;ports&lt;/strong&gt;&amp;quot;. For example, port 80 is often used for web sites.    &lt;br /&gt;    &lt;br /&gt;When you make a phone call, you just pick up the phone and call someone's number. With computer &amp;quot;ports&amp;quot;, you can't just contact a port on someone's computer -- they also have to be &amp;quot;&lt;strong&gt;listening&lt;/strong&gt;&amp;quot; on that port. The way I think about it, the moment you plugin your phone handset into the wall, your phone is &amp;quot;listening&amp;quot;. This web site you're reading right now has a web server program that is &amp;quot;listening&amp;quot; on port 80.    &lt;br /&gt;    &lt;br /&gt;So how did your computer &amp;quot;call&amp;quot; this web site to download this page that you're reading right now?    &lt;br /&gt;    &lt;br /&gt;&lt;strong&gt;&lt;span style="color: rgb(0,153,0)"&gt;Believe it or not, but the first thing it did was &amp;quot;open a socket&amp;quot;. I kid you not.&lt;/span&gt;&lt;/strong&gt;    &lt;br /&gt;    &lt;br /&gt;Opening a socket is basically like picking up the phone handset to hear the dialtone. It's all just software bookkeeping on your local computer, until the next step:    &lt;br /&gt;    &lt;br /&gt;The next thing your computer (your browser, really) did, was to &amp;quot;&lt;strong&gt;connect&lt;/strong&gt;&amp;quot; that open socket to the listening port on my web site. This is basically the equivalent of connecting the phone call.    &lt;br /&gt;    &lt;br /&gt;Once the socket connection is made, data can be transferred both ways. i.e. your computer requests a specific page, then this web site sends the page.    &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: 130%; color: rgb(0,153,0)"&gt;Socket Cheatsheet&lt;/span&gt;&lt;/strong&gt;    &lt;br /&gt;    &lt;br /&gt;To summarize:    &lt;br /&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Phone number = computer port number     &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Plugging in phone handset into wall = program listening on a port     &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Picking up the phone handset = opening a socket     &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Dialing the phone = connecting the socket     &lt;br /&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: 130%; color: rgb(0,153,0)"&gt;So what does the show &lt;em&gt;really&lt;/em&gt; mean when they open a socket?&lt;/span&gt;&lt;/strong&gt;  &lt;br /&gt;  &lt;br /&gt;My guess is that the writers wanted something cryptic sounding, yet still based in reality. The good thing about using the phrase &amp;quot;socket&amp;quot; is that because sockets are fairly &amp;quot;low level&amp;quot;, they don't really imply anything about what you do with them, in the same sense that who knows what people do with phones (i.e. ask for Mom's apple pie recipe, or find the hours of a store, etc.).  &lt;br /&gt;  &lt;br /&gt;Of course, now that I've explained what &amp;quot;opening a socket&amp;quot; is, it just isn't as cryptic anymore. I'd suggest to the writers that they try something even more cryptic, yet still based in reality like this:  &lt;br /&gt;  &lt;br /&gt;  &lt;blockquote&gt;&lt;strong&gt;&lt;span style="color: rgb(102,51,255)"&gt;CTU newbie&lt;/span&gt;&lt;/strong&gt;: I can't get it to work.    &lt;br /&gt;&lt;strong&gt;&lt;span style="color: rgb(255,0,0)"&gt;Chloe&lt;/span&gt;&lt;/strong&gt;: You probably forgot to &lt;strong&gt;&lt;em&gt;bind&lt;/em&gt;&lt;/strong&gt; your socket.    &lt;br /&gt;(Chloe shoots the newbie &lt;em&gt;that&lt;/em&gt; &amp;quot;lamer&amp;quot; look.)&lt;/blockquote&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: 130%; color: rgb(0,153,0)"&gt;Who wants to open a socket?&lt;/span&gt;&lt;/strong&gt;    &lt;br /&gt;    &lt;br /&gt;Everyone who uses the Internet opens up plenty of sockets, but it's all sort of hidden with complex software like browsers, etc. Anyone like Chloe would do something way more hardcore like... before I ramble on, does anyone want to see how to do these things hardcore? Drop me a comment and I'll write-up another part to this guide.    &lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;    &lt;br /&gt;    &lt;br /&gt;&lt;strong&gt;&lt;span style="color: rgb(255,0,0)"&gt;A Note to Hardcore Socket Programmers&lt;/span&gt;&lt;/strong&gt;    &lt;br /&gt;    &lt;br /&gt;Before someone comes down from Division or the Department of Homeland Security to escort me away, yes, I've omitted tons of details above like: IP addresses, binding, the socket used for listening, the socket returned from accept(), TCP vs. UDP, HTTP, protocols, how TCP works, etc., etc. Though I did try to use terminology like &amp;quot;listen&amp;quot; and &amp;quot;connect&amp;quot; based on the BSD socket APIs of the same names. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-115174266629723340?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2006/07/ctu-newhire-guide-to-opening-socket.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-115164956206655741</guid><pubDate>Fri, 30 Jun 2006 06:08:00 +0000</pubDate><atom:updated>2006-06-29T23:42:14.183-07:00</atom:updated><title>Use Remote Desktop to trick Virtual PC and Virtual Server into using USB smartcards</title><description>&lt;strong&gt;&lt;span style="color:#009900;"&gt;Summary&lt;/span&gt;&lt;/strong&gt;: Microsoft &lt;a href="http://www.microsoft.com/windows/virtualpc/default.mspx"&gt;Virtual PC&lt;/a&gt; and &lt;a href="http://www.microsoft.com/windowsserversystem/virtualserver/default.mspx"&gt;Virtual Server&lt;/a&gt; say that they don't work with USB smartcards, but you can trick it to work by using &lt;a href="http://www.microsoft.com/windowsxp/using/mobility/getstarted/remoteintro.mspx"&gt;Remote Desktop&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The Microsoft site &lt;a href="http://www.microsoft.com/windows/virtualpc/evaluation/bizoverview.mspx"&gt;says the following&lt;/a&gt; about Virtual PC 2004:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Standard USB input devices such as keyboards and mice are supported through PS/2 emulation, but Virtual PC does not support USB devices that require their own drivers.&lt;/blockquote&gt;&lt;br /&gt;Similarly, about Virtual Server 2005, &lt;a href="http://www.microsoft.com/windowsserversystem/virtualserver/evaluation/virtualizationfaq.mspx"&gt;it says&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Virtual Server currently does not support USB hardware such as smart card readers and scanners. However, standard USB input hardware, such as keyboard and pointing devices, are supported.&lt;/blockquote&gt;&lt;br /&gt;Although it may be true that Virtual PC and Virtual Server don't directly support USB smartcards, you can work-around this issue by doing the following: &lt;ol&gt;&lt;li&gt;In the &lt;em&gt;Guest OS&lt;/em&gt; virtual machine (i.e. inside &lt;em&gt;The Matrix&lt;/em&gt; if you know what I mean), go into the &lt;strong&gt;System&lt;/strong&gt; control panel, &lt;strong&gt;Remote&lt;/strong&gt; tab and enable &lt;strong&gt;Remote Desktop&lt;/strong&gt;. You'll also need to make sure any firewall in the Guest OS allows port 3389 (Remote Desktop). The System control panel automatically configures the Windows Firewall appropriately.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;In your real &lt;em&gt;Host OS&lt;/em&gt;, run &lt;strong&gt;Start Menu -&gt; All Programs -&gt; Accessories -&gt; Communications -&gt; Remote Desktop Connection&lt;/strong&gt;, or run &lt;strong&gt;&lt;span style="font-family:courier new;"&gt;mstsc.exe&lt;/span&gt;&lt;/strong&gt; from the command line.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Enter in the hostname or IP address of the Guest OS virtual machine.&lt;br /&gt;&lt;br /&gt;&lt;div style="TEXT-ALIGN: center"&gt;&lt;img src="http://www.lowtek.com/blog/virtualsmartcard/mstsc.png" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Click &lt;strong&gt;Options&lt;/strong&gt;, then click the &lt;strong&gt;Local Resources&lt;/strong&gt; tab and make sure there's a checkbox next to "&lt;strong&gt;Smart cards&lt;/strong&gt;".&lt;br /&gt;&lt;br /&gt;&lt;div style="TEXT-ALIGN: center"&gt;&lt;img src="http://www.lowtek.com/blog/virtualsmartcard/mstsc-smartcard.png" /&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Click &lt;strong&gt;Connect&lt;/strong&gt;, login to the Guest OS and run apps, etc. that use your smartcard via the Remote Desktop connection.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-115164956206655741?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2006/06/use-remote-desktop-to-trick-virtual-pc.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-115153485199689138</guid><pubDate>Wed, 28 Jun 2006 22:44:00 +0000</pubDate><atom:updated>2006-06-28T21:00:57.346-07:00</atom:updated><title>Debugging the Internet Explorer View Source problem with Fiddler and fixing ASP.NET</title><description>&lt;strong&gt;&lt;span style="color:#009900;"&gt;Summary&lt;/span&gt;&lt;/strong&gt;: This article shows how to figure out why Internet Explorer's View Source command didn't work on an XML document, how it was debugged using &lt;a href="http://www.fiddlertool.com"&gt;Fiddler&lt;/a&gt;, and the ASP.NET fix.&lt;br /&gt;&lt;br /&gt;You ever try "View Source" on an XML document and get this dialog box that says "The XML source file is unavailable for viewing."?&lt;br /&gt;&lt;br /&gt;&lt;div style="TEXT-ALIGN: center"&gt;&lt;img src="http://www.lowtek.com/blog/viewsource/ie-dialog.png" /&gt;&lt;/div&gt;&lt;br /&gt;I got this while creating an ASP.NET page that was outputting RSS. I ran &lt;a href="http://www.fiddlertool.com"&gt;Fiddler&lt;/a&gt; and spied on what the web server was returning:&lt;br /&gt;&lt;br /&gt;&lt;div style="TEXT-ALIGN: center"&gt;&lt;a href="http://www.lowtek.com/blog/viewsource/fiddler.png"&gt;&lt;img src="http://www.lowtek.com/blog/viewsource/fiddler.png" width=400 height=370 /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I didn't really see anything wrong with the output, so the next step was Process of Elimination to try removing HTTP headers until the problem didn't occur anymore. So I chose &lt;strong&gt;Rules -&gt; Automatic Breakpoints -&gt; After Responses&lt;/strong&gt; from Fiddler's menus. This causes Fiddler to break-in and effectively pause the HTTP session so that you can change the response before the browser gets it:&lt;br /&gt;&lt;br /&gt;&lt;div style="TEXT-ALIGN: center"&gt;&lt;a href="http://www.lowtek.com/blog/viewsource/fiddler-breakpoint.png"&gt;&lt;img src="http://www.lowtek.com/blog/viewsource/fiddler-breakpoint.png" width=425 height=340 /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Eventually, I tried deleting the &lt;strong&gt;Vary: *&lt;/strong&gt; HTTP header by selecting it, right-clicking, and choosing "&lt;strong&gt;Remove Header&lt;/strong&gt;". This was the header causing the problem! I did a quick check around various RSS feeds on the Internet and I didn't see any that used this header. For the detailed info on what this header is for, see &lt;a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.44"&gt;the HTTP spec&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It seems that ASP.NET was outputting this Vary: * HTTP header because I used the following in my page:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;%@ Page Language="C#" CodeFile="t.aspx.cs" Inherits="t_aspx" %&amp;gt;&lt;br /&gt;&amp;lt;%@ OutputCache Duration="300" &lt;span style="color:#009900;"&gt;&lt;strong&gt;VaryByParam="*"&lt;/strong&gt;&lt;/span&gt; %&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;The reason I used VaryByParam="*" was because my page is dependent on all of the QueryString parameters.&lt;br /&gt;&lt;br /&gt;Eventually, after digging around, I found these two pieces of documentation:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.configuration.outputcachesection.omitvarystar.aspx"&gt;The OmitVaryStar OutputCache configuration setting&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.httpcachepolicy.setomitvarystar.aspx"&gt;The HttpCachePolicy.SetOmitVaryStart method&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;So if you put the following in your ASP.NET web.config file, it will no longer output the Vary: * header and then your cached XML output will be View Source-able in Internet Explorer.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br /&gt;&amp;lt;configuration&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;system.web&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;caching&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;!-- Don't send the Vary: * HTTP header when&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;VaryByParam="*" is used because IE&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;does not cache pages with Vary: *&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;in the HTTP headers. --&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;outputCache&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;omitVaryStar="true"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/outputCache&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/caching&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/system.web&amp;gt;&lt;br /&gt;&amp;lt;/configuration&amp;gt;&lt;/span&gt; &lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-115153485199689138?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2006/06/debugging-internet-explorer-view.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-30313636.post-115138255229224405</guid><pubDate>Tue, 27 Jun 2006 05:22:00 +0000</pubDate><atom:updated>2006-06-26T22:50:13.266-07:00</atom:updated><title>Proof that Digg has at least 6 web servers</title><description>&lt;strong&gt;&lt;span style="color:#009900;"&gt;The Straight p00p&lt;/span&gt;&lt;/strong&gt;: Anyone on the Internet can experimentally determine how many web servers &lt;a href="http://www.digg.com"&gt;Digg.com&lt;/a&gt; has, due to their server configuration. If Digg tweaks their web servers to fix this, they can speed up the site and save everyone bandwidth. Anyone can try these investigative techniques on other sites, too.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#009900;"&gt;The Details&lt;/span&gt;&lt;/strong&gt;: A quick check with &lt;a href="http://www.fiddlertool.com"&gt;Fiddler&lt;/a&gt; shows that Digg.com seems to serve all its content from &lt;a href="http://www.digg.com"&gt;www.digg.com&lt;/a&gt;. That hostname resolves to a &lt;a href="http://dns-tools.domaintools.com/?q=www.digg.com&amp;amp;m=dns"&gt;single IP address&lt;/a&gt; (they probably use a load balancer like &lt;a href="http://www.f5.com/products/bigip/"&gt;BigIP&lt;/a&gt;), but we can still figure out what's going on by requesting a static file from their site and looking at the HTTP headers. I used the HEAD perl script that comes with perl and the LWP library:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&gt;head http://www.digg.com/img/comment-1.png&lt;br /&gt;200 OK&lt;br /&gt;Cache-Control: max-age=3600&lt;br /&gt;Connection: Keep-Alive&lt;br /&gt;Date: Tue, 27 Jun 2006 05:02:41 GMT&lt;br /&gt;Accept-Ranges: bytes&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#999900;"&gt;&lt;strong&gt;ETag: "870384-a72-41414d62cbc00" &lt;-----------------&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;Server: Apache&lt;br /&gt;Content-Length: 2674&lt;br /&gt;Content-Type: image/png&lt;br /&gt;Last-Modified: Thu, 18 May 2006 19:13:52 GMT&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;The &lt;a href="http://httpd.apache.org/docs/1.3/mod/core.html#fileetag"&gt;entity tag value by default seems&lt;/a&gt; to be composed of the file inode value, the file size, and the modification time.&lt;br /&gt;&lt;br /&gt;File inodes are values that make sense on a particular file-system (i.e. they're unique to the volume/partition/file-system on the box). So if the server cluster has multiple filesystems (i.e. content copied around and on each box in the cluster), it's highly likely that the inode values will be different. (of course, this assumption could be wrong if network filesystems or SANs are in use, etc.).&lt;br /&gt;&lt;br /&gt;To test this theory, I wrote a short &lt;a href="http://www.lowtek.com/blog/etagcheck.txt"&gt;quick-hack perl script&lt;/a&gt; that makes 200 HEAD requests and shows how many unique inode values are returned. Here's the output:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&gt;perl -w p.pl&lt;br /&gt;"5c01db-a72-41414d62cbc00"&lt;br /&gt;... // lot more output&lt;br /&gt;"4f01c8-a72-41414d62cbc00"&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#009900;"&gt;INODES:&lt;br /&gt;&lt;br /&gt;870384 = 24&lt;br /&gt;430251 = 30&lt;br /&gt;4f01c8 = 42&lt;br /&gt;6481c8 = 31&lt;br /&gt;981c0 = 34&lt;br /&gt;5c01db = 39&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;SIZES:&lt;br /&gt;&lt;br /&gt;a72 = 200&lt;br /&gt;&lt;br /&gt;MTIMES:&lt;br /&gt;&lt;br /&gt;41414d62cbc00 = 200&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;As you can see, there's 6 unique inode values, so that's how I deduced that Digg probably has at least 6 web servers. Back in April, it was &lt;a href="http://shiflett.org/archive/224"&gt;reported&lt;/a&gt; that Digg had 3 web servers and just today Digg was stocking up on &lt;a href="http://diggtheblog.blogspot.com/2006/06/digg-v3-status.html"&gt;BestBuy boxes&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#999900;"&gt;What's wrong with differing ETag values? &lt;/span&gt;&lt;/strong&gt;The problem is that if you happen to access server #1 in the cluster and it returns one ETag for that file, then later you go back to the site, your browser will ask the server "give me that file, but don't give it to me if your file matches the ETag I got earlier". Well, if you're talking to server #2 this time around, it has a different ETag (even though the file content is the same), so then it has to retransmit the content to you again, for basically no reason.&lt;br /&gt;&lt;br /&gt;Digg could reconfigure their web servers to use the same ETags across their cluster, then this wouldn't be an issue, then guys like me couldn't write these kinds of investigative reports. :-)&lt;br /&gt;&lt;br /&gt;The technique I explained in this write-up could be used on other sites as well. Found anything interesting?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='http://res1.blogblog.com/tracker/30313636-115138255229224405?l=www.lowtek.com%2Fblog'/&gt;&lt;/div&gt;</description><link>http://www.lowtek.com/blog/2006/06/proof-that-digg-has-at-least-6-web.html</link><author>noreply@blogger.com (LowTek)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item></channel></rss>