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

Eyewitness does nothing, just loads infinitely #642

Open
atharvak95 opened this issue Jan 22, 2024 · 30 comments
Open

Eyewitness does nothing, just loads infinitely #642

atharvak95 opened this issue Jan 22, 2024 · 30 comments

Comments

@atharvak95
Copy link

atharvak95 commented Jan 22, 2024

I am running a WSL kali linux & i installed eyewitness using the command sudo apt install eyewitness. It installed correctly.

when I try to run it, it just stalls infinitely. So i thought might be an issue with the package from Kali. So tried your repo as well.

I get the same issue. I have installed geckodriver & chromium as well to support it, but it doesn't generate anything.

the /ds.txt file of mine as per screenshot contains only 5 urls for me to test. Still no luck. Waited 15 mins, still nothing.

Check screenshot, coz I can't think of how to fix this.

issue
@digininja
Copy link
Contributor

Make sure that you full uninstall anything that was installed by the package manager and then run the python setup again watching the setup script for any errors.

The package will probably be out of date and may have installed things that the repo version is then using rather than the version that it should be using.

@atharvak95
Copy link
Author

Make sure that you full uninstall anything that was installed by the package manager and then run the python setup again watching the setup script for any errors.

The package will probably be out of date and may have installed things that the repo version is then using rather than the version that it should be using.

Still nothing, i removed it all & installed from the repo.

tried changing my command to sudo as well & running it.

still blank.

check screenshots.
blank
command

@digininja
Copy link
Contributor

Running it with sudo won't work due to sandboxing with the geko drivers.

What happens if you run it against a single site?

Can you post the output from the setup script in pastebin and drop a link to here.

@atharvak95
Copy link
Author

Running it with sudo won't work due to sandboxing with the geko drivers.

What happens if you run it against a single site?

Can you post the output from the setup script in pastebin and drop a link to here.

the setup ran successfully but when i try to run a single URL it gives me this error - check screenshot
ERROR

@digininja
Copy link
Contributor

That error says it can't create the output directory, check the permissions on that directory.

Or point the output somewhere else with -d.

And I'm asking for the setup output as there may be something in there that shows an error, just because it completes, doesn't mean it was successful. Having seen this error, it is unlikely the setup script that is at fault, but it would be good to see it, just in case.

@atharvak95
Copy link
Author

That error says it can't create the output directory, check the permissions on that directory.

Or point the output somewhere else with -d.

And I'm asking for the setup output as there may be something in there that shows an error, just because it completes, doesn't mean it was successful. Having seen this error, it is unlikely the setup script that is at fault, but it would be good to see it, just in case.

pointed it to another directory & it gets to this & stalls -
error 2

Ran the setup script & here's the output, no errors -
output 1

@digininja
Copy link
Contributor

I'm going to try this once more then give up, can I get all the output from setup in pastebin or something like that rather than screenshot of half of it.

And for the question, did you answer y and press enter? What was the full command you used to start it?

@atharvak95
Copy link
Author

atharvak95 commented Jan 23, 2024

I'm going to try this once more then give up, can I get all the output from setup in pastebin or something like that rather than screenshot of half of it.

And for the question, did you answer y and press enter? What was the full command you used to start it?

here's the output on pastebin link - https://pastebin.com/25KStVFu

and yes i pressed enter key after pressing Y, still it stalled.

Command used - python3 EyeWitness.py -f /home/kali/domains.txt -d /home/kali/new_folder/

@0x6d6f7468
Copy link
Collaborator

Hey @atharvak95 , thanks for reporting this issue.

The output of your setup script seems fine from here. I can think of a few things to try. First, after uninstalling EyeWitness from repo, did you run anything like apt autoremove? Looks like the python packages were already installed and I'm wondering if this could be a dependency version thing.

Also, have you tried running EyeWitness with sudo or as root? I would be interested to hear if this changes anything, given the permission denied error you got previously.

If nothing else, I can see if anybody I work with has a Kali WSL available to see if we can reproduce the behavior.

Thanks!

@digininja
Copy link
Contributor

My guess is that there is a dependency issue caused by the package version installing things then not removing them correctly when the package was removed.

I've just re-ran the setup script on one of my Kali boxes and the versions of some of the Python libraries are different to the ones shown in the setup output.

Would you be able to setup a new Kali instance and try on that? We know the script works fine on Kali so it could be either WSL or dependencies with my money being on the dependencies.

For running it as sudo, didn't we decide that that wouldn't work properly due to sandboxing and it was best not to run as root?

@0x6d6f7468
Copy link
Collaborator

I just used EW on a Kali box on my current gig, so I know that's not a problem.

Also Kali is different from Ubuntu. Running as root on Kali causes no issues because the Firefox that installs from apt is not from the snap store and therefore not sandboxed (at least not in the same way).

@digininja
Copy link
Contributor

I was comparing the versions to my Kali box.

And I remember the sudo snap problem now, Ubuntu not Kali.

@atharvak95
Copy link
Author

I completely uninstalled the WSL & reloaded it. The I ran sudo apt update && sudo apt full-upgrade --fix-missing
Then i git cloned Eyewitness & ran the setup.sh
then I tried to run the command python3 EyeWitness.py -f /home/kali/domains/urls.txt & it fails, shows this error -
image

so i changed the destination of output by running command - python3 EyeWitness.py -f /home/kali/domains/urls.txt -d /home/kali/urls_2.txt
then it shows directory exists do you want to overwrite? i press Y & enter.
It stalls again
image

