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 through SOCKS proxy v4 (Cobalt Strike) #458

Raikia opened this issue Mar 5, 2020 · 0 comments

EyeWitness through SOCKS proxy v4 (Cobalt Strike) #458

Raikia opened this issue Mar 5, 2020 · 0 comments


Copy link

@Raikia Raikia commented Mar 5, 2020

I figured I would leave this information here after my 30 minutes of debugging so someone else doesn't struggle. EyeWitness can be run through a SOCKS proxy v4 by using proxychains, but it requires a very specific setup otherwise everything will timeout.

Note: It looks like EyeWitness does actually support SOCKS v5 via "--proxy-type", but Cobalt Strike is v4 so that doesn't work.

Explanation and other issues:

  • In the latest versions of Kali, you cannot run EyeWitness as root (with sudo) otherwise you'll get a very vague error message of "Message: Unable to find a matching set of capabilities". If you read "geckodriver.log", you'll see the real error message of "Running Firefox as root in a regular user's session is not supported."

  • The EyeWitness directory must be user-writable because EyeWitness writes to that geckodriver.log file. So make sure you chmod the folder correctly.

  • If you run Kali's "proxychains" before "" (proxychains ./ --single '' -d ~/output), you will see a ton of "|S-chain|-<>-SERVER:PORT-<><>-<--denied". EyeWitness is trying to connect to the geckodriver that is listening on that port, but that request ( is going through the SOCKS proxy instead of actually being a localhost request. Thus everything is denied and nothing works.


Instructions on how to make it work

  1. Make sure EyeWitness directory is user-writable:
chmod -R 777 /opt/eyewitness-git/
  1. Kali's proxychains does not allow you to exclude IPs from being passed through the SOCKS proxy (which is what is breaking EyeWitness). You need to use the latest support version of Proxychains-ng (the actively developed version of proxychains) that allows exclusions. Complete commands are below for github cloning and installing for your convenience for copy/paste:
git clone ~/proxychains-ng
cd ~/proxychains-ng
make -s clean
./configure --prefix=/usr --sysconfdir=/etc
make -s
make -s install
ln -sf /usr/bin/proxychains4 /usr/local/bin/proxychains-ng
  1. Add the following line to your /etc/proxychains.conf file (I personally add it after "proxy_dns" but anywhere should work as long as its not at the very bottom under "[ProxyList]"):
  1. Add your proxychains server like normal to the bottom of /etc/proxychains.conf

  2. Run EyeWitness like normal by prefixing "proxychains-ng" (notice the "-ng" at the end)

proxychains-ng ./ --single '' -d ~/output
  1. You should now see the NEW version of the "S-Chain" line where it no longer uses ASCII arrows, see below:


Done! You can now run EyeWitness through CobaltStrike as long as you prefix it with "proxychains-ng" instead of the old, crappy "proxychains"

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

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.