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

proxychains does not work well with nmap #129

Open kienhoangtu7 opened 8 years ago

kienhoangtu7 commented 8 years ago

guys when i use proxychains to scan host without -A is can scan normal but with it it gonna get error.Need your help. when i scan without -A: [proxychains] config file found: /opt/proxychains/src/proxychains.conf [proxychains] preloading /usr/local/lib/libproxychains4.so [proxychains] DLL init: proxychains-ng 4.11-git-5-ge527b9e

Starting Nmap 7.01 ( https://nmap.org ) at 2016-06-29 13:11 EDT Nmap scan report for anhhungvieshare.com (173.236.74.12) Host is up (0.20s latency). rDNS record for 173.236.74.12: phx22.stablehost.com Not shown: 955 filtered ports, 31 closed ports PORT STATE SERVICE 21/tcp open ftp 22/tcp open ssh 25/tcp open smtp 26/tcp open rsftp 80/tcp open http 82/tcp open xfer 110/tcp open pop3 143/tcp open imap 443/tcp open https 465/tcp open smtps 587/tcp open submission 993/tcp open imaps 995/tcp open pop3s 5666/tcp open nrpe

Nmap done: 1 IP address (1 host up) scanned in 10.70 seconds

And this is when i scan it with -A: [proxychains] config file found: /opt/proxychains/src/proxychains.conf [proxychains] preloading /usr/local/lib/libproxychains4.so [proxychains] DLL init: proxychains-ng 4.11-git-5-ge527b9e

Starting Nmap 7.01 ( https://nmap.org ) at 2016-06-29 13:12 EDT [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:21 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:22 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:25 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:26 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:82 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:110 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:143 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:443 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:465 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:587 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:993 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:995 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:5666 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:8888 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:465 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:443 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:993 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:995 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:8888 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:25 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:8888 <--socket error or timeout! [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:25 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:25 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:80 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:82 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:993 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:82 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:82 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:143 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:82 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:82 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:995 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:82 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:82 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:82 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:82 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:82 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:82 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:82 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:82 ... OK [proxychains] Strict chain ... 127.0.0.1:9050 ... 173.236.74.12:25 <--socket error or timeout! Segmentation fault

And finnaly when i use proxychains with sparta to scan it the scan gonna crash.

rofl0r commented 8 years ago

could you provide a backtrace of the crash ? gdb --args proxychains4 nmap ....options... then type r and wait for the crash, then type bt and paste the output.

kienhoangtu7 commented 8 years ago

if i change to dynamic chains it got this error

*** Error in `nmap': munmap_chunk(): invalid pointer: 0x08dc1568 ***

Program received signal SIGABRT, Aborted.
0xb7fdcc38 in ?? ()
here is the backtrace:
#0  0xb7fdcc38 in ?? ()
#1  0xb78e2007 in malloc_printerr (action=<optimized out>, 
    str=0xb79d431c "munmap_chunk(): invalid pointer", ptr=0x8dc1568)
    at malloc.c:4965
#2  0xb78e20b8 in munmap_chunk (p=<optimized out>) at malloc.c:2820
#3  0xb7b03c08 in operator delete(void*) ()
   from /usr/lib/i386-linux-gnu/libstdc++.so.6
#4  0x080cb9f4 in ?? ()
#5  0x080cecdc in service_scan(std::vector<Target*, std::allocator<Target*> >&)
    ()
#6  0x08092f92 in nmap_main(int, char**) ()
#7  0x0806bbb7 in main ()
rofl0r commented 8 years ago

looks like a bug in nmap to me. can you also paste a bt of the segfault (without dynamic chain)?

kienhoangtu7 commented 8 years ago

now i cant get that segfault anymore. Sometime it get segfault but usually it get Error in `nmap': munmap_chunk(): invalid pointer

ammaratef45 commented 8 years ago

I have the same problem No one found solution for it?