How to unhide antiClickjack protected website

Ask for help about NoScript, no registration needed to post
Guest

How to unhide antiClickjack protected website

Post by Guest »

Is there a way to unhide the contents of helpx.adobe.com without permitting Java-script?

I found the following css in the head of https://helpx.adobe.com/acrobat.html
<style id="antiClickjack">body{display:none !important;}</style>

How do I disable this line? But I don't want to allow Java-script for that site.
Mozilla/5.0 (Windows NT 5.1; rv:35.0) Gecko/20100101 Firefox/35.0
barbaz
Senior Member
Posts: 11143
Joined: Sat Aug 03, 2013 5:45 pm

Re: How to unhide antiClickjack protected website

Post by barbaz »

try add these two prefs to about:config ** edited per Thrawn's comment below **

Code: Select all

noscript.surrogate.helpxadobe.replacement : window.addEventListener('load', function(){if (window !== window.top) { return; } document.body.style.setProperty('display', 'block', 'important');}, false);
noscript.surrogate.helpxadobe.sources : !helpx.adobe.com
*Always* check the changelogs BEFORE updating that important software!
-
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: How to unhide antiClickjack protected website

Post by Thrawn »

:D That's kind of funny; they're actually using the clickjack protection suggested by OWASP. Effective, but dependent on JavaScript. I wonder why they aren't also sending X-Frame-Options?

Overriding it with a surrogate defeats the purpose of the protection, of course, but I expect NoScript would handle an actual attack just fine.
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0
barbaz
Senior Member
Posts: 11143
Joined: Sat Aug 03, 2013 5:45 pm

Re: How to unhide antiClickjack protected website

Post by barbaz »

Thrawn wrote: :D That's kind of funny; they're actually using the clickjack protection suggested by OWASP. Effective, but dependent on JavaScript. I wonder why they aren't also sending X-Frame-Options?

Overriding it with a surrogate defeats the purpose of the protection, of course, but I expect NoScript would handle an actual attack just fine.
Interesting. I'll tweak that surrogate a bit to still honor the intent.
*Always* check the changelogs BEFORE updating that important software!
-
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: How to unhide antiClickjack protected website

Post by Thrawn »

NoScript actually does that already for your garden-variety framebuster, but I guess not for the full OWASP version.
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0
barbaz
Senior Member
Posts: 11143
Joined: Sat Aug 03, 2013 5:45 pm

Re: How to unhide antiClickjack protected website

Post by barbaz »

Oh.. didn't realize that "framebuster" doesn't necessarily mean

Code: Select all

window.top.location.href = window.location.href
:oops:

So then this is a NoScript bug, NS should be detecting the framebuster script and if either the document element or the body are hidden by display:none, unhide them.

Is it worth moving this to Development and re-titling it?
*Always* check the changelogs BEFORE updating that important software!
-
User avatar
Giorgio Maone
Site Admin
Posts: 9546
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: How to unhide antiClickjack protected website

Post by Giorgio Maone »

barbaz wrote:Oh.. didn't realize that "framebuster" doesn't necessarily mean

Code: Select all

window.top.location.href = window.location.href
:oops:

So then this is a NoScript bug, NS should be detecting the framebuster script and if either the document element or the body are hidden by display:none, unhide them.
Not quite.
NoScript actually implements framebusting emulation, i.e. it makes the (rather ineffective) JavaScript-based active (i.e. depending on JavaScript to be protective) framebusting techniques work even if JavaScript is disabled.
OWASP version is protective by default (i.e. it still protects with scripts disabled) but if scripts are disabled makes the website unusable.
So this is not a NoScript bug, but from an usability perspective having a surrogate like Thrawn's which makes the site work fine even without allowing JavaScript is really nice to have, especially if this is copy&paste code "standardized" by OWASP.
Putting it in my TODO list for next release, thanks.
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0
User avatar
Giorgio Maone
Site Admin
Posts: 9546
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: How to unhide antiClickjack protected website

Post by Giorgio Maone »

Please check latest development build, thanks.
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0
barbaz
Senior Member
Posts: 11143
Joined: Sat Aug 03, 2013 5:45 pm

Re: How to unhide antiClickjack protected website

Post by barbaz »

Giorgio Maone wrote:Please check latest development build, thanks.
Thanks.
(Actually the surrogate in this thread was by me)
Giorgio Maone wrote:especially if this is copy&paste code "standardized" by OWASP.
Is it worth changing it to not depend on specific copy-and-paste code? Like maybe this:

Code: Select all

if(window.top===window){let c=window.getComputedStyle(document.body).display;if (c == 'none'){document.body.style.setProperty('display', 'inherit', 'important');}let h=window.getComputedStyle(document.documentElement).display;if (h == 'none'){document.documentElement.style.setProperty('display', 'block', 'important');}}
That takes care of the framekiller on Wikipedia as well.
*Always* check the changelogs BEFORE updating that important software!
-
User avatar
Giorgio Maone
Site Admin
Posts: 9546
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: How to unhide antiClickjack protected website

Post by Giorgio Maone »

barbaz wrote: (Actually the surrogate in this thread was by me)
Fixed in the credits.
barbaz wrote: Is it worth changing it to not depend on specific copy-and-paste code? Likely:
probably.
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0
barbaz
Senior Member
Posts: 11143
Joined: Sat Aug 03, 2013 5:45 pm

Re: How to unhide antiClickjack protected website

Post by barbaz »

Giorgio Maone wrote:
barbaz wrote: Is it worth changing it to not depend on specific copy-and-paste code?
probably.
bump
*Always* check the changelogs BEFORE updating that important software!
-
barbaz
Senior Member
Posts: 11143
Joined: Sat Aug 03, 2013 5:45 pm

Re: How to unhide antiClickjack protected website

Post by barbaz »

Thanks Giorgio for fixing that in NoScript 2.6.9.22rc1 :D
*Always* check the changelogs BEFORE updating that important software!
-
Post Reply