tried it with sudo of these commands just in case, but that hasn't worked either. just stalls.

@0x6d6f7468
Copy link
Collaborator

Alright, thanks for trying those things and responding. I don't have a Kali WSL instance on-hand, so I'm checking if anybody on our crew has one available for testing.

In the meantime, have you considered trying the Docker container version of EyeWitness? There are instructions for it in the README. Full disclosure I'm not sure how well Docker works through WSL, but I just want to figure out an alternative solution for you while we look into this.

Thanks.

@atharvak95
Copy link
Author

do you guys use Kali full version in VMware or Virtualbox ? is that's why it's working for you guys & not for me on WSL ?

Meanwhile I'll try it on Docker.

@0x6d6f7468
Copy link
Collaborator

I am using full VM installations of Parrot Security and Kali Linux. I know that works, but I also know that I can't simply tell you "it works for us" and dismiss the issue.

I have no idea what potential differences there might be between WSL and a full VM, so I think more testing will be required to figure this out.

Haven't yet heard from anybody using Kali WSL so it's mostly a lack of data right now. If you could, it might also be worth considering running a full Kali VM.

@atharvak95
Copy link
Author

okay i'll try full version Kali in VMware/Virtualbox - which of these have cross platform copy/paste function ? As far as I know VMware community edition does not have it.

@0x6d6f7468
Copy link
Collaborator

VMware Player and VirtualBox should both support copy/paste, as far as I know. You might need to disable guest isolation and install the open-vm-tools-desktop package in the guest VM.

@atharvak95
Copy link
Author

I tried again on a fresh install of WSL as well as a full VM of Kali. Nothing seems to be working. Tried docker as well, but something seems to be going wrong with the tool itself that it's getting stalled.

@digininja
Copy link
Contributor

digininja commented Jan 28, 2024 via email

@atharvak95
Copy link
Author

Yeah I have tried different websites as well. Doesn't work. Can you test on your Kali WSL from Microsoft store?

@0x6d6f7468
Copy link
Collaborator

Well this seems strange then, if it's not working across multiple installations and Linux environments, then I'm wondering if it's a WSL issue at all.

Are you able to curl/wget any of the resources you're trying to capture in EyeWitness? Are you behind any sort of web proxy?

@azizp128
Copy link

Same in my case. I tried to install and run it in WSL 2, but it still couldn’t work. Eventually, I used the Windows version instead. I assume maybe the problem lies in the default installation settings of the WSL browsers. Haven't tried to dig in more into this problems.

@Relkci
Copy link
Collaborator

Relkci commented May 20, 2024

For those wanting to run on Windows in WSL, the C# version is still around :)

That said, EW on WSL2 Ubuntu 22.04 seems to work ok for me.

The setup.sh script was recently rebuilt. Perhaps this fixed the issue?

@atharvak95
Copy link
Author

Collaborator

so i did a fresh install of EW on kali linux WSL from setup.sh by completing removing EW first.

ran the command as per screenshot below still ends up stalling infinitely.

kali screenshot infinite load

@atharvak95
Copy link
Author

For those wanting to run on Windows in WSL, the C# version is still around :)

That said, EW on WSL2 Ubuntu 22.04 seems to work ok for me.

The setup.sh script was recently rebuilt. Perhaps this fixed the issue?

Collaborator

so i did a fresh install of EW on kali linux WSL from setup.sh by completing removing EW first.

ran the command as per screenshot below still ends up stalling infinitely.

kali screenshot infinite load

and then ended up throwing this error after a long time -
image

@0x6d6f7468
Copy link
Collaborator

Doing some research about that error. Can you try setting the environment variable PYVIRTUALDISPLAY_DISPLAYFD=0 prior to running EyeWitness to see if that fixes anything?

Reference: ponty/PyVirtualDisplay#84 (comment)

@atharvak95
Copy link
Author

it worked !

Doing some research about that error. Can you try setting the environment variable PYVIRTUALDISPLAY_DISPLAYFD=0 prior to running EyeWitness to see if that fixes anything?

Reference: ponty/PyVirtualDisplay#84 (comment)

it worked ! but now what's with these abrupt timeouts ? can this be fixed ?
image

@0x6d6f7468
Copy link
Collaborator

0x6d6f7468 commented May 27, 2024

Depending on your network speed, perhaps the default timeout of 7 seconds might be too short. You can change it with the --timeout argument. Also those WebDriver errors could possibly indicate DNS resolution issues.

@haydena23
Copy link

haydena23 commented Jul 19, 2024

EDIT: For some odd reason, I tried installing it by source, and then installed it by apt as well. Exported PYVIRTUALDISPLAY_DISPLAYFD=0 again and it's now working? Not a clue why, but I'll take it I suppose. Hopefully this can be ironed out in the future.


Apologies to revive the thread but I too am still having issues with this. Some steps I have done:

  • Installed via apt, uninstalled, restarted, reinstalled. Also autoremove in between
  • Built EW from source, and had no setup issues.
  • Export PYVIRTUALDISPLAY_DISPLAYFD=0
  • Ensured /etc/hosts is valid. I opened a chromium instance and successfully navigated to desired hosts
  • Command being run:
sudo python3 EyeWitness.py -x ~/apps/web_discovery.xml -d ~/apps/ew_report

If I run EW from Sudo, it stalls just like the image at the start of this thread. If not run from sudo, I get the following errors:
image

Still quite stuck. Hmmm

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

No branches or pull requests

6 participants