This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-04-15 21:07:37

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

XSS Shield for Scratch

http://img833.imageshack.us/img833/948/xssshield.png
XSS Shield is basically a UserScript which disables javascript insertions that may have happened.  For example, if you turned on html, then something this would prevent would be:

ShadyGuy wrote:

[htmladd]<button onload="while (true) {window.alert('SomeShadyTextHere');}">Click here for awesomeness</button>[/htmladd]

But XSS can come in many shapes and sizes.  It might even come as a like button.

ShadyGuy wrote:

Something really helpful here.
[likebtn]http://scratch.mit.edu/forums/viewtopic.php?tid=1234" onmousedown="while (true) {window.alert('Haha!  Gotcha!  Some more shady text here.')}[/likebtn]
[likecount]http://scratch.mit.edu/viewtopic.php?tid=1234[/likecount]

There are two versions:

Lite Version
Disables load, unload, and mouse events on flagged elements (images and links.)  Recommended if installing an insecure script.
Download Here: http://www.cfagency.org/xssshield_lite.user.js

Full Version
Disables all javascript events on all elements.  Recommended if you are enabling HTML.
Download Here: http://www.cfagency.org/xssshield.user.js

Last edited by GeonoTRON2000 (2012-04-15 21:55:50)


http://i.imgur.com/BAEgGDL.png

Offline

 

#2 2012-04-15 21:10:48

zippynk
Scratcher
Registered: 2011-07-23
Posts: 500+

Re: XSS Shield for Scratch

Cool!


https://dl.dropbox.com/u/60598636/trifocal_interlude_soundcloud_button.png

Offline

 

#3 2012-04-15 21:56:06

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: XSS Shield for Scratch

bump


http://i.imgur.com/BAEgGDL.png

Offline

 

#4 2012-04-16 00:05:48

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: XSS Shield for Scratch

bump


http://i.imgur.com/BAEgGDL.png

Offline

 

#5 2012-04-16 00:37:36

zippynk
Scratcher
Registered: 2011-07-23
Posts: 500+

Re: XSS Shield for Scratch

Well you could still do...

[ htmladd]
< /html>
[ /htmladd]

perhaps you should have it censor < /html> except for on the last line?


https://dl.dropbox.com/u/60598636/trifocal_interlude_soundcloud_button.png

Offline

 

#6 2012-04-16 08:02:46

ZeroLuck
Scratcher
Registered: 2010-02-23
Posts: 500+

Re: XSS Shield for Scratch

This doesn't really protect you from XSS.
It just disables some elements of the Scratch website which are using the "onclick", etc...


http://3.bp.blogspot.com/-oL2Atzp0Byw/T465vIQ36dI/AAAAAAAAADo/1vqL4PvhkM0/s1600/scratchdachwiki.png

Offline

 

#7 2012-04-16 10:06:16

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: XSS Shield for Scratch

zippynk wrote:

Well you could still do...

[ htmladd]
< /html>
[ /htmladd]

perhaps you should have it censor < /html> except for on the last line?

Good idea.


http://i.imgur.com/BAEgGDL.png

Offline

 

#8 2012-04-16 10:13:51

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: XSS Shield for Scratch

GeonoTRON2000 wrote:

zippynk wrote:

Well you could still do...

[ htmladd]
< /html>
[ /htmladd]

perhaps you should have it censor < /html> except for on the last line?

Good idea.

[htmladd]
</body>
[/htmladd]
The amount of things people can do is enormous.

Offline

 

#9 2012-04-16 10:15:40

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: XSS Shield for Scratch

[htmladd]
<div style="display:none;">
[/htmladd]


Posts: 20000 - Show all posts

Offline

 

#10 2012-04-16 10:25:10

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: XSS Shield for Scratch

Ok, I added the censoring to the script, it may not work, though...  It's a little feeble.  It's only in the full version.

Last edited by GeonoTRON2000 (2012-04-16 10:27:41)


http://i.imgur.com/BAEgGDL.png

Offline

 

#11 2012-04-16 10:31:06

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: XSS Shield for Scratch

veggieman001 wrote:

[htmladd]
<div style="display:none;">
[/htmladd]

Lol... that does nothing but hide itself.  I tried it.


http://i.imgur.com/BAEgGDL.png

Offline

 

#12 2012-04-16 18:46:32

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: XSS Shield for Scratch

GeonoTRON2000 wrote:

Ok, I added the censoring to the script, it may not work, though...  It's a little feeble.  It's only in the full version.

I need a way to get and set the whole document's html (including the html tags.)
Right now I have in mind for getting, and XMLHttpRequest to self, and for setting, document.write.  Any suggestions?


http://i.imgur.com/BAEgGDL.png

Offline

 

#13 2012-04-16 23:24:17

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: XSS Shield for Scratch

I found how for getting.  For setting, I'll use document.write.


http://i.imgur.com/BAEgGDL.png

Offline

 

#14 2012-04-16 23:43:54

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: XSS Shield for Scratch

GeonoTRON2000 wrote:

I found how for getting.  For setting, I'll use document.write.

Aw, forget it.  Removing these does more harm than good.  When you turn on HTML, you expect the forum to become a website.  Enjoy the lack of disguised rick-roll links and endless strings of alert boxes.


http://i.imgur.com/BAEgGDL.png

Offline

 

#15 2012-04-18 19:13:42

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: XSS Shield for Scratch

GeonoTRON2000 wrote:

GeonoTRON2000 wrote:

I found how for getting.  For setting, I'll use document.write.

Aw, forget it.  Removing these does more harm than good.  When you turn on HTML, you expect the forum to become a website.  Enjoy the lack of disguised rick-roll links and endless strings of alert boxes.

And to go along with rick rolls, we have the Rick Roller!!!!


http://i.imgur.com/BAEgGDL.png

Offline

 

Board footer