> And I'll see if I can figure out how to "deny SELECT to the sysobjects
> table for the login used by the ASP application". Yes, it's SQL Server
> 2000 on a dedicated Win 2003 Server. I haven't spend a lot of time in
> SQL Server, but no time like the present, I guess!
Oh, duh. (Way too many "Duhs" this week.)
I know how to do that. Thanks again.
J.
Julie wrote on Tue, 7 Oct 2008 07:01:00 -0700 (PDT):
>> Julie wrote on Tue, 7 Oct 2008 04:06:25 -0700 (PDT):
>>> I've been running URLScan 2.5 on a Windows Server 2003 system, due
>>> to a problem with that <insert swear word here> SQL Injection attack
[quoted text clipped - 23 lines]
>>> Thanks,
>>> Julie
>> POST data is not a querystring - the data is sent in the HTTP request
>> body, not in the GET request header.
>> Do you have an included file used throughout your ASP Application? If
>> so, a quick and dirty way to work around not taking your site down
[quoted text clipped - 6 lines]
>> some additional handling in the ASP code to normalise the strings
>> before checking them, making it easier to handle.
>> As a quick and easy solution, to most if not all of the current batch
>> of SQL injection requests, and assuming you are using SQL Server,
[quoted text clipped - 4 lines]
>> queries and lock down INSERT/UPDATE to only those tables/columns that
>> are required for your application to work.
>> --
>> Dan
> Hmmm, thanks. Yes, I do have an include file, the top of which is
> already parsing query strings, but this one slipped through somehow. I
> realize this isn't an ASP/VBScript forum, but this part is what's run
> on every asp page.
> dim testQS
> Set testQS = New RegExp testQS.pattern =
> "(%)|(DECLARE)|(VARCHAR)|(EXEC)|(UPDATE)|(DELETE)|
> (TRUNCATE)|(DROP)"
> testQS.IgnoreCase = True if testQS.Test(Request.QueryString)=True then
> response.redirect("404.html")
> I understand why it didn't catch "DECLARE", 'cause like I said, it had
> a % in the middle of the word. There's obviously something wrong with
> my regexp, though...thanks for at least letting me know that I was on
> the right track at least - lol. I'll figure it out.
> And I'll see if I can figure out how to "deny SELECT to the sysobjects
> table for the login used by the ASP application". Yes, it's SQL Server
> 2000 on a dedicated Win 2003 Server. I haven't spend a lot of time in
> SQL Server, but no time like the present, I guess!
> Thanks again.
> Julie
Your code is still not checking POST data, which is in the Request.Form()
collection. Maybe
if testQS.Test(Request.QueryString)=True or testQS.Test(Request.Form)=True
then
and you can drop the =True too ;)

Signature
Dan
Julie - 07 Oct 2008 16:59 GMT
<snip>
> > dim testQS
> > Set testQS = New RegExp testQS.pattern =
> > "(%)|(DECLARE)|(VARCHAR)|(EXEC)|(UPDATE)|(DELETE)|
> > (TRUNCATE)|(DROP)"
> > testQS.IgnoreCase = True if testQS.Test(Request.QueryString)=True then
> > response.redirect("404.html")
<snip>
> Your code is still not checking POST data, which is in the Request.Form()
> collection. Maybe
[quoted text clipped - 6 lines]
> --
> Dan
And yet another "duh" on the True - lol. Sheesh. I wrote that the last
time this happened after being up all night; here I am again, up all
night. Can't wait until I finish fixes these pages...I'm tired of
staying up all night! Anyway, after I wrote it, I never really
*looked* at it again, if ya know what I mean.
Sorry for being stupid about this; I never use the forms collection, I
always access it the same way I would a query variable (e.g.
request('myformfield"). I'm tired and making all the wrong
assumptions.
Thanks again, so much.
Julie