cbc message board killed by javascript?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Unreal

    cbc message board killed by javascript?

    Some porn spammer posted some javascript to this board





    and now it automatically redirects all visitors to an xxx site.

    How is he doing this mischief? Is there way to post a 2nd javascript post
    that would kill the malicious javascript?

    tia!
  • Randy Webb

    #2
    Re: cbc message board killed by javascript?

    Unreal wrote:[color=blue]
    > Some porn spammer posted some javascript to this board
    >
    >
    > http://pub.alxnet.com/guestbook?id=2009014
    >
    >
    > and now it automatically redirects all visitors to an xxx site.[/color]

    No, it only redirects those with scripting enabled.
    [color=blue]
    > How is he doing this mischief?[/color]

    using the onload attribute of an img tag to set the location.href property.
    [color=blue]
    > Is there way to post a 2nd javascript post
    > that would kill the malicious javascript?[/color]

    Not easily. It would be easier to remove the offending post to begin with.

    <B>Name:</B> <A HREF="mailto:to nsoftacos&#064; hotmail.com">ta cos</A><BR>
    <B>Homepage:</B> <A HREF="http://www.kinkyshit.n et"
    TARGET="_self"> http://www.kinkyshit.n et</A><BR>
    <B>Hometown:</B> http://www.kinkyshit.n et<BR>
    <B>Sent:</B> 6.49 - 8/29<BR>
    <BR><img src="http://www.dailyfreshp orn.com/x.jpg"
    onload="documen t.location.href ='http://www.kinkyshit.n et'"><BR>
    <HR>

    There is your offending code. Remove it and all problems are solved.
    Temporarily. It would be easier to change the script on the server to
    remove scripts and onload attributes.

    --
    Randy
    comp.lang.javas cript FAQ - http://jibbering.com/faq

    Comment

    • Lasse Reichstein Nielsen

      #3
      Re: cbc message board killed by javascript?

      Unreal <name@numb.co m> writes:
      [color=blue]
      > Some porn spammer posted some javascript to this board[/color]

      Inventive buggers. I'm usually against the death penalty, but for
      spammers, I'm not so sure.
      [color=blue]
      > http://pub.alxnet.com/guestbook?id=2009014
      > and now it automatically redirects all visitors to an xxx site.
      >
      > How is he doing this mischief?[/color]

      The easy way to find out is to disable javascript and go look at the page.
      The offending element seems to be this one:
      ---
      <img src="http://www.dailyfreshp orn.com/x.jpg"
      onload="documen t.location.href ='http://www.kinkyshit.n et'">
      ---
      [color=blue]
      > Is there way to post a 2nd javascript post
      > that would kill the malicious javascript?[/color]

      Probably not. You might, if you are lucky, have your script executed
      before his image is done loading, and then remove his onload handler.
      However, the next time a browser gets there, the image is already in the
      cache, so I doubt any script will be fast enough.

      Fixing this is a job for the site administrator. He might want to
      filter submissions in the future (no HTML input is a good beginning)
      to avoid recurring problems.

      /L
      --
      Lasse Reichstein Nielsen - lrn@hotpop.com
      DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
      'Faith without judgement merely degrades the spirit divine.'

      Comment

      • Michael Winter

        #4
        Re: cbc message board killed by javascript?

        On Sat, 11 Sep 2004 16:44:29 GMT, Unreal <name@numb.co m> wrote:
        [color=blue]
        > Some porn spammer posted some javascript to this board
        >
        > http://pub.alxnet.com/guestbook?id=2009014
        >
        > and now it automatically redirects all visitors to an xxx site.
        >
        > How is he doing this mischief? Is there way to post a 2nd javascript
        > post that would kill the malicious javascript?[/color]

        The user has included an image and attached the load intrinsic event to
        it. When the image is loaded, his code is called and the page is reloaded
        with the new URI.

        The simplest way to prevent this is to strip all HTML from input, or
        render it harmless by replacing angle brackets with the &lt; and &gt;
        entity references. If you do want posters to format their posts, I'd just
        do what most forum systems do: define a limited set of character
        sequences, like [i] for italics, and replace them with the actual HTML,
        <em> or <i> in this case, when the message is uploaded to the server.

        If you want more information on how to do this, you're now in the realm of
        server-side languages, so you'll need to search for the relevant
        newsgroup(s).

        By the way, you might want to contact the service provider of that site. I
        found their terms and conditions, which specifically prohibits spamming.
        It also bans "material that is illegal, libelous, tortuous, or likely to
        result in retaliation against Phatservers.net ." The adult site might be
        deemed to fall under that catagory (I didn't check).

        Address your e-mails to

        tech@phatserver s.net

        and

        support@phatser vers.net

        but remember to keep the original data. You'll need proof to back-up a
        complaint.

        Good luck,
        Mike

        --
        Michael Winter
        Replace ".invalid" with ".uk" to reply by e-mail.

        Comment

        • Unreal

          #5
          Re: cbc message board killed by javascript?

          "Michael Winter" <M.Winter@bluey onder.co.invali d> wrote in
          news:opsd6bsk0h x13kvk@atlantis :
          [color=blue]
          > On Sat, 11 Sep 2004 16:44:29 GMT, Unreal <name@numb.co m> wrote:
          >[color=green]
          >> Some porn spammer posted some javascript to this board
          >>
          >> http://pub.alxnet.com/guestbook?id=2009014
          >>
          >> and now it automatically redirects all visitors to an xxx site.
          >>
          >> How is he doing this mischief? Is there way to post a 2nd javascript
          >> post that would kill the malicious javascript?[/color]
          >
          > The user has included an image and attached the load intrinsic event
          > to it. When the image is loaded, his code is called and the page is
          > reloaded with the new URI.
          >
          > The simplest way to prevent this is to strip all HTML from input, or
          > render it harmless by replacing angle brackets with the &lt; and &gt;
          > entity references. If you do want posters to format their posts, I'd
          > just do what most forum systems do: define a limited set of character
          > sequences, like [i] for italics, and replace them with the actual
          > HTML, <em> or <i> in this case, when the message is uploaded to the
          > server.
          >
          > If you want more information on how to do this, you're now in the
          > realm of server-side languages, so you'll need to search for the
          > relevant newsgroup(s).
          >
          > By the way, you might want to contact the service provider of that
          > site. I found their terms and conditions, which specifically
          > prohibits spamming. It also bans "material that is illegal, libelous,
          > tortuous, or likely to result in retaliation against
          > Phatservers.net ." The adult site might be deemed to fall under that
          > catagory (I didn't check).
          >
          > Address your e-mails to
          >
          > tech@phatserver s.net
          >
          > and
          >
          > support@phatser vers.net
          >
          > but remember to keep the original data. You'll need proof to back-up a
          > complaint.
          >
          > Good luck,
          > Mike
          >[/color]

          Thanks, fellas, I will let the board admin know and pass along all of
          your advice.

          Comment

          • Lāʻie Techie

            #6
            Re: cbc message board killed by javascript?

            On Sat, 11 Sep 2004 17:48:46 +0000, Michael Winter wrote:
            [color=blue]
            > The simplest way to prevent this is to strip all HTML from input, or
            > render it harmless by replacing angle brackets with the &lt; and &gt;
            > entity references. If you do want posters to format their posts, I'd just
            > do what most forum systems do: define a limited set of character
            > sequences, like [i] for italics, and replace them with the actual HTML,
            > <em> or <i> in this case, when the message is uploaded to the server.
            >
            > If you want more information on how to do this, you're now in the realm of
            > server-side languages, so you'll need to search for the relevant
            > newsgroup(s).[/color]

            Or do a quick google for "bbcode". I've seen back-ends in Perl and PHP,
            but you could carry this idea to any server-side language.

            Aloha,
            La'ie Techie


            Comment

            Working...