<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Vishal Vasu&#039;s Tech Talk &#187; windows 2003</title>
	<atom:link href="http://www.vishalvasu.com/tag/windows-2003/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vishalvasu.com</link>
	<description>Opening Doors to Windows Technology</description>
	<lastBuildDate>Wed, 02 Jun 2010 12:49:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Finding FSMO Roles in Active Directory using NTDSUtil</title>
		<link>http://www.vishalvasu.com/finding-fsmo-roles-using-ntdsutil/</link>
		<comments>http://www.vishalvasu.com/finding-fsmo-roles-using-ntdsutil/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 11:07:52 +0000</pubDate>
		<dc:creator>Vishal Vasu</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[windows 2003]]></category>

		<guid isPermaLink="false">http://www.vishalvasu.com/?p=265</guid>
		<description><![CDATA[First things first: FSMO means Flexible Single Master Operation and it is used within Active Directory to control, monitor and manage configuration updates. Without going in to more details about how FSMO works, let’s move on to understanding the Five (5) FSMO roles:
Schema Master: It controls all the updates and modifications that relate to schema [...]]]></description>
			<content:encoded><![CDATA[<p>First things first: FSMO means Flexible Single Master Operation and it is used within Active Directory to control, monitor and manage configuration updates. Without going in to more details about how FSMO works, let’s move on to understanding the Five (5) FSMO roles:</p>
<p><strong>Schema Master:</strong> It controls all the updates and modifications that relate to schema of the Active Directory. It is the duty of the Schema Master to ensure that the latest schema has been replicated across all Domain Controllers in the directory. The role is forest-wide and there can be only one Schema Master in a forest.</p>
<p><strong>Domain Naming Master:</strong> It controls the addition and deletion of domains in the forest. The role is once again forest-wide and there can be only one Domain Naming Master in a forest.</p>
<p><strong>RID Master:</strong> Stands for Relative ID and is responsible for processing RID requests from all Domain Controllers in a particular domain. For example, if we create a user in Active Directory, a unique Security Identifier (SID) is created which identifies it in the domain. Along with this SID a Relative ID (RID) that is unique to the SID is also generated from a pool that is allocated. The main role of RID Master is to ensure that each DC has got enough RID pool and if not then process the request for the pool from the unallocated RID pool. The role is Domain specific and there can be only one Domain Controller handling this role.</p>
<p><strong>Infrastructure Master:</strong> When an object in one domain is referenced by another object in another domain, it represents the reference by the GUID, the SID (for references to security principals), and the DN of the object being referenced. The infrastructure FSMO role holder is the DC responsible for updating an object&#8217;s SID and distinguished name in a cross-domain object reference. The role is Domain specific and there can be only one Domain Controller handling this role.</p>
<p><strong>PDC Emulator:</strong> It seems to be a backward compatible role that has been handed over as a legacy from Windows NT 4.0 and is mainly used for syncing time in the Enterprise. The W32Time service that we see in the Services MMC has a very important role to play: synchronize time across the enterprise to that Kerberos Authentication works smoothly. After all, password changes, authentication, account lockout, etc. all depends on this. The role is Domain specific and there can be only one Domain Controller handling this role.</p>
<p>So why does an administrator need to know which Domain Controller is holding which role? Well, normally there is always a single machine that carries all the five FSMO roles, but there can be scenarios where an administrator would have moved one or more FSMO roles. To know why, read this <a href="http://support.microsoft.com/kb/223346"><strong>KB article</strong></a> from Microsoft. With a better understanding of which server holds which role, the administrator can plan better for disaster recovery or scheduled maintenance. There are many ways to find out which DC holds which role, but here is one that uses NTDSUtil – a command line tool.</p>
<p><span style="color: #ff0000;"><em>A word of caution before we proceed: If you do not know what you are doing and have no idea about how Active Directory works or even worse – what Active Directory is – please refrain from doing this practically. Doing this incorrectly or messing with this command can cause your Active Directory to crash and lose functionality.</em></span></p>
<p><strong>Step #1:</strong> On any Domain Controller, click <strong>Start</strong>. In the <strong>Run</strong> command type <strong>CMD</strong> and hit Enter. You will be taken to the good old command prompt window (DOS were the days). Type <strong>ntdsutil</strong> and hit Enter.</p>
<p><strong>Step #2:</strong> You shall see the screen with <strong>ntdsutil:</strong> prompt. Since we want to find out the roles, type <strong>roles</strong> and hit Enter. Notice that the prompt now changes to show <strong>fsmo maintenance:</strong>. Now is a good time to get more HELP on the list of available commands.</p>
<p><strong>Step #3:</strong> On the <strong>fsmo maintenance:</strong> prompt, type <strong>?</strong> and hit Enter. Right-click in the Window, mark and copy them. Paste the clipboard in to Notepad for easy reference.</p>
<p><strong>Step #4:</strong> Type <strong>connection</strong> and press Enter. This will show a prompt with <strong>server connections:</strong>. Type <strong>connect to server &lt;servername&gt;</strong> (replace &lt;servername with actual name&gt; and press Enter.</p>
<p><strong>Step #5:</strong> Once we are connected to the Domain Controller, type <strong>q</strong> to return back to the fsmo maintenance prompt. Now type, <strong>select operation target</strong> and then press Enter. Notice that the prompt changes to select <strong>operation target:</strong>.</p>
<p><strong>Step #6:</strong> At the select operation target prompt, type <strong>list roles for connected server</strong> and press Enter. This would list all the FSMO roles for that Domain Controller. To get out of the ntdsutil, type <strong>q</strong> until you are back to the good old DOS prompt.</p>
<p>For those who are looking at ready solution rather than going through this process, check out DUMPFSMOS.CMD in the Resource Kit (Windows 2000/2003). This tool is a one-click utility that does the same trick.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vishalvasu.com/finding-fsmo-roles-using-ntdsutil/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Remove index.php from URL for WordPress</title>
		<link>http://www.vishalvasu.com/remove-indexphp-from-url-for-wordpress/</link>
		<comments>http://www.vishalvasu.com/remove-indexphp-from-url-for-wordpress/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 07:04:57 +0000</pubDate>
		<dc:creator>Vishal Vasu</dc:creator>
				<category><![CDATA[Websites & Web Marketing]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[search engine optimization]]></category>
		<category><![CDATA[windows 2003]]></category>
		<category><![CDATA[windows server 2008]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.vishalvasu.com/?p=210</guid>
		<description><![CDATA[Many WordPress uses prefer to host their web sites on a Linux server so that they can get rid of the index.php that get’s in to the URL by using mod_rewrite module on Linux. This is not supported on Windows Server’s IIS.
The main idea is to make the URL more simple and SEO friendly. Normally, [...]]]></description>
			<content:encoded><![CDATA[<p>Many WordPress uses prefer to host their web sites on a Linux server so that they can get rid of the index.php that get’s in to the URL by using mod_rewrite module on Linux. This is not supported on Windows Server’s IIS.</p>
<p>The main idea is to make the URL more simple and SEO friendly. Normally, when you setup PermaLinks in IIS, we get something like this:</p>
<p><strong><span style="color: #888888;">http://www.yourwordpresssite.com/index.php/2009/08/02/your-blog-post/</span></strong></p>
<p>This means that each link to the post carries index.php in the URL which is not good. Outlined below are steps that can help to achieve the same results for a WordPress site on a Windows Server running IIS.</p>
<p><strong><span style="text-decoration: underline;">STEP: 1</span></strong></p>
<p>Get the URL rewriting component on the Windows Server hosting your WordPress site. If you are not in control of the server or are not the server administrator, you can request the setup of the component from them. <strong><a href="http://code.google.com/p/wp-url-rewriting-on-iis/downloads/list" target="_blank">Click here</a></strong> to download the component from the vendor’s site. The component is absolutely free and distributed under GNU General Public License.</p>
<p><span style="text-decoration: underline;"><strong>STEP: 2</strong></span></p>
<p>Once the component is downloaded, copy the wp-url-rewriting.dll file to the Windows Server’s SYSTEM32 directory. Register the component so that it is available to IIS by using the <strong>REGSVR32 WP-URL-REWRITING.DLL</strong> command from the command prompt.</p>
<p><img class="alignnone" title="URL Rewrite for WordPress" src="http://www.vishalvasu.com/uploaded_images/url-rewrite-01.gif" alt="" width="572" height="275" /></p>
<p><strong><span style="color: #ff0000;"><em>Note: You may get an error that the DLL entry point was not found, but let that not bother you.</em></span></strong></p>
<p><strong><span style="text-decoration: underline;">STEP: 3</span></strong></p>
<p>Once the DLL is registered, login to your WordPress admin area and navigate to PermaLinks and change the common setting to use Custom Structure. Add <span style="color: #333333;"><strong>/%category%/%postname%/ </strong></span>as the choice and Save Changes.</p>
<p><img class="alignnone" title="URL Rewrite for WordPress" src="http://www.vishalvasu.com/uploaded_images/url-rewrite-02.gif" alt="" width="595" height="240" /></p>
<p>That&#8217;s it! We are done. WordPress should now show the URL&#8217;s without the index.php in it.</p>
<p>I invite everyone to share their experience or any other methods that they might have used.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vishalvasu.com/remove-indexphp-from-url-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Automate Patch Management with WSUS</title>
		<link>http://www.vishalvasu.com/automate-patch-management-with-wsus/</link>
		<comments>http://www.vishalvasu.com/automate-patch-management-with-wsus/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 08:18:57 +0000</pubDate>
		<dc:creator>Vishal Vasu</dc:creator>
				<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[patch management]]></category>
		<category><![CDATA[windows 2003]]></category>
		<category><![CDATA[windows server 2008]]></category>

		<guid isPermaLink="false">http://www.vishalvasu.com/?p=205</guid>
		<description><![CDATA[Patching the Windows Operating System in an organization with multiple desktops and many flavors of operating systems is a mammoth task. It is vital for any Systems Administrator to ensure all systems are properly patched and updated to safe guard against virus, worms, and Trojans. The biggest challenge in running Windows Update on individual machines [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Calibri;">Patching the Windows Operating System in an organization with multiple desktops and many flavors of operating systems is a mammoth task. It is vital for any Systems Administrator to ensure all systems are properly patched and updated to safe guard against virus, worms, and Trojans. The biggest challenge in running Windows Update on individual machines is the inconvenience of visiting each desktop and approving the updates manually. Moreover, the amount of bandwidth used at each desktop to download the updates is huge not to forget the lack of centralized reporting.</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Calibri;">So why do we need a centralized patch management policy? Well, the answer is simple &#8211; the systems are prone to risks and threats when exposed to the Internet or medias like USB pen drives, wireless networks and devices, etc. We all, at some point, might have experienced or read about the havoc caused by Blaster or the Sasser worms. Today software vendors have stepped up the releases of emergency and critical updates in a formalized manner to encounter these threats. Microsoft&#8217;s Patch Tuesday is a good example that highlights that. To learn more about this program, <a href="http://www.microsoft.com/technet/security/bulletin/advance.mspx" target="_blank">click here</a>. </span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Calibri;">WSUS from Microsoft is a boon to Network and System Administrators in this scenario. WSUS (Windows Server Update Services) is basically designed to run on a company&#8217;s network and automate the process of patching. This free product from Microsoft does a fair job of streamlining the overall patch management process of an organization with centralized reporting. For a Network or System Administrator it is just a simple task of installing the WSUS server on a system and then configures all Desktops to use the WSUS server for software updates. This can be easily achieved by creating a group policy and linking the policy to the correct OU using Group Policy Editor. The Desktops would automatically announce their current status to the WSUS server with details like which patches are needed to be installed, which patches have failed to install, which patches have been successfully installed, etc.</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: 11pt; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">In a nutshell, WSUS seems to be a good product especially when there is no price tag attached to it and starting with WSUS 3.0 the reports have also improved over its predecessor.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vishalvasu.com/automate-patch-management-with-wsus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Install Perl on IIS</title>
		<link>http://www.vishalvasu.com/how-to-install-perl-on-iis/</link>
		<comments>http://www.vishalvasu.com/how-to-install-perl-on-iis/#comments</comments>
		<pubDate>Sat, 02 May 2009 13:12:23 +0000</pubDate>
		<dc:creator>Vishal Vasu</dc:creator>
				<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[windows 2003]]></category>

		<guid isPermaLink="false">http://www.vishalvasu.com/?p=174</guid>
		<description><![CDATA[ActivePerl is a complete, ready-to-install Perl distribution for Windows and includes Perl Core, Perl Package Manager, Installers, Online Documentation, Windows Version Extras, Perl for ISAPI, PerlEx, PerlScript and PerlEz.
 
It is recommended to have 90MB hard disk space for a typical install. To get started, download the latest version of Perl from ActiveState (http://www.activestate.com)

Once the download process [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">ActivePerl is a complete, ready-to-install Perl distribution for Windows and includes Perl Core, Perl Package Manager, Installers, Online Documentation, Windows Version Extras, Perl for ISAPI, PerlEx, PerlScript and PerlEz.</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"> </p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">It is recommended to have 90MB hard disk space for a typical install. </span><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">To get started, download the latest version of Perl from <strong style="mso-bidi-font-weight: normal">ActiveState (</strong></span><a href="http://www.activestate.com/"><strong style="mso-bidi-font-weight: normal"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"><span style="color: #0000ff;">http://www.activestate.com</span></span></strong></a><strong style="mso-bidi-font-weight: normal"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">)</span></strong></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"><strong style="mso-bidi-font-weight: normal"></strong></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"><strong style="mso-bidi-font-weight: normal"></strong><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Once the download process has completed, double click on the program to begin the installation process.</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"> </p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"><img class="alignnone" src="http://www.vishalvasu.com/uploaded_images/perl01.gif" alt="" width="503" height="389" /></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"> </p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">C</span><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">hoose <strong style="mso-bidi-font-weight: normal">Next</strong> to continue. You will be presented with the standard license agreement.</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> <img class="alignnone" src="http://www.vishalvasu.com/uploaded_images/perl02.gif" alt="" width="503" height="389" /></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Accept the <strong style="mso-bidi-font-weight: normal">End-User License Agreement</strong> and choose <strong style="mso-bidi-font-weight: normal">Next</strong> to continue.</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> <img class="alignnone" src="http://www.vishalvasu.com/uploaded_images/perl03.gif" alt="" width="503" height="389" /></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">You can change the installation path to match your setup from here. For this example, we have used F:\Perl. You can even choose not to install the <strong>Examples</strong> files if you want. Once the selections have been done, click <strong style="mso-bidi-font-weight: normal">Next</strong> to continue.</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"> </p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">On the next screen in the setup wizard, verify that the following choices are selected:</span></p>
<p class="MsoListParagraphCxSpFirst" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><span style="mso-list: Ignore">·<span style="FONT: 7pt 'Times New Roman'">  </span></span></span><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Add Perl to the PATH environment variable</span></p>
<p class="MsoListParagraphCxSpMiddle" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><span style="mso-list: Ignore">·<span style="FONT: 7pt 'Times New Roman'">  </span></span></span><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Create Perl file extension association</span></p>
<p class="MsoListParagraphCxSpLast" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><span style="mso-list: Ignore">·<span style="FONT: 7pt 'Times New Roman'">  </span></span></span><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Create IIS script mapping for Perl</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> </span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Click <strong>Next</strong> to continue to the review screen in the setup wizard.</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"><img class="alignnone" src="http://www.vishalvasu.com/uploaded_images/perl04.gif" alt="" width="503" height="389" /></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Click <strong style="mso-bidi-font-weight: normal">Install</strong> to begin the installation process. </span><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">The installation will take a few minutes and once the installation is done click <strong style="mso-bidi-font-weight: normal">Finish</strong> to complete the installation process. That&#8217;s it, Perl has been installed and integrated with IIS.</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"> </p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">To verify that the Perl path is set correctly and available to IIS, <strong style="mso-bidi-font-weight: normal">Right Click</strong> on <strong style="mso-bidi-font-weight: normal">My Computer</strong> and select <strong style="mso-bidi-font-weight: normal">Properties.</strong></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"><img class="alignnone" src="http://www.vishalvasu.com/uploaded_images/perl05.gif" alt="" width="239" height="231" /></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"> </p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Select the <strong style="mso-bidi-font-weight: normal">Environment Variables</strong> from the <strong style="mso-bidi-font-weight: normal">Advanced</strong> tab and verify the path listed under <strong style="mso-bidi-font-weight: normal">System Variables</strong>.</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"><img class="alignnone" src="http://www.vishalvasu.com/uploaded_images/perl06.gif" alt="" width="388" height="427" /></span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"> </p>
<p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Choose <strong style="mso-bidi-font-weight: normal">OK</strong> to close the current window. We have successfully installed Perl.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vishalvasu.com/how-to-install-perl-on-iis/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Batch File to Automate Basic Disk Check and Defrag in Windows</title>
		<link>http://www.vishalvasu.com/batch-file-to-automate-basic-disk-check-and-defrag-in-windows/</link>
		<comments>http://www.vishalvasu.com/batch-file-to-automate-basic-disk-check-and-defrag-in-windows/#comments</comments>
		<pubDate>Sun, 12 Apr 2009 08:31:06 +0000</pubDate>
		<dc:creator>Vishal Vasu</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[windows 2003]]></category>

		<guid isPermaLink="false">http://www.vishalvasu.com/?p=152</guid>
		<description><![CDATA[Since I maintain and administer lot of Windows and Exchange Servers, running basic disk checks and defrag on the servers manually is simply impossible. To achieve the goal, I had a small batch file written which automates this task for me.
To start with, create a folder on the machine that you want to automate this [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Calibri;">Since I maintain and administer lot of Windows and Exchange Servers, running basic disk checks and defrag on the servers manually is simply impossible. To achieve the goal, I had a small batch file written which automates this task for me.</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Calibri;">To start with, create a folder on the machine that you want to automate this on. I named my folder as “MaintenanceScripts”. The next step was to write the batch file with the content given below and save it as “ChecknDefrag.bat”.</span></p>
<pre class="MsoNormal" style="margin: 0in 0in 10pt;">@Echo Off
REM ***************************************************************************
REM *<span style="mso-tab-count: 10">                                                          </span><span style="mso-spacerun: yes">               </span>*
REM *<span style="mso-tab-count: 3">      </span>AUTOMATED DISK CHECK AND DEFRAGMENTATION SCRIPT<span style="mso-tab-count: 1">    </span><span style="mso-tab-count: 1">                </span>*
REM *<span style="mso-tab-count: 12">                                                                         </span>*
REM ***************************************************************************</pre>
<pre class="MsoNormal" style="MARGIN: 0in 0in 10pt">REM chkdsk and defrag automation
REM Read the Drive Letter from the file
for /F "eol= tokens=1 delims=( " %%i in (DriveLetter.txt) do set DrvLtr=%%i&amp; call :dsKchk</pre>
<pre class="MsoNormal" style="MARGIN: 0in 0in 10pt">:dsKchk
If %DrvLtr% == end goto :eof
echo. &gt;&gt; diskcheck.rtf
echo. &gt;&gt; diskcheck.rtf
echo ******************************************************** &gt;&gt; diskcheck.rtf
echo CHECK DATE and TIME for %DrvLtr% &gt;&gt; diskcheck.rtf
date /t &gt;&gt; diskcheck.rtf
time /t &gt;&gt; diskcheck.rtf
echo ******************************************************** &gt;&gt; diskcheck.rtf
echo. &gt;&gt; diskcheck.rtf
echo. &gt;&gt; diskcheck.rtf
echo RUNNING DISK CHECK ON %DrvLtr% ....
chkdsk %DrvLtr% &gt;&gt; diskcheck.rtf
goto :defrag</pre>
<pre class="MsoNormal" style="MARGIN: 0in 0in 10pt">:defrag
echo. &gt;&gt; defrag.rtf
echo. &gt;&gt; defrag.rtf
echo ******************************************************** &gt;&gt; defrag.rtf
echo CHECK DATE and TIME for %DrvLtr% &gt;&gt; defrag.rtf
date /t &gt;&gt; defrag.rtf
time /t &gt;&gt; defrag.rtf
echo ******************************************************** &gt;&gt; defrag.rtf
echo. &gt;&gt; defrag.rtf
echo. &gt;&gt; defrag.rtf
echo RUNNING DISK DEFRAGMENTATION ON %DrvLtr% ....
defrag %DrvLtr% -b &gt;&gt; defrag.rtf
defrag %DrvLtr% -f &gt;&gt; defrag.rtf

:EOF</pre>
<p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><span style="font-size: small; font-family: Calibri;">The above batch file checks for a file called “DriveLetter.txt” in the same folder from where the script it going to run from. You can change it to your liking. It also saves the report of the disk check to a file called “diskcheck.rtf” and for defrag to a file called “defrag.rtf”. I choose RTF so that I can open it in MS Word or any other application to see a nice formatted output.</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><span style="font-size: small; font-family: Calibri;">Next, we create a file called “DriveLetter.txt” in the same folder where we saved the Batch File and add all the drive letters that we want the script to check:</span></p>
<pre class="MsoNormal" style="MARGIN: 0in 0in 10pt">C:
end</pre>
<p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><span style="font-size: small; font-family: Calibri;">You can add more disks to the above file by writing the drive letters to the text file – one drive per line.</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><span style="font-size: small; font-family: Calibri;">Run the batch file once and wait for it to finish. Once it finishes its run, you can open the RTF files and see the results. If you are satisfied that everything is working fine with the batch files, you can now move towards scheduling the batch file to run at off-peak hours.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vishalvasu.com/batch-file-to-automate-basic-disk-check-and-defrag-in-windows/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DDOS attacks and Windows 2003 Servers</title>
		<link>http://www.vishalvasu.com/ddos-attacks-and-windows-2003-servers/</link>
		<comments>http://www.vishalvasu.com/ddos-attacks-and-windows-2003-servers/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 17:23:30 +0000</pubDate>
		<dc:creator>Vishal Vasu</dc:creator>
				<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[windows 2003]]></category>

		<guid isPermaLink="false">http://www.vishalvasu.com/wordpress/?p=55</guid>
		<description><![CDATA[I&#8217;ve come across many postings on forums where admins are talking about being hit by DDOS attacks and the servers going down. I&#8217;ve been replying to those threads, but I think its time for me to discuss it at length here.
Basically, DDOS means a Distributed Denial of Service attack which are targeted towards a computer, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve come across many postings on forums where admins are talking about being hit by DDOS attacks and the servers going down. I&#8217;ve been replying to those threads, but I think its time for me to discuss it at length here.</p>
<p>Basically, DDOS means a Distributed Denial of Service attack which are targeted towards a computer, server or a device to make it unavailable on the network. Lot of malicious traffic is directed towards a server or a service which blocks the bandwidth/network. Here are some steps Windows administrators can go through to prevent or fight against it:</p>
<p>- Keep your servers/computers updated with the latest patches, service packs and updates.<br />
- Harden the TCP/IP stack. Here is an article from Microsoft which talk about it: <a href="http://support.microsoft.com/default.aspx/kb/324270"><span style="color: #225588;">http://support.microsoft.com/default.aspx/kb/324270</span></a><br />
- Check with your Data Center to find out what infrastructure security is in place. They may be having a system in place where the DDoS traffic can be routed through a DDoS Mitigation Service. This filters out the attack traffic and allows the legitimate traffic to continue to its original destination.<br />
- If the budget permits, get a good hardware firewall installed in your infrastructure network. If not, then you can also go in for some software based firewall which can filter packets. In the worst case, at least have your Windows Basic Firewall configured.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vishalvasu.com/ddos-attacks-and-windows-2003-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Install PHP 5.x on IIS 6.0</title>
		<link>http://www.vishalvasu.com/how-to-install-php-5x-on-iis-60/</link>
		<comments>http://www.vishalvasu.com/how-to-install-php-5x-on-iis-60/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 09:40:20 +0000</pubDate>
		<dc:creator>Vishal Vasu</dc:creator>
				<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[windows 2003]]></category>

		<guid isPermaLink="false">http://www.vishalvasu.com/?p=116</guid>
		<description><![CDATA[Start by creating a directory into which you will extract the downloaded PHP files. In this example I&#8217;m going to use C:\PHP as my installation directory. Then extract the files from the zip into C:\PHP. Please check the PHP website for latest PHP release.
If you need to use the additional PECL modules then extract the files from [...]]]></description>
			<content:encoded><![CDATA[<p>Start by creating a directory into which you will extract the downloaded PHP files. In this example I&#8217;m going to use <strong>C:\PHP</strong> as my installation directory. Then extract the files from the zip into <strong>C:\PHP</strong>. Please check the <a href="http://www.php.net/downloads.php" target="_blank">PHP website </a>for latest PHP release.</p>
<p>If you need to use the additional PECL modules then extract the files from the PECL Zip into the <strong>C:\PHP\ext</strong> directory.</p>
<p> <img class="alignnone" src="http://www.vishalvasu.com/uploaded_images/install_php_01.jpg" alt="" width="384" height="166" /></p>
<p>Next locate the file <strong>&#8216;php.ini-recommended&#8217;</strong> in <strong>C:\PHP</strong> and rename it to <strong>&#8216;php.ini&#8217;</strong> (without the quotes of course)<br />
 <img class="aligncenter" src="http://www.vishalvasu.com/uploaded_images/install_php_02.jpg" alt="" width="697" height="446" /><br />
Open the <strong>&#8216;php.ini&#8217;</strong> file and find the line which reads <strong>extension_dir = &#8220;./&#8221;</strong> and change it to <strong>extension_dir = &#8220;C:\PHP\ext&#8221;</strong>. This tells PHP where the various extensions are located. If you open the default PHP.INI file which ships with the ZIP file you can see that the default path in the <strong>&#8216;php.ini-recommended&#8217;</strong> file points to the wrong location, so you need to change it.</p>
<p>You also need to add the location of your PHP directory to the server&#8217;s PATH environment variable so that Windows knows where to look for any PHP related executables (such as the PHP extension DLL‘s). To do this Right-click on <strong>My Computer</strong>, click <strong>Properties</strong> and on the <strong>Advanced</strong> tab click <strong>Environment Variables</strong>. In the <strong>Environment Variables </strong>dialog box, under <strong>System Variables</strong> highlight the <strong>Path</strong> variable and click <strong>Edit</strong>.</p>
<p> <img class="alignnone" src="http://www.vishalvasu.com/uploaded_images/install_php_03.jpg" alt="" width="388" height="427" /></p>
<p>Add <strong>&#8216;;C:\PHP&#8217;</strong> (be sure to include the semi-colon separator) as shown here and click <strong>OK</strong>. You will need to re-boot the server for this change to take effect as system variables are loaded when the server starts up.</p>
<p> <img class="alignnone" src="http://www.vishalvasu.com/uploaded_images/install_php_04.jpg" alt="" width="351" height="144" /></p>
<p>If you browse through the <strong>&#8216;php.ini&#8217;</strong> file you will see an entry describing the <strong>&#8216;cgi.force_redirect&#8217;</strong> property. You will also see a statement telling you that if you are using IIS you &#8216;MUST&#8217; turn this off. However, this only applies if you are using the CGI version of PHP (i.e. php-cgi.exe) Since we are using the ISAPI version of PHP we can safely ignore this.</p>
<p><strong><span style="text-decoration: underline;">Configuring IIS (Only if required)</span></strong></p>
<p>There are a few simple steps you need to take in order to get PHP working under IIS 6.0</p>
<p>First we need to create and then enable an appropriate <strong>Web Service Extension</strong> so that IIS will both recognize and allow PHP files to be processed by the appropriate script engine.</p>
<p>You can use the Internet Information Services (IIS) Manager GUI method to perform this task but there is a much quicker way of doing this; namely using the <strong>&#8216;iisext.vbs&#8217;</strong> Command-Line Administration Script, which you will find in <strong>C:\Windows\system32</strong> by default.</p>
<p>Assuming you are using the same directory structure as I am in this walkthrough you can simply copy and paste the following line of text and execute it at a command prompt from <strong>C:\Windows\system32</strong> :</p>
<p><strong><span style="color: #ff0000;">cscript iisext.vbs /AddFile c:\PHP\php5isapi.dll 1 PHPISAPI 1 &#8220;PHP ISAPI&#8221;</span></strong></p>
<p> <img class="alignnone" src="http://www.vishalvasu.com/uploaded_images/install_php_05.jpg" alt="" width="672" height="335" /></p>
<p>As you can see, this script creates a new <strong>Web Service Extension</strong> named <strong>&#8220;PHP ISAPI&#8221;</strong> with a status of <strong>Allowed</strong>.<br />
 <img class="aligncenter" src="http://www.vishalvasu.com/uploaded_images/install_php_06.jpg" alt="" width="692" height="503" /></p>
<p>The IIS 6.0 Command-Line Administration Scripts are very powerful and flexible tools and I would recommend using them wherever possible.</p>
<p>OK, now we are ready to test our PHP installation. Start by creating a simple PHP test file. Open <strong>Notepad</strong> on the server and copy the following line into a new text file:<strong> <span style="color: #ff0000;">&lt;?php phpinfo(); ?&gt;</span></strong></p>
<p>Save the file as <strong>index.php</strong> in the root of the test web site. Next create a new default document type of <strong>index.php</strong> on the test web site (this step is optional but it just makes browsing a bit easier)</p>
<p> <img class="alignnone" src="http://www.vishalvasu.com/uploaded_images/install_php_07.jpg" alt="" width="465" height="462" /></p>
<p>Browse the site and you should see the standard PHP configuration details page</p>
<p> <img class="alignnone" src="http://www.vishalvasu.com/uploaded_images/install_php_08.jpg" alt="" width="589" height="533" /></p>
<p>However, if you look carefully at the above page you will notice it is indicating that my &#8216;php.ini&#8217; file is actually located in <strong>&#8216;C:\WINDOWS&#8217;</strong> even though there is no such file in my <strong>C:\WINDOWS</strong> directory. This is because the <strong>&#8216;php5isapi.dll&#8217;</strong> file is actually compiled with this location as its default value. A number of existing PHP and IIS tutorials suggest that you should copy the <strong>&#8216;php.ini&#8217;</strong> file to the <strong>C:\WINDOWS</strong> directory &#8211; but what if you don&#8217;t want to do that?</p>
<p>Well, you don&#8217;t have to because PHP allows you to actually configure a custom value for the <strong>&#8216;php.ini&#8217;</strong> file location. There are a number of ways to do this but perhaps the simplest is to configure the PHPRC environment variable.</p>
<p>To demonstrate how this works I am going to create a new folder called <strong>&#8216;C:\inifile&#8217;</strong> and instruct PHP to read its configuration data from the &#8216;php.ini&#8217; file in this location (in practice you may prefer to leave your <strong>&#8216;php.ini&#8217;</strong> file in the C:\PHP directory)</p>
<p>In order to do this I need to create a new System environment variable named <strong>&#8216;PHPRC&#8217; </strong>and provide the appropriate values. Right-click on <strong>My Computer</strong>, click <strong>Properties</strong> and on the <strong>Advanced</strong> tab click <strong>Environment Variables</strong>.</p>
<p> <img class="alignnone" src="http://www.vishalvasu.com/uploaded_images/install_php_09.jpg" alt="" width="423" height="483" /></p>
<p>In the <strong>Environment Variables</strong> dialog box, under <strong>System Variables</strong> click <strong>New</strong>. In the <strong>New System Variable</strong> dialog box type <strong>PHPRC</strong> for the variable name and then enter the desired path to your <strong>&#8216;php.ini&#8217;</strong> file&#8217;s location.</p>
<p> <img class="alignnone" src="http://www.vishalvasu.com/uploaded_images/install_php_010.jpg" alt="" width="351" height="144" /></p>
<p>Then click <strong>OK </strong>and you will see that a new <strong>System environment variable</strong> has been created. In order for this to take effect you need to re-boot the server at this stage.</p>
<p> <img class="alignnone" src="http://www.vishalvasu.com/uploaded_images/install_php_011.jpg" alt="" width="388" height="427" /></p>
<p><strong><span style="color: #ff0000;">#Note</span></strong><br />
<span style="color: #ff0000;">As an alternative, you can edit the registry and specify the location of your configuration file. The main benefit of the registry edit method is that it doesn&#8217;t require a re-boot &#8211; in testing this method I found that any changes made would take effect once the application pool serving the web site was recycled. However, choose whichever method you feel most comfortable with and which fits your requirements.</span></p>
<p>Now if we browse the site we can see that PHP is indeed looking for its &#8216;php.ini&#8217; file in the <strong>&#8216;C:\inifile&#8217;</strong> location which I specified previously.</p>
<p> <img class="alignnone" src="http://www.vishalvasu.com/uploaded_images/install_php_012.jpg" alt="" width="656" height="510" /></p>
<p>And that&#8217;s it. You should now have a working installation of PHP running on IIS 6.0.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vishalvasu.com/how-to-install-php-5x-on-iis-60/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Updates Check on Nagios</title>
		<link>http://www.vishalvasu.com/windows-updates-check-on-nagios/</link>
		<comments>http://www.vishalvasu.com/windows-updates-check-on-nagios/#comments</comments>
		<pubDate>Sat, 02 Aug 2008 09:05:30 +0000</pubDate>
		<dc:creator>Vishal Vasu</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[windows 2003]]></category>

		<guid isPermaLink="false">http://www.vishalvasu.com/wordpress/?p=37</guid>
		<description><![CDATA[I&#8217;m not much of a Linux guy but still love Nagios. Few days back I came across a script on Nagios Exchange (http://www.nagiosexchange.org/cgi-bin/page.cgi?g=Detailed%2F2639.html;d=1 ) which does a check for Windows updates and reports the results back to the Nagios server. The moment I saw it, I was very happy and I wanted to set this [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-family: lucida grande;">I&#8217;m not much of a Linux guy but still love Nagios. Few days back I came across a script on Nagios Exchange (</span><a href="http://www.nagiosexchange.org/cgi-bin/page.cgi?g=Detailed%2F2639.html;d=1"><span style="font-family: lucida grande;"><span style="color: #225588;">http://www.nagiosexchange.org/cgi-bin/page.cgi?g=Detailed%2F2639.html;d=1</span></span></a><span style="font-family: lucida grande;"> ) which does a check for Windows updates and reports the results back to the Nagios server. The moment I saw it, I was very happy and I wanted to set this up. But the happiness did not last for long. Few hours later I found that it was not going to be easy to set this up and get it running. The problem is not the script &#8211; the problem is me. Always had been away from the Red Devil and Penguin since Windows always was my passion.</span><span style="font-family: lucida grande;"><strong>define service{<br />
use generic-service </strong><br />
<strong>host_name Name Of Host &#8211; replace this with your Host Name</strong><br />
<strong>service_description Updates </strong><br />
<strong>check_command check_nrpe!check_updates!-l </strong><br />
<strong>}</strong></span></p>
<p>Searched a lot on the Internet and forums but I could not find a single site which would show how to implement the script in NsClient ++ and how to define the command and service in Nagios. Finally, I managed to crack it and now I would like to share this with everyone who may need some help on this.</p>
<p>Follow these steps to get this working:</p>
<p>[1] Download the script from Nagios Exchange and store it on your hard disk of your server which you need to check for updates. Note down the path to the wsf script for further reference.</p>
<p>[2] Edit your NSC.INI file (NsClient ++) and add this line to it:<br />
<strong>check_updates=c:windowssystem32cscript.exe //NoLogo //T:40 C:Scriptscheckupdates.wsf $arg1$</strong><br />
The line above will check for the checkupdates.wsf script under the Scripts folder and run it using cscript. The $arg1$ will return the value back to Nagios.</p>
<p>[3] Next step is to add a command to your Nagios command.cfg file:<br />
<strong>#&#8217;check_nrpe&#8217; command definition</strong><br />
<strong>define command { </strong><br />
<strong>command_name check_nrpe </strong><br />
<strong>command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c $ARG1$ -a $ARG2$</strong><br />
<strong>}</strong></p>
<p>[4] Now it&#8217;s time to define the service. Depending on the way you use templates, I&#8217;ll leave it up to you to decide where to place it. Add the following lines:<br />
<strong># Monitor updates in windows machine</strong></p>
<p>Do a pre-flight check of Nagios. If no configuration errors are reported then you are good to go. Restart nagios for the new checks to work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vishalvasu.com/windows-updates-check-on-nagios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Securing IIS 6.0 Web Server on Windows 2003</title>
		<link>http://www.vishalvasu.com/securing-iis-60-web-server-on-windows-2003/</link>
		<comments>http://www.vishalvasu.com/securing-iis-60-web-server-on-windows-2003/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 14:34:18 +0000</pubDate>
		<dc:creator>Vishal Vasu</dc:creator>
				<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[windows 2003]]></category>

		<guid isPermaLink="false">http://www.vishalvasu.com/?p=109</guid>
		<description><![CDATA[This article focuses on how some simple steps can help server administrators block hack attacks on an IIS 6.0 Web Server running on Windows 2003.
Hacking a Web Server
With the advent of Windows 2003 and IIS 6.0 there was a sharp turn in the way hosting services were being provided on Windows platform few years back. [...]]]></description>
			<content:encoded><![CDATA[<p>This article focuses on how some simple steps can help server administrators block hack attacks on an IIS 6.0 Web Server running on Windows 2003.</p>
<p><strong>Hacking a Web Server<br />
</strong>With the advent of Windows 2003 and IIS 6.0 there was a sharp turn in the way hosting services were being provided on Windows platform few years back. Today, web servers running on Internet Information Services 6.0 (IIS 6.0) are highly popular worldwide – thanks to the .NET and AJAX revolution for designing web applications. Unfortunately, this also makes IIS web servers a popular target amongst hacking groups and almost every day we read about the new exploits being traced out and patched. That does not mean that Windows is not as secured as Linux. In fact, it’s good that we see so many patches being released for Windows platform as it clearly shows that the vulnerabilities have been identified and blocked.</p>
<p>Many server administrators have a hard time coping up with patch management on multiple servers thus making it easy for hackers to find a vulnerable web server on the Internet. One good way I have found to ensure servers are patched is to use Nagios to run an external script on a remote host, in turn alerting on the big screen which servers need patches and a reboot after the patch has been applied. In other words, it is not a difficult task for an intruder to gain access to a vulnerable server if the web server is not secured and then compromise it further to an extent that there is no option left for the administrator but to do a fresh OS install and restore from backups.<br />
Many tools are available on the Internet which allows an experienced or a beginner hacker to identify an exploit and gain access to a web server. The most common of them are:</p>
<p><strong>IPP (Internet Printing Protocol)</strong> &#8211; which makes use of the IPP buffer overflow. The hacking application sends out an actual string that overflows the stack and opens up a window to execute custom shell code. It connects the CMD.EXE file to a specified port on the attacker’s side and the hacker is provided with a command shell and system access.</p>
<p><strong>UNICODE and CGI-Decode –</strong> where the hacker uses the browser on his or her computer to run malicious scripts on the targeted server. The script is executed using the IUSR_&lt;computername&gt; account also called the “anonymous account” in IIS. Using this type of scripts a directory transversal attack can be performed to gain further access to the system.</p>
<p>Over these years, I’ve seen that most of the time, attacks on a IIS web server result due to poor administration, lack of patch management, bad configuration of security, etc. It is not the OS or the application to blame but the basic configuration of the server is the main culprit. I’ve outlined below a checklist with an explanation to each item. These if followed correctly would help prevent lot of web attacks on an IIS web server.</p>
<p><strong>Secure the Operating System<br />
</strong>The first step is to secure the operating system which runs the web server. Ensure that the Windows 2003 Server is running the latest service pack which includes a number of key security enhancements.</p>
<p><strong>Always use NTFS File System<br />
</strong>NTFS file system provides granular control over user permissions and lets you give users only access to what they absolutely need on a file or inside a folder.</p>
<p><strong>Remove Unwanted Applications and Services<br />
</strong>The more applications and services that you run on a server, the larger the attack surface for a potential intruder. For example, if you do not need File and Printer sharing capabilities on your shared hosting platform, disable that service.</p>
<p><strong>Use Least Privileged Accounts for Service<br />
</strong>Always use the local system account for starting services. By default Windows Server 2003 has reduced the need for service accounts in many instances, but they are still necessary for some third-party applications. Use local system accounts in this case rather than using a domain account. Using a local system account means you are containing a breach to a single server.</p>
<p><strong>Rename Administrator and Disable Guest<br />
</strong>Ensure that the default account called Guest is disabled even though this is a less privileged account. Moreover, the Administrator account is the favorite targets for hackers and most of the malicious scripts out there use this to exploit and vulnerable server. Rename the administrator account to something else so that the scripts or programs that have a check for these accounts hard-coded fail.</p>
<p><strong>Disable NetBIOS over TCP/IP and SMB<br />
</strong>NetBIOS is a broadcast-based, non-routable and insecure protocol, and it scales poorly mostly because it was designed with a flat namespace.  Web servers and Domain Name System (DNS) servers do not require NetBIOS and Server Message Block (SMB). This protocol should be disabled to reduce the threat of user enumeration.<br />
To disable NetBIOS over TCP/IP, right click the network connection facing the Internet and select Properties. Open the Advanced TCP/IP settings and go to the WINS tab. The option for disabling NetBIOS TCP/IP should be visible now. To disable SMB, simply uncheck the File and Print Sharing for Microsoft Networks and Client for Microsoft Networks. A word of caution though – if you are using network shares to store content skip this. Only perform this if you are sure that your Web Server is a stand-alone server.</p>
<p><strong>Schedule Patch Management<br />
</strong>Make a plan for patch management and stick to it. Subscribe to Microsoft Security Notification Service (<a href="http://www.microsoft.com/technet/security/bulletin/notify.asp">http://www.microsoft.com/technet/security/bulletin/notify.asp</a>)  to stay updated on the latest release of patches and updates from Microsoft. Configure your server’s Automatic Update to notify you on availability of new patches if you would like to review them before installation.</p>
<p><strong>Run MBSA Scan<br />
</strong>This is one of the best way to identify security issues on your servers. Download the Microsoft Base Line Security tool and run it on the server. It will give you details of security issues with user accounts, permissions, missing patches and updates and much more.</p>
<p>That’s it to the basic of securing the operating system. There are more fixes which can be performed for further securing the server but they are beyond the scope of this article. Let’s now move on to securing the IIS web server.<br />
IIS 6.0 when setup is secured by default. When we say this, it means that when a fresh installation of IIS is done, it prevents scripts from running on the web server unless specified. When IIS is first installed, it serves only HTML pages and all dynamic content is blocked by default. This means that the web server will not serve or parse dynamic pages like ASP, ASP.NET, etc. Since that is not what a web server is meant to do, the default configuration is changed to allow these extensions.</p>
<p>Listed below are some basic points that guide you to securing the web server further:</p>
<ul>
<li><strong>Latest Patches and Updates<br />
</strong>Ensure that the latest patches, updates and service packs have been installed for .NET Framework. These patches and updates fix lot of issues which enhances the security of the web server.</li>
<li><strong>Isolate Operating System<br />
</strong>Do not run your web server from the default InetPub folder. If you have the option to partition your hard disks then use the C: drive for Operating System files and store all your client web sites on another partition. Relocate web root directories and virtual directories to a non-system partition to help protect against directory traversal attacks.</li>
<li><strong>IISLockDown Tool<br />
</strong>There are some benefits to this tool and there are some drawbacks, however, so use it cautiously. If your web server interacts with other servers, test the lockdown tool to make sure it is configured so that connectivity to backend services is not lost.</li>
<li><strong>Permissions for Web Content<br />
</strong>Ensure that Script Source Access is never enabled under a web site’s property. If this option is enabled, users can access source files. If Read is selected, source can be read; if Write is selected, source can be written to. To ensure that it is disabled, open IIS, right click the Websites folder and select Properties. Clear the check box if it is enabled and propagate it to all child websites.</li>
<li><strong>Enable Only Required Web Server Extensions<br />
</strong>IIS 6.0 by default does not allow any dynamic content to be parsed. To allow a dynamic page to be executed, you need to enable the relevant extension from the Web Service Extensions property page. Always ensure that “All Unknown CGI Extensions” and “All Unknown ISAPI Extensions” are disabled all the time. If WebDAV and Internet Data Connector are not required, disable that too.</li>
<li><strong>Disable Parent Paths<br />
</strong>This is the worst of all and thanks to Microsoft, it is disabled in IIS 6.0 by default. The Parent Paths option permits programmers to use &#8220;..&#8221; in calls to functions by allowing paths that are relative to the current directory using the ..\notation. Setting this property to True may constitute a security risk because an include path can access critical or confidential files outside the root directory of the application. Since most of the programmers and third-party readymade applications use this notation, I leave it up to you to decide if this needs to be enabled or disabled. The workaround to Parent Paths is to use the Server.MapPath option in your dynamic scripts.</li>
<li><strong>Disable Default Web Site<br />
</strong>If not required, stop the Default Web Site which is created when IIS 6.0 is installed or change the property of Default Web Site to run on a specific IP address along with a Host Header. Never keep it running on All Unassigned as most of the ready-made hacking packages identify a vulnerable web server from IP address rather than a domain name. If your Default Web Site is running on All Unassigned, it means that it can serve content over an IP address in the URL rather than the domain name.</li>
<li><strong>Use Application Isolation<br />
</strong>I like this feature in IIS 6.0 which allows you to isolate applications in application pools. By creating new application pools and assigning web sites and applications to them, you can make your server more efficient and reliable as it ensures that other applications or sites do not get affected due to a faulty application running under that pool.</li>
</ul>
<p><strong>Summary<br />
</strong>All of the aforementioned IIS tips and tools are natively available in Windows. Don&#8217;t forget to try just one at a time before you test your Web accessibility. It could be disastrous if all of these were implemented at the same time making you wonder what is causing a problem in case you start having issues.</p>
<p>One final tip: Go to your Web server and Run “netstat –an” (without quotes) at the command line. Observe how many different IP addresses are trying to gain connectivity to your machine, mostly via port 80. If you see that you have IP addresses established at a number of higher ports, then you&#8217;ve already got a bit of investigating to do.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vishalvasu.com/securing-iis-60-web-server-on-windows-2003/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Install IIS 6.0 Web Server</title>
		<link>http://www.vishalvasu.com/how-to-install-iis-60-web-server/</link>
		<comments>http://www.vishalvasu.com/how-to-install-iis-60-web-server/#comments</comments>
		<pubDate>Fri, 04 Jul 2008 09:12:44 +0000</pubDate>
		<dc:creator>Vishal Vasu</dc:creator>
				<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[windows 2003]]></category>

		<guid isPermaLink="false">http://www.vishalvasu.com/?p=112</guid>
		<description><![CDATA[When you start your server, you should see the Manage Your Server wizard. If you don’t display this by default, you can go to Administrative Tools and click on Manage Your Server. When the wizard opens, click on Add or Remove a Role.
 
Click Next and let the server detect your settings, then choose Custom Configuration [...]]]></description>
			<content:encoded><![CDATA[<p>When you start your server, you should see the <strong>Manage Your Server wizard</strong>. If you don’t display this by default, you can go to <strong>Administrative Tools</strong> and click on <strong>Manage Your Server</strong>. When the wizard opens, click on <strong>Add or Remove a Role</strong>.<br />
 <img class="aligncenter" src="http://www.vishalvasu.com/uploaded_images/install_iis_01.jpg" alt="" width="581" height="156" /></p>
<p>Click <strong>Next</strong> and let the server detect your settings, then choose <strong>Custom Configuration</strong> and click <strong>Next.</strong> Choose the <strong>Application Server Role</strong> from the list and click <strong>Next</strong>.</p>
<p>Since many applications require ASP.NET today, we’re going to choose to Enable ASP.NET. In addition, we will not choose to enable FrontPage Extensions at this time though.</p>
<p> <img class="alignnone" src="http://www.vishalvasu.com/uploaded_images/install_iis_02.jpg" alt="" width="580" height="435" /></p>
<p>Note: In order to publish .NET applications from VisualStudio, you may want to enable FrontPage Extensions to start with.</p>
<p>Moving ahead, once we’ve selected what we want, we click <strong>Next</strong> to set up the role. Just let the wizard run until you see the finish button, then click <strong>Finish</strong>.</p>
<p>Once you’ve installed the Application Server role to your server, you’ll naturally want to check and see if it works. The Manage Your Server wizard should now show the Application Server role installed, so click on <strong>Manage This Application Server</strong>.</p>
<p> <img class="alignnone" src="http://www.vishalvasu.com/uploaded_images/install_iis_03.jpg" alt="" width="582" height="149" /></p>
<p>This brings up the Application Server Management Console (MMC). Expand the Internet Information Services (IIS) Manager, then expand your server (local computer), and then the Web Sites folder. You should see the Default Web Site listed as shown below, and it shouldn’t say &#8220;Stopped&#8221;. If it does, you need to troubleshoot using the <strong>Event Viewer</strong>.</p>
<p> <img class="alignnone" src="http://www.vishalvasu.com/uploaded_images/install_iis_04.jpg" alt="" width="578" height="434" /></p>
<p>For now, ignore the files and folders listed in your default web site, we just want to run a test and ensure that IIS is running and serving a web page. On the server itself, launch Internet Explorer (IE) and browse to <a href="http://localhost/"><strong>http://localhost/</strong></a>. You should see the “Under Construction” web page if the server is running correctly.</p>
<p><img class="alignnone" src="http://www.vishalvasu.com/uploaded_images/install_iis_05.jpg" alt="" width="582" height="124" /> </p>
<p>Okay, at this point you have a working IIS installation. Go back to the <strong>Application Server Management Console</strong> and right-click on the <strong>Default Web Site</strong>. Choose <strong>Properties</strong> to bring up the web site properties dialog. Then click on the <strong>Home Directory</strong> tab and ensure that the <strong>Default Site</strong> is set to the path shown below.</p>
<p> <img class="alignnone" src="http://www.vishalvasu.com/uploaded_images/install_iis_06.jpg" alt="" width="463" height="261" /></p>
<p>Because of the security enhancements in Windows Server 2003 and IIS 6, ASP pages are not enabled by default. Yes, we did install the server for ASP.NET, but ASP and ASP.NET isn’t the same thing.</p>
<p>In IIS 6, technologies like ASP, ASP.NET and so on are called Web Service Extensions. The same is true of Server Side Includes, PERL/CGI scripting, PHP and a host of other add-ons to web servers. Since many web sites run ASP (Active Server Pages), let’s activate ASP.</p>
<p>In the <strong>Application Server Management Console</strong>, click on the <strong>Web Service Extensions</strong> folder underneath the server name. You should see that Active Server Pages are Prohibited, this is the default configuration of IIS.</p>
<p> <img class="alignnone" src="http://www.vishalvasu.com/uploaded_images/install_iis_07.jpg" alt="" width="582" height="162" /></p>
<p>Simply set the extension to <strong>Allowed</strong> and the web server will start serving ASP pages. Repeat this for <strong>Server Side Includes</strong> too. This is required so that client pages parse the &lt;include&gt; variable in a page.</p>
<p>Last but not the least &#8211; you may probably want to shift your default web site as well as other web sites that you are going to host on the server off the System Partition (the one where the OS is installed). It&#8217;s always a good idea to shift the web site content to a different drive.</p>
<p>That’s it for the basic clean IIS 6.0 installation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vishalvasu.com/how-to-install-iis-60-web-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
