-
Notifications
You must be signed in to change notification settings - Fork 846
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
WebDriverError / "Unknown error while attempting to screenshot" #488
Comments
First off, I'd love to congratulate you on probably the most detailed bug report we have ever received. It is super helpful to see all the information that you provided, so thank you. I do have one question, if you use EyeWitness to scan other sites, do they work? As for why you might be seeing the screenshot but not in the report, EyeWitness makes two requests to each web page in order to generate the report. One request attempts to capture the screenshot, the other captures the source code, headers, etc. It's possible that the screenshot part is working (it's using firefox headlessly to capture it), but the python request to capture the other information is what is failing and therefore resulting in that being shown in the report. |
Yes, EyeWitness can scan other sites, report populates as expected. I just tried a different kind of IoT'ish device and got a screenshot (still going through Burp as well). Exact command was:
I'm playing with python requests for other scripts (I have an idea for using ssdeep to identify same systems even if the page is slightly different, I was tossing around how EyeWitness might leverage it). Requests do seem to work for me, so long as you use verify=false, e.g.
|
Got it to work, sort of. I didn't realize when i posted my comment above you were using urllib.requests, not the requests library, so the verify false won't work. It does look like you're using the equivalent for urllib.requests though (about line 191). First, I traced the problem back to selenium_module.py, this part here, and note the debug stuff I inserted:
I don't think the full dump from headers is really useful, but if you want it, I'll be happy to post it. The error though was
Ok, odd for something going through Burp, Burp should have added all it's own protocols and corrected for this. however, I knocked the settings in /etc/ssl/openssl.cnf down to TLSv1.0 and re-ran EyeWitness. New error this time:
At this point, I'm convinced something is wrong with Burp. I ran the latest testssl.sh script with the --proxy flag to send it through Burp. I definitely see new protocols and cipher suites that weren't there before. We have SSLv3 all the way to TLSv1.2, we also have triple DES ciphers, AEAD ciphers, etc. that weren't there yesterday, nothing looks wrong with Burp:
New theory at this point is that the first request you mentioned (for the screenshot) is being proxied, but the request for headers and other information is not being proxied. In digging for a way to manually add that for testing, I notice that urllib will automatically respect proxy settings set by environment variable. So I set the following:
Rerun EyeWitness, and everything seems to work! It seems like the root cause is the second python request not respecting the proxy settings. It looks like someone can manually overcome this by setting both the proxy settings when starting EyeWitness (for the screenshot) and the proxy settings in environment variables (for the other information). |
Pushed a fix for this, thanks for reporting this to us! |
Sorry, just now getting around to testing out the changes and found one problem. It looks like it's trying to treat the cli_parsed.proxy_port as an int, and then trying to concatenate that with the string:
Wrapping the port in a str() seems to work, but there may be better ways to do this:
|
Yup, you were right, I didn’t handle that correctly. I just pushed in the fix for that too. Thanks! |
OS Used - ALL Information (architecture, linux flavor, etc.)
New/Weekly build of Kali (kali-linux-2020-W28-installer-amd64) / Linux hostname 5.6.0-kali2-amd64 #1 SMP Debian 5.6.14-2kali1 (2020-06-10) x86_64 GNU/Linux
I did not install eyewitness via apt. I cloned the repo and ran setup.sh
Pastebin link to error you are encountering
Correcting for this results in a screenshot being taken, but a report with an error message of "Unknown error while attempting to screenshot" in the column where the screenshot should be.
Expected behavior (vs. what you encountered)
Plethora of screenshots
Any additional information
This is some pretty old IoT stuff that I'm attempting to inventory. I have the feeling that this is related to SSL/TLS ciphers, but I just can't get things to work. Visiting the page in Firefox results in the following error:
Chromium results in:
So my thought was to proxy traffic through Burp and let Burp handle the TLS connection. After installing the certificate and configuring proxy settings, I can now get to the login page on either Firefox Or Chromium. However, when trying to screenshot the page, I get odd behavior. The report seems to finish successfully, but I have the error "Unknown error while attempting to screenshot" in my report
I also see the following error lines on the terminal:
However, there is a correct screenshot within the "screens" folder. I'm not sure at all why it's saying Unknown error. I'm not sure if it's related to using Burp, thus the annoyingly long background story for this. TL;DR I guess is that it works, however, this report will include a massive number of systems, so it's desirable to have the screenshot in the report, and not have to manually sort through the screens folder.
The Burp options are pretty much at their default now, intercept is off, but it still takes a -long- time to request these pages (longer than I feel it should, thus the 60 second timeout).
I know the original problem was related to SSL/TLS settings, so I'm including the testssl.sh results below in case they are useful regarding the webdrivererror issue.
The text was updated successfully, but these errors were encountered: