The "Santy" Worm, any ideas how to stop?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • grom
    Junior Member
    • May 2004
    • 8

    #1

    The "Santy" Worm, any ideas how to stop?

    This is rather a question for administration.

    The last 3 days my phpbb forum (though patched) is being hit by the worm's requests 15-30 times a minute. I had to put password protection on the forum, but this can't last forever because I will be losing traffic from search engines.

    Right at this moment most of the requests are done by the User-Agent "LWP::xxxx" where xxxx is different variations of the Perl script used to conduct the attack (e.g. lwp-trivial, LWP::Simple).

    So...

    Is it possible to block all the requests done by a user-agent containing the string "LWP"?

    More info on LWP is available here:
  • sdjl
    Senior Member
    • Mar 2004
    • 502

    #2
    I'm not sure about being able to block this worm entirely, but you can quite easily redirect a hit based on it's referrer using .htaccess.

    You could direct the user/person back to a different site or something using the following:

    Code:
    RewriteEngine  on
    RewriteCond %{HTTP_USER_AGENT} ^LWP
    RewriteRule ^.*$ problem.html  [L]
    I'm not sure how generic this is and whether it needs to have exactly LWP as the referer rather than LWP: blahblah, but give it a go.

    You'll notice problem.html, this is the file that it redirects to, which would be in the same directory as the forum.
    You could maybe setup a PHP file to redirect them to themselves

    David
    -----
    Do you fear the obsolescence of the metanarrative apparatus of legitimation?

    Comment

    • grom
      Junior Member
      • May 2004
      • 8

      #3
      The problem is that I will be still losing traffic if I redirect the hit to a file in my account, that's why blocking the worm on a more global level will be more useful.

      Comment

      • djn
        Senior Member
        • Mar 2004
        • 140

        #4
        This is some code coming straight from the phpBB community forum:

        RewriteEngine On
        RewriteCond %{QUERY_STRING} ^(.*)highlight=\%2527 [OR]
        RewriteCond %{HTTP_COOKIE}% s.*):\%22test1\%22\%3b
        RewriteRule ^.*$ - [F,L]

        I don't know how much it is worth, but I've put it into the .htaccess of all my forum directories (besides upgrading, of course)

        djn

        Comment

        • grom
          Junior Member
          • May 2004
          • 8

          #5
          Originally posted by djn
          This is some code coming straight from the phpBB community forum:

          RewriteEngine On
          RewriteCond %{QUERY_STRING} ^(.*)highlight=\%2527 [OR]
          RewriteCond %{HTTP_COOKIE}% s.*):\%22test1\%22\%3b
          RewriteRule ^.*$ - [F,L]

          I don't know how much it is worth, but I've put it into the .htaccess of all my forum directories (besides upgrading, of course)

          djn
          I've been trying that one too. It didn't work.
          Try to do a query containing the "highlight=\%2527" string, it will not give you 403 (F-Forbidden) error. At least it didn't work in my case.

          Comment

          • Ihost
            Junior Member
            • Mar 2004
            • 22

            #6
            Maybe I am missing something here, but why are you worried about losing the traffic from the referrers that use the strings that you are rewriting. Surely these are NOT the visitors that you want.

            Neither do you want those URL's to be well listed in the search engines.

            I would say getting the forbidden page is exactly what the .htaccess file should be generating.

            Since the SE robots should not be coming into your site with that referrer they should not get the forbidden page.

            Or have I totally missed the point?
            Kerry Slavin
            Reliable Solution Internet Services
            For the best independent support for webhosts & their customers visit -
            JointSupportForum.Com

            Comment

            • djn
              Senior Member
              • Mar 2004
              • 140

              #7
              Originally posted by grom
              I've been trying that one too. It didn't work.
              Try to do a query containing the "highlight=\%2527" string, it will not give you 403 (F-Forbidden) error. At least it didn't work in my case.
              Sorry for the late reply.
              Actually it does give a 403 if the string is "highlight=%2527". The slash is there to escape the percent sign in the regex, I guess.

              Comment

              • sdjl
                Senior Member
                • Mar 2004
                • 502

                #8
                Originally posted by djn
                The slash is there to escape the percent sign in the regex, I guess.
                Correct. % would be treated as a special character.

                David
                -----
                Do you fear the obsolescence of the metanarrative apparatus of legitimation?

                Comment

                Working...