<?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>Glenn on the Web &#187; ColdFusion</title>
	<atom:link href="http://www.glenncrocker.com/category/coldfusion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.glenncrocker.com</link>
	<description></description>
	<lastBuildDate>Wed, 27 Jan 2010 21:32:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ColdFusion SQL Injection Troubles</title>
		<link>http://www.glenncrocker.com/2008/08/coldfusion-sql-injection-troubles/</link>
		<comments>http://www.glenncrocker.com/2008/08/coldfusion-sql-injection-troubles/#comments</comments>
		<pubDate>Fri, 29 Aug 2008 10:34:05 +0000</pubDate>
		<dc:creator>Glenn Crocker</dc:creator>
				<category><![CDATA[ColdFusion]]></category>

		<guid isPermaLink="false">http://www.glenncrocker.com/?p=23</guid>
		<description><![CDATA[This has been an issue for a long time, but the past few weeks, we&#8217;ve started to see some automated attacks against ColdFusion sites trying to inject rogue SQL via forms and other parameters.  Ugh.  I&#8217;ve been working with a great piece of code called Portcullis, but it has a few rough edges that make [...]]]></description>
			<content:encoded><![CDATA[<p>This has been an issue for a long time, but the past few weeks, we&#8217;ve started to see some automated attacks against ColdFusion sites trying to inject rogue SQL via forms and other parameters.  Ugh.  I&#8217;ve been working with a great piece of code called <a href="http://portcullis.riaforge.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/portcullis.riaforge.org');">Portcullis</a>, but it has a few rough edges that make it hard to deploy.  Here&#8217;s my application.cfm, in case it&#8217;s useful for anybody else fighting this:</p>
<blockquote>
<pre>&lt;cftry&gt;
	&lt;cfif isdefined("application.Portcullis") eq false or isdefined("url.reset")&gt;
	&lt;cfset application.Portcullis = createObject("component","com.fusionlink.Portcullis").init()/&gt;
	&lt;/cfif&gt;

	&lt;cfset application.Portcullis.scan(url,"url",cgi.remote_addr)&gt;
	&lt;cfset application.Portcullis.scan(form,"form",cgi.remote_addr)&gt;
	&lt;cfset application.Portcullis.scan(cookie,"cookie",cgi.remote_addr)&gt;

	&lt;cfif application.Portcullis.isBlocked(cgi.remote_addr) eq true&gt;
	 Sorry, there was an error detected.
	 &lt;cfmail from="you@you.com"
	  to="you@you.com"
	  subject="SEI Portcullis: User Blocked" type="html"&gt;
	  &lt;cfdump var="#cgi#"/&gt;
	 &lt;/cfmail&gt;
	 &lt;cfabort/&gt;
	&lt;/cfif&gt;

	&lt;cfcatch type="any"&gt;
	 &lt;cfmail from="you@you.com"
	  to="you@you.com"
	  subject="SEI Portcullis Threw Exception" type="html"&gt;
&lt;a href="http://#CGI.SERVER_NAME##CGI.SCRIPT_NAME#?#CGI.QUERY_STRING#"&gt;Page URL&lt;/a&gt;
#cfcatch.message#
	detail: #cfcatch.Detail# &lt;br /&gt;
	&lt;cfif IsDefined("cfcatch.SQLState")&gt;
	sqlstate: #cfcatch.SQLState# &lt;br /&gt;
	&lt;/cfif&gt;
	type: #cfcatch.type# &lt;br /&gt;
	  &lt;cfdump var="#cgi#"/&gt;
	 &lt;/cfmail&gt;
	&lt;/cfcatch&gt;
&lt;/cftry&gt;</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.glenncrocker.com/2008/08/coldfusion-sql-injection-troubles/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
