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

iframe sandbox #14

Closed
arnaldo-rastani opened this issue Jun 25, 2019 · 4 comments
Closed

iframe sandbox #14

arnaldo-rastani opened this issue Jun 25, 2019 · 4 comments

Comments

@arnaldo-rastani
Copy link

Hi!
I've been struggling to escape the iframe sandbox. It seems that it can't be undone. I believe it also involves windows.location at some level. No matter what I do (rewrite DOM, change values), it does not seem to work. The values can be changed using javascript replace function, but the page won't work afterwards. So the iframe must be manipulated before loading.
This is the code that's killing me:

<iframe src="https://www.google.com/recaptcha/api2/anchor?ar=1&amp;k=XXX&amp;co=XXX&amp;hl=en&amp;v=v1560753160450&amp;size=normal&amp;cb=ly6d3pq1fuk4" width="304" height="78" role="presentation" name="a-gj16nmeghwr" frameborder="0" scrolling="no" sandbox="allow-forms allow-popups allow-same-origin allow-scripts allow-top-navigation allow-modals allow-popups-to-escape-sandbox"></iframe>

Does anybody know a workaround? Maybe some tips? I would really appreciate it.

@ohpe
Copy link
Member

ohpe commented Sep 3, 2019

Why don't you try to remove the sandbox attribute?

@ohpe ohpe closed this as completed Sep 3, 2019
@jaredxx1
Copy link

jaredxx1 commented Sep 3, 2019

It does not work. I think it's because recaptcha__en.js (https://www.gstatic.com/recaptcha/api2/v1565591531251/recaptcha__en.js) has a function which reads the url from the address bar. It's an invisible recaptcha which shows after 5th wrong input attempt. Search for window.location inside recaptcha__en.js. It's the third occurrence. I've tried multiple solutions like replacing the "co" parameter value with the original one using javascript injection. Because "co" is basically "https://www.target.com:443" in base64. I've also tried to download and replace the "window.location.href" with the target website. None worked. I wonder how can I trick this one to think as I am on the real website. Any thoughts?

@ohpe
Copy link
Member

ohpe commented Sep 4, 2019

Did you enable the base64 option in the config?

"transform": {
 "base64": {
 "enabled": true,
 "padding": [
 "=",
 "."
 ]
 },

@jaredxx1
Copy link

jaredxx1 commented Sep 4, 2019

Yes, base64 option is enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants