Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > cbc message board killed by javascript?

Reply
Thread Tools

cbc message board killed by javascript?

 
 
Unreal
Guest
Posts: n/a
 
      09-11-2004
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?

tia!
 
Reply With Quote
 
 
 
 
Randy Webb
Guest
Posts: n/a
 
      09-11-2004
Unreal wrote:
> 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.


No, it only redirects those with scripting enabled.

> How is he doing this mischief?


using the onload attribute of an img tag to set the location.href property.

> Is there way to post a 2nd javascript post
> that would kill the malicious javascript?


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

<B>Name:</B> <A HREF="mailto:tonsoftacos@hotmail.com">tacos</A><BR>
<B>Homepage:</B> <A HREF="http://www.kinkyshit.net"
TARGET="_self">http://www.kinkyshit.net</A><BR>
<B>Hometown:</B> http://www.kinkyshit.net<BR>
<B>Sent:</B> 6.49 - 8/29<BR>
<BR><img src="http://www.dailyfreshporn.com/x.jpg"
onload="document.location.href='http://www.kinkyshit.net'"><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.javascript FAQ - http://jibbering.com/faq
 
Reply With Quote
 
 
 
 
Lasse Reichstein Nielsen
Guest
Posts: n/a
 
      09-11-2004
Unreal <> writes:

> Some porn spammer posted some javascript to this board


Inventive buggers. I'm usually against the death penalty, but for
spammers, I'm not so sure.

> http://pub.alxnet.com/guestbook?id=2009014
> and now it automatically redirects all visitors to an xxx site.
>
> How is he doing this mischief?


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.dailyfreshporn.com/x.jpg"
onload="document.location.href='http://www.kinkyshit.net'">
---

> Is there way to post a 2nd javascript post
> that would kill the malicious javascript?


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 -
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
 
Reply With Quote
 
Michael Winter
Guest
Posts: n/a
 
      09-11-2004
On Sat, 11 Sep 2004 16:44:29 GMT, Unreal <> wrote:

> 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?


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



and



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.
 
Reply With Quote
 
Unreal
Guest
Posts: n/a
 
      09-11-2004
"Michael Winter" <> wrote in
newspsd6bsk0hx13kvk@atlantis:

> On Sat, 11 Sep 2004 16:44:29 GMT, Unreal <> wrote:
>
>> 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?

>
> 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
>
>
>
> and
>
>
>
> but remember to keep the original data. You'll need proof to back-up a
> complaint.
>
> Good luck,
> Mike
>


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

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: message board or bulletin board Vijay ASP .Net 0 12-30-2009 07:11 AM
CBC Interview Dudley Hanks Digital Photography 0 10-10-2008 11:05 PM
incorrect decryption using AES/CBC jimgardener Java 2 06-20-2008 03:43 PM
go here to complain to Logitech about your cam drivers http://forums.logitech.com/logitech/board/message?board.id=quickcam_software&message.id=911 hught1956 Windows 64bit 7 08-24-2006 02:06 PM
CBC You don't know what your missing fuzzy1 DVD Video 4 03-07-2004 03:06 AM



Advertisments
 



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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57