Bypassing NoScript Security Suite
Bypassing NoScript Security Suite
March 2016
Mazin Ahmed | [email protected] | @mazen160
Table of Contents
Abstract ............................................................................................................................... 3
Introduction ......................................................................................................................... 3
Research.............................................................................................................................. 4
Solution ............................................................................................................................... 7
Recommendations .............................................................................................................. 7
Notes .................................................................................................................................... 7
Disclosure Timeline ............................................................................................................ 8
Conclusion .......................................................................................................................... 8
References .......................................................................................................................... 9
Acknowledgement .............................................................................................................. 9
Page | 2
Mazin Ahmed
1. Abstract
NoScript Security Suite is a powerful security add-on for Firefox, Seamonkey and
other Mozilla-based browsers. Its main task is to block Javascript, Flash, Java, as well as
many other plugins from executing untrusted code on the users browser through blocking it
and only allowing certain trusted whitelisted sites.
This paper discusses different techniques that an attacker can use to bypass NoScript
Security Suite Protection. These techniques can be used by malicious vectors in bypassing
the default installation of NoScript. The paper also provides solutions and recommendations
for end-users that can enhances the current protection of NoScript Security Suite.
2. Introduction
NoScript (also known as NoScript Security Suite) is a free and open-source extension
that provides additional security protection from potential exploits by disabling Javascript,
Java, Flash, and other plugins for untrusted sites, and also provides a number of additional
features. It's a vital addition to ensure the maximum possible security for the user.
I will be demonstrating possible techniques that an attacker can use in order to
bypass NoScript. I will be also explaining a mechanism that I have developed in bypassing
the default installation of NoScript Security Suite.
Page | 3
Mazin Ahmed
3. Research
This section discusses the results of the conducted research.
Page | 4
Mazin Ahmed
The browser is using the default installation of NoScript. The XSS payload has been executed
successfully without any interruption by NoScript Security Suite.
Page | 5
Mazin Ahmed
Now, whenever a client that is protected by NoScript makes an HTTP request, the
BetterCap module would handle all the work, and ensures the executing of the Javascript
payload within the victim's browser.
Figure 2: A screenshot that shows the execution of Javascript against a victims browser while using the BetterCap Module.
Page | 6
Mazin Ahmed
4. Solution
The following are suggested solutions for the discussed issues with the research
Update NoScript to the latest version.
If you would to ensure the maximum possible protection, you need to customize the
configurations using the recommendations in the next section.
5. Recommendations
Ensure that Forbid active web content unless it comes from a secure (HTTPS)
connection option is set to Always.
Validate each entry in the whitelisted domains, and delete unnecessary whitelisted
domains.
6. Notes
Users of TOR browsers are not affected by the second and third bypass by default, since
TOR is prebuilt with custom NoScript that does not include any whitelisted domain.
However, you may need to double-check if your TOR browser has Forbid active web
content unless it comes from a secure (HTTPS) connection option set to Always.
Page | 7
Mazin Ahmed
7. Disclosure Timeline
October 25th, 2015 Initial Disclosure.
October 26th,2015/November 04th, 2015 Discussion regarding a possible patch.
November 19th, 2015 I Sent a proof of concept to the developer.
November 20th, 2015/November 21th, 2015 Discussion regarding the exploitation of the
issue.
December 17th, 2015 Initial patch has been publicly released on NoScript v2.7 by
removing a number of sites to reduce the attack surface.
January 2st, 2016 I Demonstrated the missing points in the initial patch, and providing a
second proof of concept.
January 08th, 2016 The developer asked for further information.
January 11th, 2016 I Responded with required information.
January 23th, 2016 The developer agreed to implement the proposed solution.
March 16th, 2016 A patch has been released on NoScript v2.9.0.5 to automatically
upgrade to HTTPS sites found in the default whitelisting.
8. Conclusion
NoScript is one of the most essential projects in the field for protecting the end-user
from known (and unknown exploits in few cases). I'm a big supporter of the project, and I'm
glad to help in increasing the security of NoScript Security Suite.
When testing NoScript protection, I have come to conclusion that NoScript, is as
same as any security product, can be bypassed in a certain way. Although the protection
and the way of evading could differ from a product to another, in the end, a full evasion can
always be possible.
This was a short research that discusses how can NoScript Security Suite be bypassed
using Cross-Site Scripting attacks against the default whitelisted sites on the default
installation of NoScript. It also showed how we can use network attacks in bypassing the
default installation of NoScript Security Suite.
Page | 8
Mazin Ahmed
9. References
[1]: https://dustri.org/b/noscript-script-disabled-bypass-poc-for-tails-13.html
[2]: http://blog.portswigger.net/2015/07/noscript-xss-filter-bypass.html
10. Acknowledgement
I would like to thank the following individuals for their contribution during the research.
Giorgio Maone
Simone Margaritelli
Page | 9
Mazin Ahmed