473,396 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

cbc message board killed by javascript?

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!
Jul 23 '05 #1
5 1408
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
Jul 23 '05 #2
Unreal <na**@numb.com> 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 - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #3
On Sat, 11 Sep 2004 16:44:29 GMT, Unreal <na**@numb.com> 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

te**@phatservers.net

and

su*****@phatservers.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.
Jul 23 '05 #4
"Michael Winter" <M.******@blueyonder.co.invalid> wrote in
news:opsd6bsk0hx13kvk@atlantis:
On Sat, 11 Sep 2004 16:44:29 GMT, Unreal <na**@numb.com> 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

te**@phatservers.net

and

su*****@phatservers.net

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.
Jul 23 '05 #5
On Sat, 11 Sep 2004 17:48:46 +0000, Michael Winter wrote:
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).


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
Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Steve Edwards | last post by:
A designer friend of mine is looking to create a web site for a group of people who share ownership of a property. The two things they would like to do would be to have a calendar function so the...
1
by: zach.bastick | last post by:
Can anyone possibly point me to, or give me a history of web-based message boards. There is a lot of information on BBSes Fidonet IRC etc, but I can not seem to find anything on message boards....
2
by: delisonews | last post by:
I'm looking for a simple, filesystem-based message board. (No MySQL!) Something that I could include easily in my code: include '../inc/messageboard.php'; .... so that the board shows up at...
0
by: Vin | last post by:
Hi, I've got a VB.Net + ASP.Net message board application which has already been customized. There are two solutions in this application. 1. The front end aspx, aspx.vb files, User controls...
2
by: Patrick Olurotimi Ige | last post by:
Hi All, Can anybody forward me a free Bulletin/Message Board built with ASP.NET! Any other resources would be appreciated... *** Sent via Developersdex http://www.developersdex.com *** Don't...
3
by: lakepeir | last post by:
Can anyone suggest some good online tutorials on creating a message board with ASP .NET? Thanks.
1
by: Bullitt | last post by:
Subject: Earth IS The Black Hole of the Universe ! ( NBC ) On Thu 08/03, NBC From: NBC Jay Leno Message Board I thought you might be interested in reading this web page:
7
by: PW | last post by:
Hi, I'm an amateur ASP programmer using ASP, VBScript, IIS and IE. On one of my websites (www.usaus.org) I have started getting lots of adverts on my message board. Things like free...
4
by: Frank Miverk | last post by:
Hi, Curious to know if there are any C# asp.net message board code with sql server database schema. Something similar to the php Serendipity blog would be perfect. Even something more...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.