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.
http://sourceforge.net/projects/proxychains-ng/files
GNU General Public License v2.0
9.76k stars 1.08k forks source link

an issue with the command "dig" #385

Open mjmasteredver opened 3 years ago

mjmasteredver commented 3 years ago

The command:

proxychains dig axfr [domain name] @[name server] 

output:

[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4
[proxychains] DLL init: proxychains-ng 4.14
dig: isc_socket_connect: invalid use of multicast address

What to do? I have the latest version of proxychains and kali linux 2021.2 i dont want to remove the proxychains command

phantomcraft commented 3 years ago

You cannot use dig with proxychains-ng, because dig tries to access the DNS server defined in /etc/resolv.conf.

Even if you specify the fake DNS resolution of proxychains-ng, it will not work because socks4/5 and HTTP proxies doesn't support direct DNS probing, only TCP connections with the hostname specified in TCP header.

rofl0r commented 3 years ago

you can use proxychains-ng with dig, by using the -t tcp parameter

rofl0r commented 3 years ago

https://github.com/rofl0r/proxychains-ng/blob/master/src/proxyresolv#L18