rofl0r / proxychains-ng

proxychains ng (new generation) - a preloader which hooks calls to sockets in dynamically linked programs and redirects it through one or more socks/http proxies. continuation of the unmaintained proxychains project. the sf.net page is currently not updated, use releases from github release page instead.

Home Page:http://sourceforge.net/projects/proxychains-ng/files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expecting value: line 1 column 2 (char 1) when running proxychains and crackmapexec

Rffrench opened this issue · comments

Hey there, I have been trying to run crackmapexec with proxychains and poetry using every kind of combination but there seems to be a bug in proxychains-ng that doesn't let me accomplish this task.

Here are the different ways I have tried executing it. Note that if I use proxychains with nmap or other tools it works just fine. So, the problem seems to be in proxychains-ng when using poetry

CrackmapExec is in the cme folder and it works fine when executing it without proxychains.

  • Method 1:
chino@mypc:~/Applications/cme$ proxychains poetry run crackmapexec
[proxychains] config file found: /etc/proxychains4.conf
[proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4
[proxychains] DLL init: proxychains-ng 4.14

Expecting value: line 1 column 2 (char 1)
  • Method 2 (poetry with absolute path):
chino@mypc:~/Applications/cme$ proxychains /home/chino/.local/bin/poetry run crackmapexec
[proxychains] config file found: /etc/proxychains4.conf
[proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4
[proxychains] DLL init: proxychains-ng 4.14

Expecting value: line 1 column 2 (char 1)
  • Method 3 (absolute paths for both binaries, poetry and crackmapexec):
chino@mypc:~/Applications/cme$ proxychains /home/chino/.local/bin/poetry run /home/chino/Applications/cme/crackmapexec
[proxychains] config file found: /etc/proxychains4.conf
[proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4
[proxychains] DLL init: proxychains-ng 4.14

Expecting value: line 1 column 2 (char 1)
  • Method 4 (using a bash alias):
    The bash alias is alias cme='cd ~/Applications/cme; poetry run crackmapexec'
    And if I try to use proxychains I get this other error:
chino@mypc:~/Applications/cme$ proxychains cme
[proxychains] config file found: /etc/proxychains4.conf
[proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4
proxychains can't load process....: Permission denied

I would highly appreciate any help!
Thanks in advance

OS: Ubuntu 20.04.1

commented

Expecting value: line 1 column 2 (char 1)

try to figure out where and why this error message is shown, mr pentester.

method 4 is invalid because proxychains4 binary runs exec on an executable, not executing shell commands.

Expecting value: line 1 column 2 (char 1)

try to figure out where and why this error message is shown, mr pentester.

method 4 is invalid because proxychains4 binary runs exec on an executable, not executing shell commands.

Thanks Mr. Developer. I already tried that but I cannot seem to find where is the error. I even tried with different versions of proxychains, different config files, etc. Weird error I get

commented

the error comes from the stuff you execute. try to run strings on executables and grep on the scripts it executes.

Fixed it. poetry had a bug that caused errors with proxychains and it got fixed with the latest versions. Updating it solved the proxychains poetry run issue. Thanks for your help anyway man 👌