-
Notifications
You must be signed in to change notification settings - Fork 32
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
3.detectStackTrace doesn't seem to be working! #2
Comments
@dpnishant our testcases are organized as pair of files:
In case of stack trace detection, our point was that it is not possible to spoof the stack trace without recompiling phantomjs, therefore there is no corresponding |
Hi @shekyan, I understand your point and that's exactly how I have tested other cases. All of them are working as expected (both detection and spoofing) except this one. Running this one doesn't return any output and sort of "hangs". And also 5.detectMissingFunctionBind.html returns "environment not detected" every time. |
that can actually be run
Just created #3 that might help to understand stacktrace detection. to see how to see how detection code returns |
@dpnishant regarding detecting missing |
Wow! That was fast. It is working flawlessly now. Thank you so much @shekyan 👍 |
Hey @shekyan What am I doing wrong in here: http://pastie.org/10708473 that it says "PhantomJS detected in all browsers?" How is this test then specific to only Phantomjs? |
@dpnishant I would recommend reading the blog post or watch the presentation. Slides or the actual presentation. Key paragraph in the blog post on this is:
Calling honeypot The real life scenario is that if you know that somebody is doing something with your website with PhantomJS and, for example, is calling |
Thanks @shekyan for being so patient! 👍 I did watch the youtube talk, read the slides and the blog which is how I got know this repository exists. I read the code as well and it somewhat seems confusing to me that if I "know" someone is using PhantomJS why would I again need to "know" it by detecting the stack-trace. To me this seems to be more of a false positive reduction technique may be combined with Is my understanding right, Sergey? |
The idea is to have a honeypot DOM API that preserves it's original behavior if called by a legitimate browser and reports a phantomjs AND maybe does something to prevent phantomjs from functioning properly. Original example was reading a local file (/etc/passwd as example) and sending it somewhere. That'd be possible if same origin policy is disabled, which is a requirement by many frameworks that use phantomjs. Another point is that it is not possible (without heavily modifying webkit's JavaScriptCore code) to make phantomjs stack trace to look like a real browser's stacktrace, while most of the other techniques people use to identify phantomjs can be relatively easily bypassed. |
Running
phantomjs hsloader 3.detectStackTrace.html
doesn't return anything.Tested it on PhantomJS 2.1, 2.0 and 1.9.8
https://github.com/ikarienator/phantomjs_hide_and_seek/blob/master/3.detectStackTrace.html
The text was updated successfully, but these errors were encountered: