Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async configuration retrieval allows for easy full cross-browser bypass techniques. #71

Closed
hackademix opened this issue Sep 18, 2020 · 4 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@hackademix
Copy link
Contributor

hackademix commented Sep 18, 2020

First of all, thanks for this interesting project. I do hope we can cooperate in the future to make the web safer.

JS Restrictor currently uses async messaging to retrieve the wrapping configuration depending on the current URL in the document_start.js content script.

This allows for easy cross-browser bypass of all the restrictions (beside browser-specific ones like issue #25), because page scripts can be run before JS Restrictor's injection and sabotage it.

Proof of concept here, based on https://polcak.github.io/jsrestrictor/test/test.html with a twist.

@polcak
Copy link
Owner

polcak commented Sep 18, 2020

Hello,

unfortunately https://maone.net/test/jsrestrictorbypass/ gives me 404 error.

By any chance, is this the same issue as described in #40 (comment)?

@hackademix
Copy link
Contributor Author

Sorry for the typo, it's https://maone.net/test/jsrbypass/ - fixed also in the original report.

@polcak polcak added the bug Something isn't working label Sep 18, 2020
@polcak
Copy link
Owner

polcak commented Sep 18, 2020

Thank you. The code (a first head child):

<script>

   let p = Performance;
   window.__defineGetter__("Performance", function() {
           
           window.__defineGetter__("Performance", function() { return p; });
           console.log(new Error().stack);
           if (confirm("Do you want to bypass JavaScript Restrictor?")) throw "JavaScript Restrictor bypassed!";
           return p;
        });

</script>

@polcak polcak added the duplicate This issue or pull request already exists label May 4, 2021
@polcak
Copy link
Owner

polcak commented May 4, 2021

Thanks Giorgio for reporting #40 (comment). AFAICS this is a duplicate of #40. Hopefully, you persuade browser developers to implement the required API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants